0xca3eb45fb186ed4e75b9b22a514ff1d4abadd123

deployer: unknown relevance score: 0 status: partially_identified bytecode: 22873 bytes

DECOMPILED SOLIDITY (Heimdall)

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// @title            Decompiled Contract
/// @author           Jonathan Becker <jonathan@jbecker.dev>
/// @custom:version   heimdall-rs v0.9.2
///
/// @notice           This contract was decompiled using the heimdall-rs decompiler.
///                     It was generated directly by tracing the EVM opcodes from this contract.
///                     As a result, it may not compile or even be valid solidity code.
///                     Despite this, it should be obvious what each function does. Overall
///                     logic should have been preserved throughout decompiling.
///
/// @custom:github    You can find the open-source decompiler here:
///                       https://heimdall.rs

contract DecompiledContract {
    uint256 public constant tokenPeg = 100000000;
    uint256 public constant getTokenPriceSource = 100000000;
    
    uint256 public minDebt;
    uint256 public priceSourceDecimals;
    bytes32 store_r;
    uint256 public gainRatio;
    uint256 public adminFee;
    address public mai;
    mapping(bytes32 => bytes32) storage_map_af;
    bool public version;
    uint256 public maxDebt;
    address public collateral;
    uint256 public iR;
    mapping(bytes32 => bytes32) storage_map_i;
    uint256 public maiDebt;
    uint256 public totalSupply;
    address public stabilityPool;
    address public adm;
    uint256 public openingFee;
    mapping(bytes32 => bytes32) storage_map_x;
    uint256 store_ae;
    address public ref;
    bytes32 store_p;
    bytes32 store_d;
    uint256 public decimalDifferenceRaisedToTen;
    address public owner;
    bool public custom;
    mapping(bytes32 => bytes32) storage_map_a;
    uint256 public totalBorrowed;
    uint256 public debtRatio;
    address public ethPriceSource;
    uint256 public _minimumCollateralPercentage;
    uint256 public getClosingFee;
    uint256 public refFee;
    uint256 store_ah;
    uint256 public vaultCount;
    
    event UpdatedOracleName(string);
    event UpdatedMaxDebt(uint256);
    event UpdatedGainRatio(uint256);
    event UpdatedAdmin(address);
    event UpdatedRef(address);
    event AddedFrontEnd(uint256);
    event UpdatedFrontEnd(uint256, uint256);
    event Approval(address, address, uint256);
    event UpdatedRouter(address);
    event UpdatedOpeningFee(uint256);
    event UpdatedMinCollateralRatio(uint256);
    event UpdatedFees(uint256, uint256);
    event ApprovalForAll(address, address, bool);
    event UpdatedEthPriceSource(address);
    event UpdatedStabilityPool(address);
    event Transfer(address, address, uint256);
    event BurnedToken(uint256);
    event UpdatedMinDebt(uint256);
    event UpdatedInterestRate(uint256);
    event RemovedFrontEnd(uint256);
    event UpdatedDebtRatio(uint256);
    event CreateVault(uint256, address);
    event UpdatedClosingFee(uint256);
    event DepositCollateral(uint256, uint256);
    event UpdatedCustomURI(bool);
    event UpdatedTokenURI(string);
    event OwnershipTransferred(address, address);
    
    /// @custom:selector    0x095ea7b3
    /// @custom:signature   approve(address arg0, uint256 arg1) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function approve(address arg0, uint256 arg1) public payable {
        require(arg0 == (address(arg0)));
        uint256 var_a = arg1;
        require(address(storage_map_a[var_a]), "ERC721: invalid token ID");
        require(!(address(arg0) == (address(storage_map_a[var_a]))), "ERC721: invalid token ID");
        require(address(storage_map_a[var_a]) == msg.sender, "ERC721: invalid token ID");
        var_a = address(msg.sender);
        require(bytes1(storage_map_a[var_a]), "ERC721: invalid token ID");
        var_a = arg1;
        storage_map_a[var_a] = (address(arg0)) | (uint96(storage_map_a[var_a]));
        var_a = arg1;
        require(address(storage_map_a[var_a]), "ERC721: invalid token ID");
        emit Approval(address(storage_map_a[var_a]), address(arg0), arg1);
        require(address(storage_map_a[var_a]) == msg.sender, "ERC721: approve caller is not token owner or approved for all");
    }
    
    /// @custom:selector    0xece13732
    /// @custom:signature   depositCollateral(uint256 arg0, uint256 arg1) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function depositCollateral(uint256 arg0, uint256 arg1) public payable {
        uint256 var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "must use router");
        require(!(address(version)), "must use router");
        require(msg.sender == (address(version)), "must use router");
        var_a = arg0;
        require(!storage_map_a[var_a] > ~(arg1));
        var_a = arg0;
        require(!(storage_map_a[var_a] + arg1) < storage_map_a[var_a]);
        var_a = arg0;
        storage_map_a[var_a] = storage_map_a[var_a] + arg1;
        uint256 var_c = ((0x84 + var_i) - var_i) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0;
        var_i = 0x40 + var_i;
        require(!0 > var_i.length);
        (bool success, bytes memory ret0) = address(collateral).transfer(0);
        require(ret0.length == 0);
        require(!var_o);
        require(!(0 > var_i.length), "");
        require(var_o, "SafeERC20: ERC20 operation did not succeed");
        require(!var_o, "SafeERC20: ERC20 operation did not succeed");
        require(!(((0x80 + var_o) - 0x80) < 0x20), "SafeERC20: ERC20 operation did not succeed");
        require(var_c == var_c, "SafeERC20: ERC20 operation did not succeed");
        require(var_c, "SafeERC20: ERC20 operation did not succeed");
        emit DepositCollateral(arg0, arg1);
        emit DepositCollateral(arg0, arg1);
        require(address(collateral).code.length, "Address: call to non-contract");
        var_i = var_i + (uint248(ret0.length + 0x3f));
        require(!var_i.length);
        require(var_i.length, "Address: call to non-contract");
        require(address(collateral).code.length, "Address: call to non-contract");
        require(!var_i.length, "Vault does not exist");
        emit DepositCollateral(arg0, arg1);
    }
    
    /// @custom:selector    0x767a7b05
    /// @custom:signature   withdrawCollateral(uint256 arg0, uint256 arg1) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function withdrawCollateral(uint256 arg0, uint256 arg1) public payable {
        uint256 var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "Vault is not owned by you");
        var_a = arg0;
        require(address(storage_map_a[var_a]), "Vault is not owned by you");
        require(address(storage_map_a[var_a]) == msg.sender, "Vault is not owned by you");
        require(!(store_d == 0x02), "ReentrancyGuard: reentrant call");
        store_d = 0x02;
        var_a = arg0;
        require(!(arg1 > storage_map_a[var_a]), "Vault does not have enough collateral");
        var_a = arg0;
        require(!(storage_map_a[var_a] < arg1), "ERC721: invalid token ID");
        var_a = arg0;
        require(!storage_map_a[var_a], "ERC721: invalid token ID");
        require(!(iR > 0), "ERC721: invalid token ID");
        var_a = arg0;
        require(!(block.timestamp < storage_map_a[var_a]), "ERC721: invalid token ID");
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR))), "ERC721: invalid token ID");
        require(!(maiDebt > 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), "ERC721: invalid token ID");
    }
    
    /// @custom:selector    0x952cc86a
    /// @custom:signature   liquidateVault(uint256 arg0, uint256 arg1) public view
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function liquidateVault(uint256 arg0, uint256 arg1) public view {
        uint256 var_a = arg1;
        require(!(!address(storage_map_a[var_a])), "Front end not added");
        var_a = arg1;
        require(0x2710 < storage_map_a[var_a], "Front end not added");
        require(!(0x2710 < storage_map_a[var_a]), "Front end not added");
        var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "liquidation is disabled for public");
        require(!(address(stabilityPool)), "liquidation is disabled for public");
        require(msg.sender == (address(stabilityPool)), "liquidation is disabled for public");
        var_a = arg0;
        require(!storage_map_a[var_a], "Vault does not exist");
        require(!(iR > 0), "Vault does not exist");
        var_a = arg0;
        require(!(block.timestamp < storage_map_a[var_a]), "Vault does not exist");
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR))), "Vault does not exist");
        require(!(maiDebt > 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), "Vault does not exist");
        var_a = arg1;
        require(storage_map_a[var_a], "Front end not added");
    }
    
    /// @custom:selector    0x2f745c59
    /// @custom:signature   tokenOfOwnerByIndex(address arg0, uint256 arg1) public view returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function tokenOfOwnerByIndex(address arg0, uint256 arg1) public view returns (uint256) {
        require(arg0 == (address(arg0)));
        require(address(arg0), "ERC721Enumerable: owner index out of bounds");
        address var_a = address(arg0);
        require(arg1 < storage_map_a[var_a], "ERC721Enumerable: owner index out of bounds");
        var_a = arg1;
        return storage_map_a[var_a];
    }
    
    /// @custom:selector    0xb165ff0b
    /// @custom:signature   maticDebt(address arg0) public view returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function maticDebt(address arg0) public view returns (uint256) {
        require(arg0 == (address(arg0)));
        address var_b = arg0;
        return storage_map_i[var_b];
    }
    
    /// @custom:selector    0x93ee476a
    /// @custom:signature   updateVaultDebt(uint256 arg0) public view
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function updateVaultDebt(uint256 arg0) public view {
        uint256 var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        require(!maiDebt > 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
    }
    
    /// @custom:selector    0xb86f6aef
    /// @custom:signature   checkLiquidation(uint256 arg0) public payable returns (bool)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function checkLiquidation(uint256 arg0) public payable returns (bool) {
        uint256 var_a = arg0;
        require(address(storage_map_a[var_a]));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(storage_map_a[var_a]);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        uint256 var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        require(var_e.length);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        return 0;
    }
    
    /// @custom:selector    0x704b6c02
    /// @custom:signature   setAdmin(address arg0) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function setAdmin(address arg0) public payable {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(address(arg0), "Admin Address cannot be zero");
        adm = (address(arg0)) | (uint96(adm));
        emit UpdatedAdmin(address(arg0));
    }
    
    /// @custom:selector    0x5357b989
    /// @custom:signature   calculateFee(uint256 arg0, uint256 arg1, uint256 arg2) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    /// @param              arg2 ["uint256", "bytes32", "int256"]
    function calculateFee(uint256 arg0, uint256 arg1, uint256 arg2) public payable {
        require(!arg2);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        uint256 var_b = var_b + (uint248(ret0.length + 0x1f));
        require(!((var_b + ret0.length) - var_b) < 0x20);
        require(!(var_b.length) & (0x2710 > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / var_b.length)));
    }
    
    /// @custom:selector    0xcf5f0f3c
    /// @custom:signature   paybackTokenAll(uint256 arg0, uint256 arg1, uint256 arg2) public view
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    /// @param              arg2 ["uint256", "bytes32", "int256"]
    function paybackTokenAll(uint256 arg0, uint256 arg1, uint256 arg2) public view {
        uint256 var_a = arg2;
        require(!(!address(storage_map_a[var_a])), "Front end not added");
        var_a = arg2;
        require(0x2710 < storage_map_a[var_a], "Front end not added");
        require(!(0x2710 < storage_map_a[var_a]), "Front end not added");
        var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "must use router");
        require(!(address(version)), "must use router");
        require(msg.sender == (address(version)), "must use router");
        require(!(arg1 < block.timestamp), "paybackTokenAll: deadline expired.");
        var_a = arg0;
        require(!storage_map_a[var_a], "paybackTokenAll: deadline expired.");
        require(!(iR > 0), "paybackTokenAll: deadline expired.");
        var_a = arg0;
        require(!(block.timestamp < storage_map_a[var_a]), "paybackTokenAll: deadline expired.");
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR))), "paybackTokenAll: deadline expired.");
        require(!(maiDebt > 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), "paybackTokenAll: deadline expired.");
        var_a = arg2;
        require(storage_map_a[var_a], "Front end not added");
    }
    
    /// @custom:selector    0xb3229a63
    /// @custom:signature   checkRiskyVault(uint256 arg0) public payable returns (bool)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function checkRiskyVault(uint256 arg0) public payable returns (bool) {
        uint256 var_a = arg0;
        require(address(storage_map_a[var_a]));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(storage_map_a[var_a]);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        uint256 var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        require(var_e.length);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        return 0;
    }
    
    /// @custom:selector    0xd73464cc
    /// @custom:signature   promoter(uint256 arg0) public view returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function promoter(uint256 arg0) public view returns (uint256) {
        uint256 var_b = arg0;
        return storage_map_i[var_b];
    }
    
    /// @custom:selector    0x01ffc9a7
    /// @custom:signature   supportsInterface(bytes4 arg0) public pure returns (bool)
    /// @param              arg0 ["uint32", "bytes4", "int32"]
    function supportsInterface(bytes4 arg0) public pure returns (bool) {
        require(arg0 == (uint32(arg0)));
        require(0x780e9d6300000000000000000000000000000000000000000000000000000000 == (uint32(arg0)));
        return !(!0x780e9d6300000000000000000000000000000000000000000000000000000000 == (uint32(arg0)));
        require(0x80ac58cd00000000000000000000000000000000000000000000000000000000 == (uint32(arg0)));
        require(0x80ac58cd00000000000000000000000000000000000000000000000000000000 == (uint32(arg0)));
        return !(!0x80ac58cd00000000000000000000000000000000000000000000000000000000 == (uint32(arg0)));
        return !(!(uint32(arg0)) == 0x01ffc9a700000000000000000000000000000000000000000000000000000000);
    }
    
    /// @custom:selector    0xa22cb465
    /// @custom:signature   Unresolved_a22cb465(address arg0, uint256 arg1) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function Unresolved_a22cb465(address arg0, uint256 arg1) public payable {
        require(arg0 == (address(arg0)));
        require(arg1 == arg1);
        require(!(address(msg.sender) == (address(arg0))), "ERC721: approve to caller");
        var_a = address(arg0);
        storage_map_a[var_a] = arg1 | (uint248(storage_map_a[var_a]));
        emit ApprovalForAll(address(msg.sender), address(arg0), arg1);
    }
    
    /// @custom:selector    0x6352211e
    /// @custom:signature   ownerOf(uint256 arg0) public view returns (address)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function ownerOf(uint256 arg0) public view returns (address) {
        uint256 var_a = arg0;
        require(address(storage_map_a[var_a]), "ERC721: invalid token ID");
        return address(storage_map_a[var_a]);
    }
    
    /// @custom:selector    0x06fdde03
    /// @custom:signature   name() public view returns (string memory)
    function name() public view returns (string memory) {
        if (store_p) {
            if (!(store_p) == ((store_p >> 0x01) < 0x20)) {
                uint256 var_c = var_c + (0x20 + (((0x1f + (store_p >> 0x01)) / 0x20) * 0x20));
                if (store_p) {
                    if (!(store_p) == ((store_p >> 0x01) < 0x20)) {
                        if (!store_p >> 0x01) {
                            if (0x1f < (store_p >> 0x01)) {
                                var_a = 0x01;
                                if ((0x20 + var_c) + (store_p >> 0x01) > (0x20 + (0x20 + var_c))) {
                                    if (!0 > var_c.length) {
                                        return abi.encodePacked(0x20, var_c.length);
                                        return abi.encodePacked(0x20, var_c.length);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    
    /// @custom:selector    0xeb6a887d
    /// @custom:signature   setDebtRatio(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function setDebtRatio(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(arg0, "Debt Ratio cannot be 0");
        debtRatio = arg0;
        emit UpdatedDebtRatio(arg0);
    }
    
    /// @custom:selector    0x95d89b41
    /// @custom:signature   symbol() public view returns (string memory)
    function symbol() public view returns (string memory) {
        if (store_r) {
            if (!(store_r) == ((store_r >> 0x01) < 0x20)) {
                uint256 var_c = var_c + (0x20 + (((0x1f + (store_r >> 0x01)) / 0x20) * 0x20));
                if (store_r) {
                    if (!(store_r) == ((store_r >> 0x01) < 0x20)) {
                        if (!store_r >> 0x01) {
                            if (0x1f < (store_r >> 0x01)) {
                                var_a = 0x02;
                                if ((0x20 + var_c) + (store_r >> 0x01) > (0x20 + (0x20 + var_c))) {
                                    if (!0 > var_c.length) {
                                        return abi.encodePacked(0x20, var_c.length);
                                        return abi.encodePacked(0x20, var_c.length);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    
    /// @custom:selector    0xd310f49b
    /// @custom:signature   vaultDebt(uint256 arg0) public view returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function vaultDebt(uint256 arg0) public view returns (uint256) {
        uint256 var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        return storage_map_a[var_a];
    }
    
    /// @custom:selector    0xb88d4fde
    /// @custom:signature   Unresolved_b88d4fde(address arg0) public pure
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_b88d4fde(address arg0) public pure {
        require(arg0 == (address(arg0)));
    }
    
    /// @custom:selector    0x081812fc
    /// @custom:signature   getApproved(uint256 arg0) public view returns (address)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function getApproved(uint256 arg0) public view returns (address) {
        uint256 var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "ERC721: invalid token ID");
        var_a = arg0;
        return address(storage_map_a[var_a]);
    }
    
    /// @custom:selector    0x23b872dd
    /// @custom:signature   Unresolved_23b872dd(address arg0) public pure
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_23b872dd(address arg0) public pure {
        require(arg0 == (address(arg0)));
    }
    
    /// @custom:selector    0x70a08231
    /// @custom:signature   balanceOf(address arg0) public view returns (uint256)
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function balanceOf(address arg0) public view returns (uint256) {
        require(arg0 == (address(arg0)));
        require(address(arg0), "ERC721: address zero is not a valid owner");
        address var_a = address(arg0);
        return storage_map_a[var_a];
    }
    
    /// @custom:selector    0xc0d78655
    /// @custom:signature   setRouter(address arg0) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function setRouter(address arg0) public payable {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        version = (address(arg0)) | (uint96(version));
        emit UpdatedRouter(address(arg0));
    }
    
    /// @custom:selector    0x6bc855cc
    /// @custom:signature   setRef(address arg0) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function setRef(address arg0) public payable {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(address(arg0), "Reference Address cannot be zero");
        ref = (address(arg0)) | (uint96(ref));
        emit UpdatedRef(address(arg0));
    }
    
    /// @custom:selector    0x40803854
    /// @custom:signature   addFrontEnd(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function addFrontEnd(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        uint256 var_e = arg0;
        require(!(!address(storage_map_x[var_e])), "addFrontEnd: already added");
        var_e = arg0;
        require(!storage_map_x[var_e], "addFrontEnd: already added");
        var_e = arg0;
        storage_map_x[var_e] = 0x2710;
        emit AddedFrontEnd(arg0);
    }
    
    /// @custom:selector    0x38536275
    /// @custom:signature   setMinCollateralRatio(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function setMinCollateralRatio(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        _minimumCollateralPercentage = arg0;
        emit UpdatedMinCollateralRatio(arg0);
    }
    
    /// @custom:selector    0x379394d0
    /// @custom:signature   Unresolved_379394d0(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function Unresolved_379394d0(uint256 arg0) public payable {
        require(arg0 == arg0);
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        custom = arg0 | (uint248(custom));
        emit UpdatedCustomURI(bytes1(arg0));
    }
    
    /// @custom:selector    0x2df87573
    /// @custom:signature   accumulatedVaultDebt(uint256 arg0) public view returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function accumulatedVaultDebt(uint256 arg0) public view returns (uint256) {
        uint256 var_b = arg0;
        return storage_map_i[var_b];
    }
    
    /// @custom:selector    0x97ff37b9
    /// @custom:signature   lastInterest(uint256 arg0) public view returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function lastInterest(uint256 arg0) public view returns (uint256) {
        uint256 var_b = arg0;
        return storage_map_i[var_b];
    }
    
    /// @custom:selector    0x3db99177
    /// @custom:signature   setClosingFee(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function setClosingFee(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(!(arg0 > 0x01f4), "setClosingFee: cannot be more than 5%");
        getClosingFee = arg0;
        emit UpdatedClosingFee(arg0);
    }
    
    /// @custom:selector    0x0b78f9c0
    /// @custom:signature   setFees(uint256 arg0, uint256 arg1) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function setFees(uint256 arg0, uint256 arg1) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(!(arg0 > ~(arg1)), "setFees: must equal 10000.");
        require((arg0 + arg1) == 0x2710, "setFees: must equal 10000.");
        adminFee = arg0;
        refFee = arg1;
        emit UpdatedFees(arg0, arg1);
    }
    
    /// @custom:selector    0x715018a6
    /// @custom:signature   renounceOwnership() public payable
    function renounceOwnership() public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        owner = 0 | (uint96(owner));
        emit OwnershipTransferred(address(owner), 0);
    }
    
    /// @custom:selector    0x85e290a3
    /// @custom:signature   destroyVault(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function destroyVault(uint256 arg0) public payable {
        uint256 var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "Vault is not owned by you");
        var_a = arg0;
        require(address(storage_map_a[var_a]), "Vault is not owned by you");
        require(address(storage_map_a[var_a]) == msg.sender, "Vault is not owned by you");
        require(!(store_d == 0x02), "ReentrancyGuard: reentrant call");
        store_d = 0x02;
        var_a = arg0;
        require(!storage_map_a[var_a], "Vault has outstanding debt");
        require(!(iR > 0), "Vault has outstanding debt");
        var_a = arg0;
        require(!(block.timestamp < storage_map_a[var_a]), "Vault has outstanding debt");
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR))), "Vault has outstanding debt");
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!storage_map_a[var_a], "Vault has outstanding debt");
        var_a = arg0;
        require(!storage_map_a[var_a]);
        var_a = arg0;
        require(address(storage_map_a[var_a]));
        var_a = arg0;
        uint256 var_c = ((0x64 + var_h) - var_h) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0;
        var_h = 0x40 + var_h;
        require(!0 > var_h.length);
        (bool success, bytes memory ret0) = address(collateral).transfer(0);
        require(ret0.length == 0);
        require(!var_n);
        require(!(0 > var_h.length), "");
        require(var_n, "SafeERC20: ERC20 operation did not succeed");
        require(!var_n, "SafeERC20: ERC20 operation did not succeed");
        require(!(((0x80 + var_n) - 0x80) < 0x20), "SafeERC20: ERC20 operation did not succeed");
        require(var_c == var_c, "SafeERC20: ERC20 operation did not succeed");
        require(var_c, "SafeERC20: ERC20 operation did not succeed");
        var_a = arg0;
        require(address(storage_map_a[var_a]), "ERC721Enumerable: consecutive transfers not supported");
        require(!(0x01 > 0x01), "ERC721Enumerable: consecutive transfers not supported");
        if (address(storage_map_a[var_a])) {
            require(address(storage_map_a[var_a]), "ERC721: address zero is not a valid owner");
            require(address(storage_map_a[var_a]) == 0, "ERC721: address zero is not a valid owner");
            var_a = address(storage_map_a[var_a]);
            require(address(storage_map_a[var_a]), "ERC721: address zero is not a valid owner");
            var_a = arg0;
            require(!(storage_map_a[var_a] < 0x01), "ERC721: address zero is not a valid owner");
            var_a = arg0;
            storage_map_a[var_a] = 0;
            var_a = storage_map_a[var_a] - 0x01;
            storage_map_a[var_a] = 0;
            require((storage_map_a[var_a] - 0x01) == storage_map_a[var_a], "ERC721: address zero is not a valid owner");
            require(0, "ERC721: address zero is not a valid owner");
        }
        require(address(collateral).code.length, "Address: call to non-contract");
        var_h = var_h + (uint248(ret0.length + 0x3f));
        require(!var_h.length);
        require(var_h.length, "Address: call to non-contract");
        require(address(collateral).code.length, "Address: call to non-contract");
        if (!var_h.length) {
        }
    }
    
    /// @custom:selector    0xcc02ce22
    /// @custom:signature   updateFrontEnd(uint256 arg0, uint256 arg1) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function updateFrontEnd(uint256 arg0, uint256 arg1) public payable {
        uint256 var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "Front end not added");
        var_a = arg0;
        require(0x2710 < storage_map_a[var_a], "Front end not added");
        require(!(0x2710 < storage_map_a[var_a]), "Front end not added");
        var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "Vault is not owned by you");
        var_a = arg0;
        require(address(storage_map_a[var_a]), "Vault is not owned by you");
        require(address(storage_map_a[var_a]) == msg.sender, "Vault is not owned by you");
        require(!(arg1 > 0), "updateFrontEnd: cannot be 0");
        require(!(arg1 > 0x2710), "updateFrontEnd: cannot be 0");
        var_a = arg0;
        storage_map_a[var_a] = arg1;
        emit UpdatedFrontEnd(arg0, arg1);
        require(arg1 > 0, "updateFrontEnd: cannot be 0");
        var_a = arg0;
        storage_map_a[var_a] = arg1;
        emit UpdatedFrontEnd(arg0, arg1);
        var_a = arg0;
        require(storage_map_a[var_a], "Front end not added");
    }
    
    /// @custom:selector    0x97a41b8e
    /// @custom:signature   borrowToken(uint256 arg0, uint256 arg1, uint256 arg2) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    /// @param              arg2 ["uint256", "bytes32", "int256"]
    function borrowToken(uint256 arg0, uint256 arg1, uint256 arg2) public payable {
        uint256 var_a = arg2;
        require(!(!address(storage_map_a[var_a])), "Front end not added");
        var_a = arg2;
        require(0x2710 < storage_map_a[var_a], "Front end not added");
        require(!(0x2710 < storage_map_a[var_a]), "Front end not added");
        var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "Vault is not owned by you");
        var_a = arg0;
        require(address(storage_map_a[var_a]), "Vault is not owned by you");
        require(address(storage_map_a[var_a]) == msg.sender, "Vault is not owned by you");
        require(!(store_d == 0x02), "ReentrancyGuard: reentrant call");
        store_d = 0x02;
        require(arg1 > 0);
        address var_d = address(this);
        (bool success, bytes memory ret0) = address(mai).Unresolved_70a08231(var_d); // staticcall
        uint256 var_g = var_g + (uint248(ret0.length + 0x1f));
        require(!(((var_g + ret0.length) - var_g) < 0x20), "borrowToken: Cannot mint over available supply.");
        require(!(arg1 > var_g.length), "borrowToken: Cannot mint over available supply.");
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        require(!maiDebt > 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        var_a = arg2;
        require(storage_map_a[var_a], "Front end not added");
    }
    
    /// @custom:selector    0x11b4a832
    /// @custom:signature   checkCost(uint256 arg0) public payable returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function checkCost(uint256 arg0) public payable returns (uint256) {
        uint256 var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!storage_map_a[var_a]);
        var_a = arg0;
        require(address(storage_map_a[var_a]));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(storage_map_a[var_a]);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        uint256 var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        require(var_e.length);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        require(0, "Vault does not exist");
        return 0;
    }
    
    /// @custom:selector    0x98d721e0
    /// @custom:signature   setStabilityPool(address arg0) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function setStabilityPool(address arg0) public payable {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(address(arg0), "StabilityPool cannot be zero address");
        stabilityPool = (address(arg0)) | (uint96(stabilityPool));
        emit UpdatedStabilityPool(address(arg0));
    }
    
    /// @custom:selector    0x9035e4cb
    /// @custom:signature   buyRiskDebtVault(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function buyRiskDebtVault(uint256 arg0) public payable {
        uint256 var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "ReentrancyGuard: reentrant call");
        require(!(store_d == 0x02), "ReentrancyGuard: reentrant call");
        store_d = 0x02;
        require(!(address(stabilityPool)), "buy risky is disabled for public");
        require(msg.sender == (address(stabilityPool)), "buy risky is disabled for public");
        var_a = arg0;
        require(!storage_map_a[var_a], "Vault does not exist");
        require(!(iR > 0), "Vault does not exist");
        var_a = arg0;
        require(!(block.timestamp < storage_map_a[var_a]), "Vault does not exist");
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR))), "Vault does not exist");
        require(!(maiDebt > 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), "Vault does not exist");
    }
    
    /// @custom:selector    0xe985e9c5
    /// @custom:signature   Unresolved_e985e9c5(address arg0) public pure
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_e985e9c5(address arg0) public pure {
        require(arg0 == (address(arg0)));
    }
    
    /// @custom:selector    0xc87b56dd
    /// @custom:signature   tokenURI(uint256 arg0) public view
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function tokenURI(uint256 arg0) public view {
        uint256 var_a = arg0;
        if (address(storage_map_a[var_a])) {
            if (store_ae) {
                require(!(!address(storage_map_a[var_a])), "ERC721: invalid token ID");
                uint256 var_d = var_d + (0x20 + (((0x1f + (store_ae >> 0x01)) / 0x20) * 0x20));
                require(bytes1(store_ae), "ERC721: invalid token ID");
                require(!(bytes1(store_ae) == ((store_ae >> 0x01) < 0x20)), "ERC721: invalid token ID");
                require(bytes1(store_ae), "ERC721: invalid token ID");
                require(!(bytes1(store_ae) == ((store_ae >> 0x01) < 0x20)), "ERC721: invalid token ID");
                var_a = 0x0c;
                require(!(store_ae >> 0x01), "ERC721: invalid token ID");
                require(0x1f < (store_ae >> 0x01), "ERC721: invalid token ID");
                require((0x20 + var_d) + (store_ae >> 0x01) > (0x20 + (0x20 + var_d)), "ERC721: invalid token ID");
                require(!(bytes1(custom)), "ERC721: invalid token ID");
                require(var_d.length > 0, "ERC721: invalid token ID");
                require(arg0 < 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000, "ERC721: invalid token ID");
                require((arg0 / 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000) < 0x04ee2d6d415b85acef8100000000, "ERC721: invalid token ID");
                require(((arg0 / 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000) / 0x04ee2d6d415b85acef8100000000) < 0x2386f26fc10000, "ERC721: invalid token ID");
                require((((arg0 / 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000) / 0x04ee2d6d415b85acef8100000000) / 0x2386f26fc10000) < 0x05f5e100, "ERC721: invalid token ID");
                require(((((arg0 / 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000) / 0x04ee2d6d415b85acef8100000000) / 0x2386f26fc10000) / 0x05f5e100) < 0x2710, "ERC721: invalid token ID");
                require((((((arg0 / 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000) / 0x04ee2d6d415b85acef8100000000) / 0x2386f26fc10000) / 0x05f5e100) / 0x2710) < 0x64, "ERC721: invalid token ID");
                require(((((((arg0 / 0x184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000) / 0x04ee2d6d415b85acef8100000000) / 0x2386f26fc10000) / 0x05f5e100) / 0x2710) / 0x64) < 0x0a, "ERC721: invalid token ID");
                require(!(0x80 > 0xffffffffffffffff), "ERC721: invalid token ID");
                require(!0x80, "ERC721: invalid token ID");
                require(arg0 / 0x0a, "ERC721: invalid token ID");
            }
        }
    }
    
    /// @custom:selector    0x3128ef27
    /// @custom:signature   payBackToken(uint256 arg0, uint256 arg1, uint256 arg2) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    /// @param              arg2 ["uint256", "bytes32", "int256"]
    function payBackToken(uint256 arg0, uint256 arg1, uint256 arg2) public payable {
        uint256 var_a = arg2;
        require(!(!address(storage_map_a[var_a])), "Front end not added");
        var_a = arg2;
        require(0x2710 < storage_map_a[var_a], "Front end not added");
        require(!(0x2710 < storage_map_a[var_a]), "Front end not added");
        var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "must use router");
        require(!(address(version)), "must use router");
        require(msg.sender == (address(version)), "must use router");
        address var_d = msg.sender;
        (bool success, bytes memory ret0) = address(mai).Unresolved_70a08231(var_d); // staticcall
        uint256 var_g = var_g + (uint248(ret0.length + 0x1f));
        require(!(((var_g + ret0.length) - var_g) < 0x20), "Token balance too low");
        require(!(var_g.length < arg1), "Token balance too low");
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        require(!maiDebt > 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        var_a = arg2;
        require(storage_map_a[var_a], "Front end not added");
    }
    
    /// @custom:selector    0xdf987846
    /// @custom:signature   checkCollateralPercentage(uint256 arg0) public payable returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function checkCollateralPercentage(uint256 arg0) public payable returns (uint256) {
        uint256 var_a = arg0;
        require(address(storage_map_a[var_a]));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(storage_map_a[var_a]);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        uint256 var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        require(var_e.length);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        return 0;
    }
    
    /// @custom:selector    0xffc73da7
    /// @custom:signature   setGainRatio(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function setGainRatio(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(!(arg0 < 0x03e8), "gainRatio cannot be less than or equal to 1000");
        gainRatio = arg0;
        emit UpdatedGainRatio(arg0);
    }
    
    /// @custom:selector    0xcf41d6f8
    /// @custom:signature   getPaid() public payable
    function getPaid() public payable {
        require(!(store_d == 0x02), "ReentrancyGuard: reentrant call");
        store_d = 0x02;
        address var_e = msg.sender;
        require(storage_map_x[var_e]);
        var_e = msg.sender;
        storage_map_x[var_e] = 0;
        uint256 var_a = ((0x64 + var_g) - var_g) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0;
        var_g = 0x40 + var_g;
        require(!0 > var_g.length);
        (bool success, bytes memory ret0) = address(collateral).transfer(0);
        require(ret0.length == 0);
        require(!var_m);
        require(!(0 > var_g.length), "");
        require(var_m, "SafeERC20: ERC20 operation did not succeed");
        require(!var_m, "SafeERC20: ERC20 operation did not succeed");
        require(!(((0x80 + var_m) - 0x80) < 0x20), "SafeERC20: ERC20 operation did not succeed");
        require(var_a == var_a, "SafeERC20: ERC20 operation did not succeed");
        require(var_a, "SafeERC20: ERC20 operation did not succeed");
        store_d = 0x01;
        store_d = 0x01;
        require(address(collateral).code.length, "Address: call to non-contract");
        var_g = var_g + (uint248(ret0.length + 0x3f));
        require(!var_g.length);
        require(var_g.length, "Address: call to non-contract");
        require(address(collateral).code.length, "Address: call to non-contract");
        require(!var_g.length, "Don't have anything for you.");
        store_d = 0x01;
    }
    
    /// @custom:selector    0xb26025aa
    /// @custom:signature   getTotalValueLocked() public payable
    function getTotalValueLocked() public payable {
        address var_b = address(this);
        (bool success, bytes memory ret0) = address(collateral).Unresolved_70a08231(var_b); // staticcall
        uint256 var_c = var_c + (uint248(ret0.length + 0x1f));
        require(!((var_c + ret0.length) - var_c) < 0x20);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        var_c = var_c + (uint248(ret0.length + 0x1f));
        require(!((var_c + ret0.length) - var_c) < 0x20);
        require(!(var_c.length) & (decimalDifferenceRaisedToTen > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / var_c.length)));
    }
    
    /// @custom:selector    0x98c3f2db
    /// @custom:signature   getEthPriceSource() public payable returns (uint256)
    function getEthPriceSource() public payable returns (uint256) {
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        uint256 var_b = var_b + (uint248(ret0.length + 0x1f));
        require(!((var_b + ret0.length) - var_b) < 0x20);
        return var_b.length;
    }
    
    /// @custom:selector    0x86375994
    /// @custom:signature   setOpeningFee(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function setOpeningFee(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(!(arg0 > 0x01f4), "setOpeningFee: cannot be more than 5%");
        openingFee = arg0;
        emit UpdatedOpeningFee(arg0);
    }
    
    /// @custom:selector    0x94cd4ba7
    /// @custom:signature   getDebtCeiling() public payable returns (uint256)
    function getDebtCeiling() public payable returns (uint256) {
        address var_b = address(this);
        (bool success, bytes memory ret0) = address(mai).Unresolved_70a08231(var_b); // staticcall
        uint256 var_c = var_c + (uint248(ret0.length + 0x1f));
        require(!((var_c + ret0.length) - var_c) < 0x20);
        return var_c.length;
    }
    
    /// @custom:selector    0x4f6ccce7
    /// @custom:signature   tokenByIndex(uint256 arg0) public view returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function tokenByIndex(uint256 arg0) public view returns (uint256) {
        require(arg0 < totalSupply, "ERC721Enumerable: global index out of bounds");
        require(arg0 < totalSupply, "ERC721Enumerable: global index out of bounds");
        var_a = 0x09;
        return storage_map_af[var_a];
    }
    
    /// @custom:selector    0x07960532
    /// @custom:signature   changeEthPriceSource(address arg0) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function changeEthPriceSource(address arg0) public payable {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(address(arg0), "Ethpricesource cannot be zero address");
        ethPriceSource = (address(arg0)) | (uint96(ethPriceSource));
        emit UpdatedEthPriceSource(address(arg0));
    }
    
    /// @custom:selector    0x6234dc21
    /// @custom:signature   setMinDebt(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function setMinDebt(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        minDebt = arg0;
        emit UpdatedMinDebt(arg0);
    }
    
    /// @custom:selector    0x42842e0e
    /// @custom:signature   Unresolved_42842e0e(address arg0) public pure
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function Unresolved_42842e0e(address arg0) public pure {
        require(arg0 == (address(arg0)));
    }
    
    /// @custom:selector    0xf2fde38b
    /// @custom:signature   transferOwnership(address arg0) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function transferOwnership(address arg0) public payable {
        require(arg0 == (address(arg0)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(address(arg0), "Ownable: new owner is the zero address");
        owner = (address(arg0)) | (uint96(owner));
        emit OwnershipTransferred(address(owner), address(arg0));
    }
    
    /// @custom:selector    0x63b8817c
    /// @custom:signature   getPaid(address arg0) public payable
    /// @param              arg0 ["address", "uint160", "bytes20", "int160"]
    function getPaid(address arg0) public payable {
        require(arg0 == (address(arg0)));
        require(!store_d == 0x02);
        store_d = 0x02;
        address var_a = address(arg0);
        require(storage_map_a[var_a]);
        var_a = address(arg0);
        storage_map_a[var_a] = 0;
        uint256 var_e = ((0x64 + var_f) - var_f) + 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0;
        var_f = 0x40 + var_f;
        require(!0 > var_f.length);
        (bool success, bytes memory ret0) = address(collateral).transfer(0);
        require(ret0.length == 0);
        require(!var_l);
        require(!(0 > var_f.length), "");
        require(var_l, "SafeERC20: ERC20 operation did not succeed");
        require(!var_l, "SafeERC20: ERC20 operation did not succeed");
        require(!(((0x80 + var_l) - 0x80) < 0x20), "SafeERC20: ERC20 operation did not succeed");
        require(var_e == var_e, "SafeERC20: ERC20 operation did not succeed");
        require(var_e, "SafeERC20: ERC20 operation did not succeed");
        store_d = 0x01;
        store_d = 0x01;
        require(address(collateral).code.length, "Address: call to non-contract");
        var_f = var_f + (uint248(ret0.length + 0x3f));
        require(!var_f.length);
        require(var_f.length, "Address: call to non-contract");
        require(address(collateral).code.length, "Address: call to non-contract");
        require(!var_f.length, "Don't have anything for you.");
        store_d = 0x01;
    }
    
    /// @custom:selector    0x6526941b
    /// @custom:signature   setMaxDebt(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function setMaxDebt(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        maxDebt = arg0;
        emit UpdatedMaxDebt(arg0);
    }
    
    /// @custom:selector    0x5f84f302
    /// @custom:signature   setInterestRate(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function setInterestRate(uint256 arg0) public payable {
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        iR = arg0;
        emit UpdatedInterestRate(arg0);
    }
    
    /// @custom:selector    0x4f558e79
    /// @custom:signature   exists(uint256 arg0) public view returns (bool)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function exists(uint256 arg0) public view returns (bool) {
        uint256 var_a = arg0;
        return !(!address(storage_map_a[var_a]));
    }
    
    /// @custom:selector    0x42966c68
    /// @custom:signature   burn(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function burn(uint256 arg0) public payable {
        require(msg.sender == (address(adm)), "Needs to be called by admin");
        address var_b = address(this);
        (bool success, bytes memory ret0) = address(mai).Unresolved_70a08231(var_b); // staticcall
        uint256 var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!(((var_e + ret0.length) - var_e) < 0x20), "burn: Balance not enough");
        require(!(arg0 > var_e.length), "burn: Balance not enough");
        address var_c = address(ref);
        (bool success, bytes memory ret0) = address(mai).{ value: 0 ether }Unresolved_a9059cbb(var_c); // call
        var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        require(var_e.length == var_e.length);
        emit BurnedToken(arg0);
    }
    
    /// @custom:selector    0x5ff09ac2
    /// @custom:signature   removeFrontEnd(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function removeFrontEnd(uint256 arg0) public payable {
        uint256 var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "Front end not added");
        var_a = arg0;
        require(0x2710 < storage_map_a[var_a], "Front end not added");
        require(!(0x2710 < storage_map_a[var_a]), "Front end not added");
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        var_a = arg0;
        require(!(!address(storage_map_a[var_a])), "removeFrontEnd: not a front end");
        var_a = arg0;
        require(storage_map_a[var_a], "removeFrontEnd: not a front end");
        var_a = arg0;
        storage_map_a[var_a] = 0;
        emit RemovedFrontEnd(arg0);
        var_a = arg0;
        require(storage_map_a[var_a], "Front end not added");
    }
    
    /// @custom:selector    0x56572ac0
    /// @custom:signature   checkExtract(uint256 arg0) public payable returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function checkExtract(uint256 arg0) public payable returns (uint256) {
        uint256 var_a = arg0;
        require(!storage_map_a[var_a]);
        var_a = arg0;
        require(address(storage_map_a[var_a]));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(!iR > 0);
        var_a = arg0;
        require(!block.timestamp < storage_map_a[var_a]);
        var_a = 0x4e487b7100000000000000000000000000000000000000000000000000000000;
        require(!(iR) & (storage_map_a[var_a] > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / iR)));
        var_a = arg0;
        require(!storage_map_a[var_a]);
        require(storage_map_a[var_a]);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        uint256 var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        require(var_e.length);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        var_e = var_e + (uint248(ret0.length + 0x1f));
        require(!((var_e + ret0.length) - var_e) < 0x20);
        require(0, "Vault does not exist");
        return 0;
    }
    
    /// @custom:selector    0xe0df5b6f
    /// @custom:signature   Unresolved_e0df5b6f(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function Unresolved_e0df5b6f(uint256 arg0) public payable {
        require(!arg0 > 0xffffffffffffffff);
        require(!(arg0) > 0xffffffffffffffff);
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(bytes1(store_ae));
        require(!(bytes1(store_ae)) == ((store_ae >> 0x01) < 0x20));
        var_e = 0x0c;
        require(arg0);
        require(0x1f < (arg0));
        store_ae = 0x01 + (arg0 + (arg0));
        require(!arg0);
        require(!((0x20 + (0x04 + arg0)) + (arg0)) > (0x20 + (0x04 + arg0)));
        require(!(keccak256(var_e) + ((0x1f + (store_ae >> 0x01)) / 0x20)) > keccak256(var_e));
        require(bytes1(store_ae));
        require(!(bytes1(store_ae)) == (bytes1(store_ae >> 0x01) < 0x20));
        require(!bytes1(store_ae));
        emit UpdatedTokenURI(0x20, bytes1(store_ae >> 0x01), uint248(store_ae));
        require(bytes1(store_ae) == 0x01);
        emit UpdatedTokenURI();
        require(!0 < (bytes1(store_ae >> 0x01)));
        emit UpdatedTokenURI(0x20, bytes1(store_ae >> 0x01));
    }
    
    /// @custom:selector    0xd4a9b2c5
    /// @custom:signature   vaultCollateral(uint256 arg0) public view returns (uint256)
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function vaultCollateral(uint256 arg0) public view returns (uint256) {
        uint256 var_b = arg0;
        return storage_map_i[var_b];
    }
    
    /// @custom:selector    0x687e8c17
    /// @custom:signature   isValidCollateral(uint256 arg0, uint256 arg1) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    /// @param              arg1 ["uint256", "bytes32", "int256"]
    function isValidCollateral(uint256 arg0, uint256 arg1) public payable {
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        uint256 var_b = var_b + (uint248(ret0.length + 0x1f));
        require(!((var_b + ret0.length) - var_b) < 0x20);
        require(var_b.length);
        (bool success, bytes memory ret0) = address(ethPriceSource).latestAnswer(); // staticcall
        var_b = var_b + (uint248(ret0.length + 0x1f));
        require(!((var_b + ret0.length) - var_b) < 0x20);
        require(!(arg0) & (var_b.length > (0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff / arg0)));
    }
    
    /// @custom:selector    0xa9c904b5
    /// @custom:signature   Unresolved_a9c904b5(uint256 arg0) public payable
    /// @param              arg0 ["uint256", "bytes32", "int256"]
    function Unresolved_a9c904b5(uint256 arg0) public payable {
        require(!arg0 > 0xffffffffffffffff);
        require(!(arg0 > 0xffffffffffffffff), "Ownable: caller is not the owner");
        require(!(((var_c + (uint248(0x3f + (arg0 + 0x1f)))) < var_c) | ((var_c + (uint248(0x3f + (arg0 + 0x1f)))) > 0xffffffffffffffff)), "Ownable: caller is not the owner");
        uint256 var_c = var_c + (uint248(0x3f + (arg0 + 0x1f)));
        require(msg.sender == (address(owner)), "Ownable: caller is not the owner");
        require(bytes1(store_ah));
        require(!(bytes1(store_ah)) == ((store_ah >> 0x01) < 0x20));
        var_a = 0x29;
        require(var_c.length);
        require(0x1f < var_c.length);
        store_ah = 0x01 + (var_c.length + var_c.length);
        require(!var_c.length);
        require(!((var_c + 0x20) + var_c.length) > (var_c + 0x20));
        require(!(keccak256(var_a) + ((0x1f + (store_ah >> 0x01)) / 0x20)) > keccak256(var_a));
        require(!0 > var_c.length);
        emit UpdatedOracleName(0x20, var_c.length);
        emit UpdatedOracleName(0x20, var_c.length);
    }
}

ABI

[
  {
    "type": "function",
    "name": "Unresolved_23b872dd",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_379394d0",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "Unresolved_42842e0e",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_a22cb465",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "Unresolved_a9c904b5",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "Unresolved_b88d4fde",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "Unresolved_e0df5b6f",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "Unresolved_e985e9c5",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "_minimumCollateralPercentage",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "accumulatedVaultDebt",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "addFrontEnd",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "adm",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "adminFee",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "approve",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "balanceOf",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "borrowToken",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      },
      {
        "name": "arg2",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "burn",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "buyRiskDebtVault",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "calculateFee",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      },
      {
        "name": "arg2",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "changeEthPriceSource",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "checkCollateralPercentage",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "checkCost",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "checkExtract",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "checkLiquidation",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "checkRiskyVault",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "closingFee",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "collateral",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "createVault",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "custom",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "debtRatio",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "decimalDifferenceRaisedToTen",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "depositCollateral",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "destroyVault",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "ethPriceSource",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "exists",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "gainRatio",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getApproved",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getClosingFee",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "getDebtCeiling",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "getEthPriceSource",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "getPaid",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "getTokenPriceSource",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "getTotalValueLocked",
    "inputs": [],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "iR",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "isValidCollateral",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "lastInterest",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "liquidateVault",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "mai",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "maiDebt",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "maticDebt",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "maxDebt",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "minDebt",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "name",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "openingFee",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "owner",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "ownerOf",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "payBackToken",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      },
      {
        "name": "arg2",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "paybackTokenAll",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      },
      {
        "name": "arg2",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "priceSourceDecimals",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "promoter",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "ref",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "refFee",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "removeFrontEnd",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "renounceOwnership",
    "inputs": [],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "router",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "setAdmin",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setClosingFee",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setDebtRatio",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setFees",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setGainRatio",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setInterestRate",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setMaxDebt",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setMinCollateralRatio",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setMinDebt",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setOpeningFee",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setRef",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setRouter",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setStabilityPool",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "stabilityPool",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "supportsInterface",
    "inputs": [
      {
        "name": "arg0",
        "type": "bytes4"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "symbol",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "string"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "tokenByIndex",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "tokenOfOwnerByIndex",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "tokenPeg",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "type": "function",
    "name": "tokenURI",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalBorrowed",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "totalSupply",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "transferOwnership",
    "inputs": [
      {
        "name": "arg0",
        "type": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "updateFrontEnd",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "updateVaultDebt",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "vaultCollateral",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "vaultCount",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "vaultDebt",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "version",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "withdrawCollateral",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256"
      },
      {
        "name": "arg1",
        "type": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "event",
    "name": "AddedFrontEnd",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Approval",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg2",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ApprovalForAll",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg2",
        "type": "bool",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "BurnedToken",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "CreateVault",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "DepositCollateral",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "OwnershipTransferred",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "RemovedFrontEnd",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "Transfer",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "address",
        "indexed": false
      },
      {
        "name": "arg2",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedAdmin",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedClosingFee",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedCustomURI",
    "inputs": [
      {
        "name": "arg0",
        "type": "bool",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedDebtRatio",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedEthPriceSource",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedFees",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedFrontEnd",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      },
      {
        "name": "arg1",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedGainRatio",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedInterestRate",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedMaxDebt",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedMinCollateralRatio",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedMinDebt",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedOpeningFee",
    "inputs": [
      {
        "name": "arg0",
        "type": "uint256",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedOracleName",
    "inputs": [
      {
        "name": "arg0",
        "type": "string",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedRef",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedRouter",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedStabilityPool",
    "inputs": [
      {
        "name": "arg0",
        "type": "address",
        "indexed": false
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "UpdatedTokenURI",
    "inputs": [
      {
        "name": "arg0",
        "type": "string",
        "indexed": false
      }
    ],
    "anonymous": false
  }
]

UNKNOWN SELECTORS (8)

0x72657373unknown
0x05f5e100unknown
0x0a85bd01unknown
0x780e9d63unknown
0x5b5e139funknown
0x01e18558unknown
0x80ac58cdunknown
0x1e1a5cddunknown
These selectors are not yet in the research database — they are being investigated and will be added as known functions once identified. They are also marked in red in the decompiled Solidity above.

KNOWN CLUSTER ADDRESSES IN THIS BYTECODE (0)

(none)