Contract 0xdf91608E9779dA9e100FA4448B1b3c0b4430dbc8

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x0df88ddcb86a46289f873c756864c44eddab9f582e638e47f36e7e804ad8a501Join_Eth214681592021-11-08 19:00:5829 days 23 hrs ago0x1be537ff2cc291caf8331efcd3466fe7d1c80d4b IN  0xdf91608e9779da9e100fa4448b1b3c0b4430dbc83 FTM0.075695821123
0x71695ccc549a9989c7bd23c4f3e84ab92ebd32349d4f586f353dc1183c0e4044Exit_Eth214678322021-11-08 18:56:1129 days 23 hrs ago0x8442e4fcbba519b4f4c1ea1fce57a5379c55906c IN  0xdf91608e9779da9e100fa4448b1b3c0b4430dbc80 FTM0.029970719958
0xa456e696e447bf8bb8d4742bed25ff6c3342652474eb78eb8767237c23c9ff3bJoin_Eth212845302021-11-06 22:05:3831 days 19 hrs ago0x8442e4fcbba519b4f4c1ea1fce57a5379c55906c IN  0xdf91608e9779da9e100fa4448b1b3c0b4430dbc810 FTM0.034638360552
0x26792546ed59bc1f3b9ea86314a3ad824d16870d3250daf9fb7e96820d56b37fExit_Eth_target ...212841112021-11-06 22:00:1231 days 20 hrs ago0x8442e4fcbba519b4f4c1ea1fce57a5379c55906c IN  0xdf91608e9779da9e100fa4448b1b3c0b4430dbc80 FTM0.012692178452
0xe6e0ab810452a62a58aff008bfa9cf4d14002feb8cc75c470509725ef838a643Join_Eth212836032021-11-06 21:53:1631 days 20 hrs ago0x8442e4fcbba519b4f4c1ea1fce57a5379c55906c IN  0xdf91608e9779da9e100fa4448b1b3c0b4430dbc81 FTM0.053106329013
0x3de53f23ebbb3106e3f1a0814f27ffe4fec83405e46cf73f434195e81b2b2b2fJoin211526552021-11-05 14:28:1533 days 3 hrs ago0x2f4072685772dbaf07012cba6a2e49d58db7e770 IN  0xdf91608e9779da9e100fa4448b1b3c0b4430dbc80 FTM0.063251524952
0x96174d21de0b89fa243e8ee51f419e7ba0e02361922c0451389784fba125d31bJoin211499102021-11-05 13:46:2433 days 4 hrs ago0x55d56e1bb2fc8280a775ccfe9ececcecf1a01562 IN  0xdf91608e9779da9e100fa4448b1b3c0b4430dbc80 FTM0.074727970285
0x2ab72587156597e3ee4d395a8c2fc28dc89c4c7494c9fe3a87bf6e9c4ed413620x61012060197371272021-10-22 5:46:2747 days 12 hrs ago0x55d56e1bb2fc8280a775ccfe9ececcecf1a01562 IN  Contract Creation0 FTM0.400407908098
[ Download CSV Export 
Latest 7 internal transactions
Parent Txn Hash Block From To Value
0x0df88ddcb86a46289f873c756864c44eddab9f582e638e47f36e7e804ad8a501214681592021-11-08 19:00:5829 days 23 hrs ago 0xdf91608e9779da9e100fa4448b1b3c0b4430dbc8 Fantom Finance: Wrapped Fantom Token3 FTM
0x0df88ddcb86a46289f873c756864c44eddab9f582e638e47f36e7e804ad8a501214681592021-11-08 19:00:5829 days 23 hrs ago 0x1be537ff2cc291caf8331efcd3466fe7d1c80d4b 0xdf91608e9779da9e100fa4448b1b3c0b4430dbc83 FTM
0xa456e696e447bf8bb8d4742bed25ff6c3342652474eb78eb8767237c23c9ff3b212845302021-11-06 22:05:3831 days 19 hrs ago 0xdf91608e9779da9e100fa4448b1b3c0b4430dbc8 Fantom Finance: Wrapped Fantom Token10 FTM
0xa456e696e447bf8bb8d4742bed25ff6c3342652474eb78eb8767237c23c9ff3b212845302021-11-06 22:05:3831 days 19 hrs ago 0x8442e4fcbba519b4f4c1ea1fce57a5379c55906c 0xdf91608e9779da9e100fa4448b1b3c0b4430dbc810 FTM
0xe6e0ab810452a62a58aff008bfa9cf4d14002feb8cc75c470509725ef838a643212836032021-11-06 21:53:1631 days 20 hrs ago 0xdf91608e9779da9e100fa4448b1b3c0b4430dbc8 Fantom Finance: Wrapped Fantom Token1 FTM
0xe6e0ab810452a62a58aff008bfa9cf4d14002feb8cc75c470509725ef838a643212836032021-11-06 21:53:1631 days 20 hrs ago 0x8442e4fcbba519b4f4c1ea1fce57a5379c55906c 0xdf91608e9779da9e100fa4448b1b3c0b4430dbc81 FTM
0x2ab72587156597e3ee4d395a8c2fc28dc89c4c7494c9fe3a87bf6e9c4ed41362197371272021-10-22 5:46:2747 days 12 hrs ago 0x55d56e1bb2fc8280a775ccfe9ececcecf1a01562  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CDPManager01

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 11 : CDPManager01.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity 0.7.6;

import '../interfaces/IOracleRegistry.sol';
import '../interfaces/IOracleUsd.sol';
import '../interfaces/IWETH.sol';
import '../interfaces/IVault.sol';
import '../interfaces/ICDPRegistry.sol';
import '../interfaces/IVaultManagerParameters.sol';
import '../interfaces/IVaultParameters.sol';
import '../interfaces/IToken.sol';

import '../helpers/ReentrancyGuard.sol';
import '../helpers/SafeMath.sol';

/**
 * @title CDPManager01
 **/
contract CDPManager01 is ReentrancyGuard {
    using SafeMath for uint;

    IVault public immutable vault;
    IVaultManagerParameters public immutable vaultManagerParameters;
    IOracleRegistry public immutable oracleRegistry;
    ICDPRegistry public immutable cdpRegistry;
    address payable public immutable WETH;

    uint public constant Q112 = 2 ** 112;
    uint public constant DENOMINATOR_1E5 = 1e5;

    /**
     * @dev Trigger when joins are happened
    **/
    event Join(address indexed asset, address indexed owner, uint main, uint usdp);

    /**
     * @dev Trigger when exits are happened
    **/
    event Exit(address indexed asset, address indexed owner, uint main, uint usdp);

    /**
     * @dev Trigger when liquidations are initiated
    **/
    event LiquidationTriggered(address indexed asset, address indexed owner);

    modifier checkpoint(address asset, address owner) {
        _;
        cdpRegistry.checkpoint(asset, owner);
    }

    /**
     * @param _vaultManagerParameters The address of the contract with Vault manager parameters
     * @param _oracleRegistry The address of the oracle registry
     * @param _cdpRegistry The address of the CDP registry
     **/
    constructor(address _vaultManagerParameters, address _oracleRegistry, address _cdpRegistry) {
        require(
            _vaultManagerParameters != address(0) &&
            _oracleRegistry != address(0) &&
            _cdpRegistry != address(0),
                "Unit Protocol: INVALID_ARGS"
        );
        vaultManagerParameters = IVaultManagerParameters(_vaultManagerParameters);
        vault = IVault(IVaultParameters(IVaultManagerParameters(_vaultManagerParameters).vaultParameters()).vault());
        oracleRegistry = IOracleRegistry(_oracleRegistry);
        WETH = IVault(IVaultParameters(IVaultManagerParameters(_vaultManagerParameters).vaultParameters()).vault()).weth();
        cdpRegistry = ICDPRegistry(_cdpRegistry);
    }

    // only accept ETH via fallback from the WETH contract
    receive() external payable {
        require(msg.sender == WETH, "Unit Protocol: RESTRICTED");
    }

    /**
      * @notice Depositing tokens must be pre-approved to Vault address
      * @notice position actually considered as spawned only when debt > 0
      * @dev Deposits collateral and/or borrows USDP
      * @param asset The address of the collateral
      * @param assetAmount The amount of the collateral to deposit
      * @param usdpAmount The amount of USDP token to borrow
      **/
    function join(address asset, uint assetAmount, uint usdpAmount) public nonReentrant checkpoint(asset, msg.sender) {
        require(usdpAmount != 0 || assetAmount != 0, "Unit Protocol: USELESS_TX");

        require(IToken(asset).decimals() <= 18, "Unit Protocol: NOT_SUPPORTED_DECIMALS");

        if (usdpAmount == 0) {

            vault.depositMain(asset, msg.sender, assetAmount);

        } else {

            _ensureOracle(asset);

            bool spawned = vault.debts(asset, msg.sender) != 0;

            if (!spawned) {
                // spawn a position
                vault.spawn(asset, msg.sender, oracleRegistry.oracleTypeByAsset(asset));
            }

            if (assetAmount != 0) {
                vault.depositMain(asset, msg.sender, assetAmount);
            }

            // mint USDP to owner
            vault.borrow(asset, msg.sender, usdpAmount);

            // check collateralization
            _ensurePositionCollateralization(asset, msg.sender);

        }

        // fire an event
        emit Join(asset, msg.sender, assetAmount, usdpAmount);
    }

    /**
      * @dev Deposits ETH and/or borrows USDP
      * @param usdpAmount The amount of USDP token to borrow
      **/
    function join_Eth(uint usdpAmount) external payable {

        if (msg.value != 0) {
            IWETH(WETH).deposit{value: msg.value}();
            require(IWETH(WETH).transfer(msg.sender, msg.value), "Unit Protocol: WETH_TRANSFER_FAILED");
        }

        join(WETH, msg.value, usdpAmount);
    }

    /**
      * @notice Tx sender must have a sufficient USDP balance to pay the debt
      * @dev Withdraws collateral and repays specified amount of debt
      * @param asset The address of the collateral
      * @param assetAmount The amount of the collateral to withdraw
      * @param usdpAmount The amount of USDP to repay
      **/
    function exit(address asset, uint assetAmount, uint usdpAmount) public nonReentrant checkpoint(asset, msg.sender) returns (uint) {

        // check usefulness of tx
        require(assetAmount != 0 || usdpAmount != 0, "Unit Protocol: USELESS_TX");

        uint debt = vault.getTotalDebt(asset, msg.sender);

        // catch full repayment
        if (usdpAmount > debt) { usdpAmount = debt; }

        if (assetAmount == 0) {
            _repay(asset, msg.sender, usdpAmount);
        } else {
            _ensureOracle(asset);

            // withdraw collateral to the owner address
            vault.withdrawMain(asset, msg.sender, assetAmount);

            if (usdpAmount != 0) {
                _repay(asset, msg.sender, usdpAmount);
            }

          if (usdpAmount != debt) {
            vault.update(asset, msg.sender);
            _ensurePositionCollateralization(asset, msg.sender);
          }
        }

        // fire an event
        emit Exit(asset, msg.sender, assetAmount, usdpAmount);

        return usdpAmount;
    }

    /**
      * @notice Tx sender must have a sufficient USDP balance to pay the debt
      * @dev Withdraws collateral and repays all the debt
      * @param asset The address of the collateral
      * @param withdraw Whether the collateral be withdrawn or not
      **/
    function repayAll(address asset, bool withdraw) public nonReentrant checkpoint(asset, msg.sender) returns (uint) {

        uint debt = vault.debts(asset, msg.sender);
        uint fee = vault.getFee(asset, msg.sender);

        // check usefulness of tx
        require(debt != 0 || fee != 0, "Unit Protocol: USELESS_TX");

        if (fee != 0) {
            vault.chargeFee(vault.usdp(), msg.sender, fee);
        }

        if (debt != 0) {
            vault.repay(asset, msg.sender, debt);
        }

        uint assetAmount;

        if (withdraw) {
            assetAmount = vault.collaterals(asset, msg.sender);
            vault.withdrawMain(asset, msg.sender, assetAmount);
        }

        vault.destroy(asset, msg.sender);

        // fire an event
        emit Exit(asset, msg.sender, assetAmount, debt.add(fee));

        return debt.add(fee);
    }

    /**
      * @notice Withdraws WETH and converts to ETH
      * @param ethAmount ETH amount to withdraw
      * @param usdpAmount The amount of USDP token to repay
      **/
    function exit_Eth(uint ethAmount, uint usdpAmount) public returns (uint) {
        usdpAmount = exit(WETH, ethAmount, usdpAmount);
        require(IWETH(WETH).transferFrom(msg.sender, address(this), ethAmount), "Unit Protocol: WETH_TRANSFER_FROM_FAILED");
        IWETH(WETH).withdraw(ethAmount);
        (bool success, ) = msg.sender.call{value:ethAmount}("");
        require(success, "Unit Protocol: ETH_TRANSFER_FAILED");
        return usdpAmount;
    }

    // decreases debt
    function _repay(address asset, address owner, uint usdpAmount) internal {
        uint fee = vault.getFee(asset, owner);

        if (fee > usdpAmount) {
          fee = usdpAmount;
        }

        usdpAmount = usdpAmount - fee;

        vault.chargeFee(vault.usdp(), owner, fee);
        vault.decreaseFee(asset, owner, fee);

        // burn USDP from the owner's balance
        uint debtAfter = vault.repay(asset, owner, usdpAmount);
        if (debtAfter == 0) {
            // clear unused storage
            vault.destroy(asset, owner);
        }
    }

    function _ensurePositionCollateralization(address asset, address owner) internal view {
        // collateral value of the position in USD
        uint usdValue_q112 = getCollateralUsdValue_q112(asset, owner);

        // USD limit of the position
        uint usdLimit = usdValue_q112 * vaultManagerParameters.initialCollateralRatio(asset) / Q112 / 100;

        // revert if collateralization is not enough
        require(vault.getTotalDebt(asset, owner) <= usdLimit, "Unit Protocol: UNDERCOLLATERALIZED");
    }

    // Liquidation Trigger

    /**
     * @dev Triggers liquidation of a position
     * @param asset The address of the collateral token of a position
     * @param owner The owner of the position
     **/
    function triggerLiquidation(address asset, address owner) external nonReentrant {

        _ensureOracle(asset);

        // USD value of the collateral
        uint usdValue_q112 = getCollateralUsdValue_q112(asset, owner);

        // reverts if a position is not liquidatable
        require(_isLiquidatablePosition(asset, owner, usdValue_q112), "Unit Protocol: SAFE_POSITION");

        uint liquidationDiscount_q112 = usdValue_q112.mul(
            vaultManagerParameters.liquidationDiscount(asset)
        ).div(DENOMINATOR_1E5);

        uint initialLiquidationPrice = usdValue_q112.sub(liquidationDiscount_q112).div(Q112);

        // sends liquidation command to the Vault
        vault.triggerLiquidation(asset, owner, initialLiquidationPrice);

        // fire an liquidation event
        emit LiquidationTriggered(asset, owner);
    }

    function getCollateralUsdValue_q112(address asset, address owner) public view returns (uint) {
        return IOracleUsd(oracleRegistry.oracleByAsset(asset)).assetToUsd(asset, vault.collaterals(asset, owner));
    }

    /**
     * @dev Determines whether a position is liquidatable
     * @param asset The address of the collateral
     * @param owner The owner of the position
     * @param usdValue_q112 Q112-encoded USD value of the collateral
     * @return boolean value, whether a position is liquidatable
     **/
    function _isLiquidatablePosition(
        address asset,
        address owner,
        uint usdValue_q112
    ) internal view returns (bool) {
        uint debt = vault.getTotalDebt(asset, owner);

        // position is collateralized if there is no debt
        if (debt == 0) return false;

        return debt.mul(100).mul(Q112).div(usdValue_q112) >= vaultManagerParameters.liquidationRatio(asset);
    }

    function _ensureOracle(address asset) internal view {
        uint oracleType = oracleRegistry.oracleTypeByAsset(asset);
        require(oracleType != 0, "Unit Protocol: INVALID_ORACLE_TYPE");
        address oracle = oracleRegistry.oracleByType(oracleType);
        require(oracle != address(0), "Unit Protocol: DISABLED_ORACLE");
    }

    /**
     * @dev Determines whether a position is liquidatable
     * @param asset The address of the collateral
     * @param owner The owner of the position
     * @return boolean value, whether a position is liquidatable
     **/
    function isLiquidatablePosition(
        address asset,
        address owner
    ) public view returns (bool) {
        uint usdValue_q112 = getCollateralUsdValue_q112(asset, owner);

        return _isLiquidatablePosition(asset, owner, usdValue_q112);
    }

    /**
     * @dev Calculates current utilization ratio
     * @param asset The address of the collateral
     * @param owner The owner of the position
     * @return utilization ratio
     **/
    function utilizationRatio(
        address asset,
        address owner
    ) public view returns (uint) {
        uint debt = vault.getTotalDebt(asset, owner);
        if (debt == 0) return 0;

        uint usdValue_q112 = getCollateralUsdValue_q112(asset, owner);

        return debt.mul(100).mul(Q112).div(usdValue_q112);
    }


    /**
     * @dev Calculates liquidation price
     * @param asset The address of the collateral
     * @param owner The owner of the position
     * @return Q112-encoded liquidation price
     **/
    function liquidationPrice_q112(
        address asset,
        address owner
    ) external view returns (uint) {

        uint debt = vault.getTotalDebt(asset, owner);
        if (debt == 0) return uint(-1);

        uint collateralLiqPrice = debt.mul(100).mul(Q112).div(vaultManagerParameters.liquidationRatio(asset));

        require(IToken(asset).decimals() <= 18, "Unit Protocol: NOT_SUPPORTED_DECIMALS");

        return collateralLiqPrice / vault.collaterals(asset, owner) / 10 ** (18 - IToken(asset).decimals());
    }
}

File 2 of 11 : IOracleRegistry.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity ^0.7.6;
pragma abicoder v2;

interface IOracleRegistry {

    struct Oracle {
        uint oracleType;
        address oracleAddress;
    }

    function WETH (  ) external view returns ( address );
    function getKeydonixOracleTypes (  ) external view returns ( uint256[] memory );
    function getOracles (  ) external view returns ( Oracle[] memory foundOracles );
    function keydonixOracleTypes ( uint256 ) external view returns ( uint256 );
    function maxOracleType (  ) external view returns ( uint256 );
    function oracleByAsset ( address asset ) external view returns ( address );
    function oracleByType ( uint256 ) external view returns ( address );
    function oracleTypeByAsset ( address ) external view returns ( uint256 );
    function oracleTypeByOracle ( address ) external view returns ( uint256 );
    function setKeydonixOracleTypes ( uint256[] memory _keydonixOracleTypes ) external;
    function setOracle ( uint256 oracleType, address oracle ) external;
    function setOracleTypeForAsset ( address asset, uint256 oracleType ) external;
    function setOracleTypeForAssets ( address[] memory assets, uint256 oracleType ) external;
    function unsetOracle ( uint256 oracleType ) external;
    function unsetOracleForAsset ( address asset ) external;
    function unsetOracleForAssets ( address[] memory assets ) external;
    function vaultParameters (  ) external view returns ( address );
}

File 3 of 11 : IOracleUsd.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity ^0.7.6;

interface IOracleUsd {

    // returns Q112-encoded value
    // returned value 10**18 * 2**112 is $1
    function assetToUsd(address asset, uint amount) external view returns (uint);
}

File 4 of 11 : IWETH.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity ^0.7.6;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 5 of 11 : IVault.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity ^0.7.6;

interface IVault {
    function DENOMINATOR_1E2 (  ) external view returns ( uint256 );
    function DENOMINATOR_1E5 (  ) external view returns ( uint256 );
    function borrow ( address asset, address user, uint256 amount ) external returns ( uint256 );
    function changeOracleType ( address asset, address user, uint256 newOracleType ) external;
    function chargeFee ( address asset, address user, uint256 amount ) external;
    function decreaseFee ( address asset, address user, uint amount ) external;
    function col (  ) external view returns ( address );
    function colToken ( address, address ) external view returns ( uint256 );
    function collaterals ( address, address ) external view returns ( uint256 );
    function debts ( address, address ) external view returns ( uint256 );
    function getFee ( address, address ) external view returns ( uint256 );
    function depositCol ( address asset, address user, uint256 amount ) external;
    function depositEth ( address user ) external payable;
    function depositMain ( address asset, address user, uint256 amount ) external;
    function destroy ( address asset, address user ) external;
    function getTotalDebt ( address asset, address user ) external view returns ( uint256 );
    function lastUpdate ( address, address ) external view returns ( uint256 );
    function liquidate ( address asset, address positionOwner, uint256 mainAssetToLiquidator, uint256 mainAssetToPositionOwner, uint256 repayment, uint256 penalty, address liquidator ) external;
    function liquidationBlock ( address, address ) external view returns ( uint256 );
    function liquidationFee ( address, address ) external view returns ( uint256 );
    function liquidationPrice ( address, address ) external view returns ( uint256 );
    function oracleType ( address, address ) external view returns ( uint256 );
    function repay ( address asset, address user, uint256 amount ) external returns ( uint256 );
    function spawn ( address asset, address user, uint256 _oracleType ) external;
    function stabilityFee ( address, address ) external view returns ( uint256 );
    function tokenDebts ( address ) external view returns ( uint256 );
    function triggerLiquidation ( address asset, address positionOwner, uint256 initialPrice ) external;
    function update ( address asset, address user ) external;
    function usdp (  ) external view returns ( address );
    function vaultParameters (  ) external view returns ( address );
    function weth (  ) external view returns ( address payable );
    function withdrawCol ( address asset, address user, uint256 amount ) external;
    function withdrawEth ( address user, uint256 amount ) external;
    function withdrawMain ( address asset, address user, uint256 amount ) external;
}

File 6 of 11 : ICDPRegistry.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity ^0.7.6;
pragma experimental ABIEncoderV2;

interface ICDPRegistry {

    struct CDP {
        address asset;
        address owner;
    }

    function batchCheckpoint ( address[] calldata assets, address[] calldata owners ) external;
    function batchCheckpointForAsset ( address asset, address[] calldata owners ) external;
    function checkpoint ( address asset, address owner ) external;
    function cr (  ) external view returns ( address );
    function getAllCdps (  ) external view returns ( CDP[] memory r );
    function getCdpsByCollateral ( address asset ) external view returns ( CDP[] memory cdps );
    function getCdpsByOwner ( address owner ) external view returns ( CDP[] memory r );
    function getCdpsCount (  ) external view returns ( uint256 totalCdpCount );
    function getCdpsCountForCollateral ( address asset ) external view returns ( uint256 );
    function isAlive ( address asset, address owner ) external view returns ( bool );
    function isListed ( address asset, address owner ) external view returns ( bool );
    function vault (  ) external view returns ( address );
}

File 7 of 11 : IVaultManagerParameters.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity ^0.7.6;

interface IVaultManagerParameters {
    function devaluationPeriod ( address ) external view returns ( uint256 );
    function initialCollateralRatio ( address ) external view returns ( uint256 );
    function liquidationDiscount ( address ) external view returns ( uint256 );
    function liquidationRatio ( address ) external view returns ( uint256 );
    function maxColPercent ( address ) external view returns ( uint256 );
    function minColPercent ( address ) external view returns ( uint256 );
    function setColPartRange ( address asset, uint256 min, uint256 max ) external;
    function setCollateral (
        address asset,
        uint256 stabilityFeeValue,
        uint256 liquidationFeeValue,
        uint256 initialCollateralRatioValue,
        uint256 liquidationRatioValue,
        uint256 liquidationDiscountValue,
        uint256 devaluationPeriodValue,
        uint256 usdpLimit,
        uint256[] calldata oracles,
        uint256 minColP,
        uint256 maxColP
    ) external;
    function setDevaluationPeriod ( address asset, uint256 newValue ) external;
    function setInitialCollateralRatio ( address asset, uint256 newValue ) external;
    function setLiquidationDiscount ( address asset, uint256 newValue ) external;
    function setLiquidationRatio ( address asset, uint256 newValue ) external;
    function vaultParameters (  ) external view returns ( address );
}

File 8 of 11 : IVaultParameters.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity ^0.7.6;

interface IVaultParameters {
    function canModifyVault ( address ) external view returns ( bool );
    function foundation (  ) external view returns ( address );
    function isManager ( address ) external view returns ( bool );
    function isOracleTypeEnabled ( uint256, address ) external view returns ( bool );
    function liquidationFee ( address ) external view returns ( uint256 );
    function setCollateral ( address asset, uint256 stabilityFeeValue, uint256 liquidationFeeValue, uint256 usdpLimit, uint256[] calldata oracles ) external;
    function setFoundation ( address newFoundation ) external;
    function setLiquidationFee ( address asset, uint256 newValue ) external;
    function setManager ( address who, bool permit ) external;
    function setOracleType ( uint256 _type, address asset, bool enabled ) external;
    function setStabilityFee ( address asset, uint256 newValue ) external;
    function setTokenDebtLimit ( address asset, uint256 limit ) external;
    function setVaultAccess ( address who, bool permit ) external;
    function stabilityFee ( address ) external view returns ( uint256 );
    function tokenDebtLimit ( address ) external view returns ( uint256 );
    function vault (  ) external view returns ( address );
    function vaultParameters (  ) external view returns ( address );
}

File 9 of 11 : IToken.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity ^0.7.6;

interface IToken {
    function decimals() external view returns (uint8);
}

File 10 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.7.6;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 11 of 11 : SafeMath.sol
// SPDX-License-Identifier: bsl-1.1

/*
  Copyright 2020 Unit Protocol: Artem Zakharov ([email protected]).
*/
pragma solidity 0.7.6;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

    /**
    * @dev Multiplies two numbers, throws on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        if (a == 0) {
            return 0;
        }
        c = a * b;
        assert(c / a == b);
        return c;
    }

    /**
    * @dev Integer division of two numbers, truncating the quotient.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
    * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    /**
    * @dev Adds two numbers, throws on overflow.
    */
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        c = a + b;
        assert(c >= a);
        return c;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_vaultManagerParameters","type":"address"},{"internalType":"address","name":"_oracleRegistry","type":"address"},{"internalType":"address","name":"_cdpRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"main","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdp","type":"uint256"}],"name":"Exit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"main","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdp","type":"uint256"}],"name":"Join","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"LiquidationTriggered","type":"event"},{"inputs":[],"name":"DENOMINATOR_1E5","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Q112","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cdpRegistry","outputs":[{"internalType":"contract ICDPRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"assetAmount","type":"uint256"},{"internalType":"uint256","name":"usdpAmount","type":"uint256"}],"name":"exit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ethAmount","type":"uint256"},{"internalType":"uint256","name":"usdpAmount","type":"uint256"}],"name":"exit_Eth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"getCollateralUsdValue_q112","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"isLiquidatablePosition","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"assetAmount","type":"uint256"},{"internalType":"uint256","name":"usdpAmount","type":"uint256"}],"name":"join","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdpAmount","type":"uint256"}],"name":"join_Eth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"liquidationPrice_q112","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracleRegistry","outputs":[{"internalType":"contract IOracleRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"bool","name":"withdraw","type":"bool"}],"name":"repayAll","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"triggerLiquidation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"utilizationRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IVault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultManagerParameters","outputs":[{"internalType":"contract IVaultManagerParameters","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101206040523480156200001257600080fd5b506040516200316138038062003161833981810160405260608110156200003857600080fd5b508051602082015160409092015160016000559091906001600160a01b038316158015906200006f57506001600160a01b03821615155b80156200008457506001600160a01b03811615155b620000d6576040805162461bcd60e51b815260206004820152601b60248201527f556e69742050726f746f636f6c3a20494e56414c49445f415247530000000000604482015290519081900360640190fd5b826001600160a01b031660a0816001600160a01b031660601b81525050826001600160a01b031663aca345ee6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200012d57600080fd5b505afa15801562000142573d6000803e3d6000fd5b505050506040513d60208110156200015957600080fd5b50516040805163fbfa77cf60e01b815290516001600160a01b039092169163fbfa77cf91600480820192602092909190829003018186803b1580156200019e57600080fd5b505afa158015620001b3573d6000803e3d6000fd5b505050506040513d6020811015620001ca57600080fd5b50516001600160601b0319606091821b81166080529083901b1660c05260408051635651a2f760e11b815290516001600160a01b0385169163aca345ee916004808301926020929190829003018186803b1580156200022857600080fd5b505afa1580156200023d573d6000803e3d6000fd5b505050506040513d60208110156200025457600080fd5b50516040805163fbfa77cf60e01b815290516001600160a01b039092169163fbfa77cf91600480820192602092909190829003018186803b1580156200029957600080fd5b505afa158015620002ae573d6000803e3d6000fd5b505050506040513d6020811015620002c557600080fd5b505160408051633fc8cef360e01b815290516001600160a01b0390921691633fc8cef391600480820192602092909190829003018186803b1580156200030a57600080fd5b505afa1580156200031f573d6000803e3d6000fd5b505050506040513d60208110156200033657600080fd5b50516001600160601b0319606091821b81166101005291901b1660e052505060805160601c60a05160601c60c05160601c60e05160601c6101005160601c612cd26200048f6000398061011252806109cf5280610a645280610b195280610c875280611ff0528061204652806120f8525080610c635280610fe952806116ac5280611f475250806108055280610c385280611c90528061280c52806128e55250806105535280610cab528061181c528061237152806129ee525080610492528061074e52806108d25280610b4f5280610da15280610e415280610efb52806110e452806111ba528061129352806112c252806113b95280611476528061155052806115b552806118d45280611b0b5280611be25280611c5f5280611d9d5280611e3e528061220552806122b6528061243052806124ec528061251b528061260d52806126af528061276a5280612a9c5250612cd26000f3fe6080604052600436106101025760003560e01c8063ab2a2a8211610095578063d12f0bc011610064578063d12f0bc014610393578063d4796d12146103ce578063ea36380a14610409578063eb70d35814610448578063fbfa77cf1461047857610186565b8063ab2a2a8214610315578063ad5c46481461032a578063b7ebdc0c1461033f578063bbdc95311461035457610186565b80633bf7a83e116100d15780633bf7a83e1461027f5780634265607c146102945780634bb93ab1146102cf578063971182c61461030057610186565b806312dc1dcc1461018b578063134a02dd146101d8578063252d040e1461022757806325df90581461026257610186565b3661018657336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610184576040805162461bcd60e51b815260206004820152601960248201527f556e69742050726f746f636f6c3a205245535452494354454400000000000000604482015290519081900360640190fd5b005b600080fd5b34801561019757600080fd5b506101c6600480360360408110156101ae57600080fd5b506001600160a01b038135811691602001351661048d565b60408051918252519081900360200190f35b3480156101e457600080fd5b50610213600480360360408110156101fb57600080fd5b506001600160a01b03813581169160200135166107df565b604080519115158252519081900360200190f35b34801561023357600080fd5b506101c66004803603604081101561024a57600080fd5b506001600160a01b0381358116916020013516610801565b6101846004803603602081101561027857600080fd5b50356109c7565b34801561028b57600080fd5b506101c6610b42565b3480156102a057600080fd5b506101c6600480360360408110156102b757600080fd5b506001600160a01b0381358116916020013516610b4a565b3480156102db57600080fd5b506102e4610c36565b604080516001600160a01b039092168252519081900360200190f35b34801561030c57600080fd5b506101c6610c5a565b34801561032157600080fd5b506102e4610c61565b34801561033657600080fd5b506102e4610c85565b34801561034b57600080fd5b506102e4610ca9565b34801561036057600080fd5b506101c66004803603606081101561037757600080fd5b506001600160a01b038135169060208101359060400135610ccd565b34801561039f57600080fd5b506101c6600480360360408110156103b657600080fd5b506001600160a01b038135169060200135151561108e565b3480156103da57600080fd5b50610184600480360360408110156103f157600080fd5b506001600160a01b0381358116916020013516611750565b34801561041557600080fd5b506101846004803603606081101561042c57600080fd5b506001600160a01b0381351690602081013590604001356119b6565b34801561045457600080fd5b506101c66004803603604081101561046b57600080fd5b5080359060200135611fe9565b34801561048457600080fd5b506102e4612203565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d6446d4385856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561050e57600080fd5b505afa158015610522573d6000803e3d6000fd5b505050506040513d602081101561053857600080fd5b505190508061054c576000199150506107d9565b60006106097f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633bffbbe2876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156105be57600080fd5b505afa1580156105d2573d6000803e3d6000fd5b505050506040513d60208110156105e857600080fd5b5051610603600160701b6105fd866064612227565b90612227565b9061224c565b90506012856001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561064657600080fd5b505afa15801561065a573d6000803e3d6000fd5b505050506040513d602081101561067057600080fd5b505160ff1611156106b25760405162461bcd60e51b8152600401808060200182810382526025815260200180612c786025913960400191505060405180910390fd5b846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156106eb57600080fd5b505afa1580156106ff573d6000803e3d6000fd5b505050506040513d602081101561071557600080fd5b50516040805163728f08cf60e11b81526001600160a01b0388811660048301528781166024830152915160129390930360ff16600a0a927f00000000000000000000000000000000000000000000000000000000000000009092169163e51e119e91604480820192602092909190829003018186803b15801561079757600080fd5b505afa1580156107ab573d6000803e3d6000fd5b505050506040513d60208110156107c157600080fd5b505182816107cb57fe5b04816107d357fe5b04925050505b92915050565b6000806107ec8484610801565b90506107f98484836122b1565b949350505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338163032846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561087057600080fd5b505afa158015610884573d6000803e3d6000fd5b505050506040513d602081101561089a57600080fd5b50516040805163728f08cf60e11b81526001600160a01b03868116600483015285811660248301529151928216926310e556989287927f00000000000000000000000000000000000000000000000000000000000000009091169163e51e119e91604480820192602092909190829003018186803b15801561091b57600080fd5b505afa15801561092f573d6000803e3d6000fd5b505050506040513d602081101561094557600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0390931660048401526024830191909152516044808301926020929190829003018186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b50519392505050565b3415610b14577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610a2857600080fd5b505af1158015610a3c573d6000803e3d6000fd5b50506040805163a9059cbb60e01b815233600482015234602482015290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016945063a9059cbb9350604480830193506020928290030181600087803b158015610aad57600080fd5b505af1158015610ac1573d6000803e3d6000fd5b505050506040513d6020811015610ad757600080fd5b5051610b145760405162461bcd60e51b8152600401808060200182810382526023815260200180612bef6023913960400191505060405180910390fd5b610b3f7f000000000000000000000000000000000000000000000000000000000000000034836119b6565b50565b600160701b81565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d6446d4385856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b158015610bcb57600080fd5b505afa158015610bdf573d6000803e3d6000fd5b505050506040513d6020811015610bf557600080fd5b5051905080610c085760009150506107d9565b6000610c148585610801565b9050610c2d81610603600160701b6105fd866064612227565b95945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b620186a081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600060026000541415610d15576040805162461bcd60e51b815260206004820152601f6024820152600080516020612ba7833981519152604482015290519081900360640190fd5b6002600055833384151580610d2957508315155b610d76576040805162461bcd60e51b81526020600482015260196024820152780aadcd2e840a0e4dee8dec6ded87440aaa68a988aa6a6bea8b603b1b604482015290519081900360640190fd5b6040805163d6446d4360e01b81526001600160a01b03888116600483015233602483015291516000927f0000000000000000000000000000000000000000000000000000000000000000169163d6446d43916044808301926020929190829003018186803b158015610de757600080fd5b505afa158015610dfb573d6000803e3d6000fd5b505050506040513d6020811015610e1157600080fd5b5051905080851115610e21578094505b85610e3657610e3187338761242c565b610f9b565b610e3f87612808565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638d7cad888833896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015610ec757600080fd5b505af1158015610edb573d6000803e3d6000fd5b5050505084600014610ef257610ef287338761242c565b808514610f9b577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c640752d88336040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b158015610f7957600080fd5b505af1158015610f8d573d6000803e3d6000fd5b50505050610f9b87336129d5565b6040805187815260208101879052815133926001600160a01b038b16927fa702ae6024e8b4c2b0eb162b1453dacb93cf6922f5a2d7236faed898c21148f8929081900390910190a3849350507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb55b7fc83836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561106757600080fd5b505af115801561107b573d6000803e3d6000fd5b5050600160005550929695505050505050565b6000600260005414156110d6576040805162461bcd60e51b815260206004820152601f6024820152600080516020612ba7833981519152604482015290519081900360640190fd5b6002600081905550823360007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634ac1c33d87336040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561116057600080fd5b505afa158015611174573d6000803e3d6000fd5b505050506040513d602081101561118a57600080fd5b505160408051631fdd331360e31b81526001600160a01b03898116600483015233602483015291519293506000927f00000000000000000000000000000000000000000000000000000000000000009092169163fee9989891604480820192602092909190829003018186803b15801561120357600080fd5b505afa158015611217573d6000803e3d6000fd5b505050506040513d602081101561122d57600080fd5b505190508115158061123e57508015155b61128b576040805162461bcd60e51b81526020600482015260196024820152780aadcd2e840a0e4dee8dec6ded87440aaa68a988aa6a6bea8b603b1b604482015290519081900360640190fd5b80156113b1577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633d1aa9637f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166374e6076c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561131957600080fd5b505afa15801561132d573d6000803e3d6000fd5b505050506040513d602081101561134357600080fd5b5051604080516001600160e01b031960e085901b1681526001600160a01b0390921660048301523360248301526044820185905251606480830192600092919082900301818387803b15801561139857600080fd5b505af11580156113ac573d6000803e3d6000fd5b505050505b811561146c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631da649cf8833856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b15801561143f57600080fd5b505af1158015611453573d6000803e3d6000fd5b505050506040513d602081101561146957600080fd5b50505b600086156115b3577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e51e119e89336040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156114f257600080fd5b505afa158015611506573d6000803e3d6000fd5b505050506040513d602081101561151c57600080fd5b5051604080516311af95b160e31b81526001600160a01b038b811660048301523360248301526044820184905291519293507f000000000000000000000000000000000000000000000000000000000000000090911691638d7cad889160648082019260009290919082900301818387803b15801561159a57600080fd5b505af11580156115ae573d6000803e3d6000fd5b505050505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166362b40f9f89336040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561163357600080fd5b505af1158015611647573d6000803e3d6000fd5b5033925050506001600160a01b0389167fa702ae6024e8b4c2b0eb162b1453dacb93cf6922f5a2d7236faed898c21148f8836116838787612b87565b6040805192835260208301919091528051918290030190a36116a58383612b87565b95505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb55b7fc83836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b15801561172a57600080fd5b505af115801561173e573d6000803e3d6000fd5b50506001600055509295945050505050565b60026000541415611796576040805162461bcd60e51b815260206004820152601f6024820152600080516020612ba7833981519152604482015290519081900360640190fd5b60026000556117a482612808565b60006117b08383610801565b90506117bd8383836122b1565b61180e576040805162461bcd60e51b815260206004820152601c60248201527f556e69742050726f746f636f6c3a20534146455f504f534954494f4e00000000604482015290519081900360640190fd5b60006118ba620186a06106037f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166315a04ea2886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561188757600080fd5b505afa15801561189b573d6000803e3d6000fd5b505050506040513d60208110156118b157600080fd5b50518590612227565b905060006118d0600160701b6106038585612b94565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663742a326e8686846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561195a57600080fd5b505af115801561196e573d6000803e3d6000fd5b50506040516001600160a01b038088169350881691507f5b79a897d30813a62a1f95ba180d3320d3701d96605708b81105e00719a069e490600090a350506001600055505050565b600260005414156119fc576040805162461bcd60e51b815260206004820152601f6024820152600080516020612ba7833981519152604482015290519081900360640190fd5b6002600055823382151580611a1057508315155b611a5d576040805162461bcd60e51b81526020600482015260196024820152780aadcd2e840a0e4dee8dec6ded87440aaa68a988aa6a6bea8b603b1b604482015290519081900360640190fd5b6012856001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015611a9857600080fd5b505afa158015611aac573d6000803e3d6000fd5b505050506040513d6020811015611ac257600080fd5b505160ff161115611b045760405162461bcd60e51b8152600401808060200182810382526025815260200180612c786025913960400191505060405180910390fd5b82611bae577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee18359e8633876040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611b9157600080fd5b505af1158015611ba5573d6000803e3d6000fd5b50505050611efd565b611bb785612808565b60408051634ac1c33d60e01b81526001600160a01b03878116600483015233602483015291516000927f00000000000000000000000000000000000000000000000000000000000000001691634ac1c33d916044808301926020929190829003018186803b158015611c2857600080fd5b505afa158015611c3c573d6000803e3d6000fd5b505050506040513d6020811015611c5257600080fd5b50511515905080611d95577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c6d894f087337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fbcd55318b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611cfb57600080fd5b505afa158015611d0f573d6000803e3d6000fd5b505050506040513d6020811015611d2557600080fd5b5051604080516001600160e01b031960e087901b1681526001600160a01b03948516600482015292909316602483015260448201529051606480830192600092919082900301818387803b158015611d7c57600080fd5b505af1158015611d90573d6000803e3d6000fd5b505050505b8415611e3c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee18359e8733886040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611e2357600080fd5b505af1158015611e37573d6000803e3d6000fd5b505050505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635224372c8733876040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611ec457600080fd5b505af1158015611ed8573d6000803e3d6000fd5b505050506040513d6020811015611eee57600080fd5b50611efb905086336129d5565b505b6040805185815260208101859052815133926001600160a01b038916927f6423b6056e64b3b29cb2d342362b47c26fa8d6877da27ea152354060df19b9bc929081900390910190a37f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb55b7fc83836040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b158015611fc557600080fd5b505af1158015611fd9573d6000803e3d6000fd5b5050600160005550505050505050565b60006120167f00000000000000000000000000000000000000000000000000000000000000008484610ccd565b604080516323b872dd60e01b81523360048201523060248201526044810186905290519193506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916323b872dd916064808201926020929091908290030181600087803b15801561208f57600080fd5b505af11580156120a3573d6000803e3d6000fd5b505050506040513d60208110156120b957600080fd5b50516120f65760405162461bcd60e51b8152600401808060200182810382526028815260200180612bc76028913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561215c57600080fd5b505af1158015612170573d6000803e3d6000fd5b50506040516000925033915085908381818185875af1925050503d80600081146121b6576040519150601f19603f3d011682016040523d82523d6000602084013e6121bb565b606091505b50509050806121fb5760405162461bcd60e51b8152600401808060200182810382526022815260200180612c346022913960400191505060405180910390fd5b509092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600082612236575060006107d9565b508181028183828161224457fe5b04146107d957fe5b6000816122a0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816122a957fe5b049392505050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d6446d4386866040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561233257600080fd5b505afa158015612346573d6000803e3d6000fd5b505050506040513d602081101561235c57600080fd5b505190508061236f576000915050612425565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633bffbbe2866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156123dc57600080fd5b505afa1580156123f0573d6000803e3d6000fd5b505050506040513d602081101561240657600080fd5b505161241f84610603600160701b6105fd866064612227565b10159150505b9392505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fee9989885856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b1580156124ac57600080fd5b505afa1580156124c0573d6000803e3d6000fd5b505050506040513d60208110156124d657600080fd5b50519050818111156124e55750805b80820391507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633d1aa9637f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166374e6076c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561257257600080fd5b505afa158015612586573d6000803e3d6000fd5b505050506040513d602081101561259c57600080fd5b5051604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291871660248301526044820185905251606480830192600092919082900301818387803b1580156125f357600080fd5b505af1158015612607573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166368c173748585846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561269357600080fd5b505af11580156126a7573d6000803e3d6000fd5b5050505060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316631da649cf8686866040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b15801561273557600080fd5b505af1158015612749573d6000803e3d6000fd5b505050506040513d602081101561275f57600080fd5b5051905080612801577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166362b40f9f86866040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b0316815260200192505050600060405180830381600087803b1580156127e857600080fd5b505af11580156127fc573d6000803e3d6000fd5b505050505b5050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fbcd5531836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561287757600080fd5b505afa15801561288b573d6000803e3d6000fd5b505050506040513d60208110156128a157600080fd5b50519050806128e15760405162461bcd60e51b8152600401808060200182810382526022815260200180612c126022913960400191505060405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c5807dc6836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561294757600080fd5b505afa15801561295b573d6000803e3d6000fd5b505050506040513d602081101561297157600080fd5b505190506001600160a01b0381166129d0576040805162461bcd60e51b815260206004820152601e60248201527f556e69742050726f746f636f6c3a2044495341424c45445f4f5241434c450000604482015290519081900360640190fd5b505050565b60006129e18383610801565b905060006064600160701b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b85c4496876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612a5957600080fd5b505afa158015612a6d573d6000803e3d6000fd5b505050506040513d6020811015612a8357600080fd5b5051840281612a8e57fe5b0481612a9657fe5b049050807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d6446d4386866040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b158015612b1857600080fd5b505afa158015612b2c573d6000803e3d6000fd5b505050506040513d6020811015612b4257600080fd5b50511115612b815760405162461bcd60e51b8152600401808060200182810382526022815260200180612c566022913960400191505060405180910390fd5b50505050565b818101828110156107d957fe5b600082821115612ba057fe5b5090039056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c00556e69742050726f746f636f6c3a20574554485f5452414e534645525f46524f4d5f4641494c4544556e69742050726f746f636f6c3a20574554485f5452414e534645525f4641494c4544556e69742050726f746f636f6c3a20494e56414c49445f4f5241434c455f54595045556e69742050726f746f636f6c3a204554485f5452414e534645525f4641494c4544556e69742050726f746f636f6c3a20554e444552434f4c4c41544552414c495a4544556e69742050726f746f636f6c3a204e4f545f535550504f525445445f444543494d414c53a264697066735822122060e24fe99cd127e5323fab81de77a48beceb08b17b47a3c1e03b6c881066652f64736f6c634300070600330000000000000000000000001c7aea8b6498f0854d1fce542a27ed6a10d71d2f0000000000000000000000000058ab54d4405d8084e8d71b8ab36b3091b21c7d0000000000000000000000001442bc024a92c2f96c3c1d2e9274bc4d8119d97e

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000001c7aea8b6498f0854d1fce542a27ed6a10d71d2f0000000000000000000000000058ab54d4405d8084e8d71b8ab36b3091b21c7d0000000000000000000000001442bc024a92c2f96c3c1d2e9274bc4d8119d97e

-----Decoded View---------------
Arg [0] : _vaultManagerParameters (address): 0x1c7aea8b6498f0854d1fce542a27ed6a10d71d2f
Arg [1] : _oracleRegistry (address): 0x0058ab54d4405d8084e8d71b8ab36b3091b21c7d
Arg [2] : _cdpRegistry (address): 0x1442bc024a92c2f96c3c1d2e9274bc4d8119d97e

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000001c7aea8b6498f0854d1fce542a27ed6a10d71d2f
Arg [1] : 0000000000000000000000000058ab54d4405d8084e8d71b8ab36b3091b21c7d
Arg [2] : 0000000000000000000000001442bc024a92c2f96c3c1d2e9274bc4d8119d97e


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.