ETH Price: $2,009.58 (-2.64%)

Contract

0x3474ad0e3a9775c9F68B415A7a9880B0CAB9397a
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Deposit221215102025-03-25 4:23:4741 hrs ago1742876627IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000451470.9
Deposit221203402025-03-25 0:27:5945 hrs ago1742862479IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000573011.18263351
Deposit221202552025-03-25 0:10:5945 hrs ago1742861459IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000368370.74147098
Deposit221160752025-03-24 10:09:592 days ago1742810999IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000250720.517451
Borrow221153982025-03-24 7:54:112 days ago1742802851IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000091330.37738443
Deposit221118042025-03-23 19:53:233 days ago1742759603IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000174160.34718629
Borrow220952812025-03-21 12:35:475 days ago1742560547IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000096080.42723576
Borrow220882232025-03-20 12:58:236 days ago1742475503IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000265071.1
Repay220871622025-03-20 9:25:356 days ago1742462735IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000037590.44414559
Borrow220788642025-03-19 5:35:117 days ago1742362511IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.00017910.8
Force Replenish220773762025-03-19 0:35:477 days ago1742344547IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.00028641.44855231
Withdraw220754142025-03-18 18:00:118 days ago1742320811IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000978012
Deposit220724632025-03-18 8:06:118 days ago1742285171IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000231190.46088591
Borrow220724462025-03-18 8:02:478 days ago1742284967IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000099440.41266927
Repay220706882025-03-18 2:09:238 days ago1742263763IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000079360.93766321
Deposit220706722025-03-18 2:06:118 days ago1742263571IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000471370.93970758
Borrow220670812025-03-17 14:02:599 days ago1742220179IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000224251.10855694
Deposit And Borr...220632172025-03-17 1:06:599 days ago1742173619IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000345620.49568521
Deposit And Borr...220481412025-03-14 22:36:3511 days ago1741991795IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000361420.53137643
Borrow220446362025-03-14 10:51:3512 days ago1741949495IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000151170.67214646
Repay220440162025-03-14 8:47:1112 days ago1741942031IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.000045990.54331713
Deposit220384982025-03-13 14:19:1113 days ago1741875551IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.001949743.8
Withdraw220384372025-03-13 14:06:5913 days ago1741874819IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.001760423.6
Deposit220320922025-03-12 16:50:5914 days ago1741798259IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.001231412.4
Withdraw220310902025-03-12 13:29:1114 days ago1741786151IN
Inverse Finance: FiRM cvxCRV Market
0 ETH0.001173612.4
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x3d602d80218189572025-02-10 21:58:4744 days ago1739224727
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80217725242025-02-04 10:25:2350 days ago1738664723
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80213407632024-12-06 3:26:59110 days ago1733455619
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80213071112024-12-01 10:38:11115 days ago1733049491
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80205969712024-08-24 7:29:11214 days ago1724484551
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80205480772024-08-17 11:34:35221 days ago1723894475
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80205225452024-08-13 21:59:35225 days ago1723586375
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80205155392024-08-12 22:31:47225 days ago1723501907
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80204802682024-08-08 0:25:47230 days ago1723076747
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80204748682024-08-07 6:21:23231 days ago1723011683
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80204268762024-07-31 13:36:59238 days ago1722433019
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80204044282024-07-28 10:24:11241 days ago1722162251
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80203721932024-07-23 22:23:11245 days ago1721773391
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80203543852024-07-21 10:42:23248 days ago1721558543
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80203531052024-07-21 6:25:35248 days ago1721543135
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80203493132024-07-20 17:44:11249 days ago1721497451
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80203485342024-07-20 15:07:35249 days ago1721488055
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80203261442024-07-17 12:07:23252 days ago1721218043
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80203057412024-07-14 15:48:47255 days ago1720972127
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80203044592024-07-14 11:31:11255 days ago1720956671
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80202975452024-07-13 12:19:47256 days ago1720873187
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80202958572024-07-13 6:41:23256 days ago1720852883
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80202781932024-07-10 19:28:59259 days ago1720639739
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80202742512024-07-10 6:17:23259 days ago1720592243
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
0x3d602d80202741312024-07-10 5:53:11259 days ago1720590791
Inverse Finance: FiRM cvxCRV Market
 Contract Creation0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Market

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : Market.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

// Caution. We assume all failed transfers cause reverts and ignore the returned bool.
interface IERC20 {
    function transfer(address,uint) external returns (bool);
    function transferFrom(address,address,uint) external returns (bool);
    function balanceOf(address) external view returns (uint);
}

interface IOracle {
    function getPrice(address,uint) external returns (uint);
    function viewPrice(address,uint) external view returns (uint);
}

interface IEscrow {
    function initialize(IERC20 _token, address beneficiary) external;
    function onDeposit() external;
    function pay(address recipient, uint amount) external;
    function balance() external view returns (uint);
}

interface IDolaBorrowingRights {
    function onBorrow(address user, uint additionalDebt) external;
    function onRepay(address user, uint repaidDebt) external;
    function onForceReplenish(address user, address replenisher, uint amount, uint replenisherReward) external;
    function balanceOf(address user) external view returns (uint);
    function deficitOf(address user) external view returns (uint);
    function replenishmentPriceBps() external view returns (uint);
}

interface IBorrowController {
    function borrowAllowed(address msgSender, address borrower, uint amount) external returns (bool);
    function onRepay(uint amount) external;
}

contract Market {

    address public gov;
    address public lender;
    address public pauseGuardian;
    address public immutable escrowImplementation;
    IDolaBorrowingRights public immutable dbr;
    IBorrowController public borrowController;
    IERC20 public immutable dola = IERC20(0x865377367054516e17014CcdED1e7d814EDC9ce4);
    IERC20 public immutable collateral;
    IOracle public oracle;
    uint public collateralFactorBps;
    uint public replenishmentIncentiveBps;
    uint public liquidationIncentiveBps;
    uint public liquidationFeeBps;
    uint public liquidationFactorBps = 5000; // 50% by default
    bool immutable callOnDepositCallback;
    bool public borrowPaused;
    uint public totalDebt;
    uint256 internal immutable INITIAL_CHAIN_ID;
    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;
    mapping (address => IEscrow) public escrows; // user => escrow
    mapping (address => uint) public debts; // user => debt
    mapping(address => uint256) public nonces; // user => nonce

    constructor (
        address _gov,
        address _lender,
        address _pauseGuardian,
        address _escrowImplementation,
        IDolaBorrowingRights _dbr,
        IERC20 _collateral,
        IOracle _oracle,
        uint _collateralFactorBps,
        uint _replenishmentIncentiveBps,
        uint _liquidationIncentiveBps,
        bool _callOnDepositCallback
    ) {
        require(_collateralFactorBps < 10000, "Invalid collateral factor");
        require(_liquidationIncentiveBps > 0 && _liquidationIncentiveBps < 10000, "Invalid liquidation incentive");
        require(_replenishmentIncentiveBps < 10000, "Replenishment incentive must be less than 100%");
        gov = _gov;
        lender = _lender;
        pauseGuardian = _pauseGuardian;
        escrowImplementation = _escrowImplementation;
        dbr = _dbr;
        collateral = _collateral;
        oracle = _oracle;
        collateralFactorBps = _collateralFactorBps;
        replenishmentIncentiveBps = _replenishmentIncentiveBps;
        liquidationIncentiveBps = _liquidationIncentiveBps;
        callOnDepositCallback = _callOnDepositCallback;
        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
        if(collateralFactorBps > 0){
            uint unsafeLiquidationIncentive = (10000 - collateralFactorBps) * (liquidationFeeBps + 10000) / collateralFactorBps;
            require(liquidationIncentiveBps < unsafeLiquidationIncentive,  "Liquidation param allow profitable self liquidation");
        }
    }
    
    modifier onlyGov {
        require(msg.sender == gov, "Only gov can call this function");
        _;
    }

    modifier liquidationParamChecker {
        _;
        if(collateralFactorBps > 0){
            uint unsafeLiquidationIncentive = (10000 - collateralFactorBps) * (liquidationFeeBps + 10000) / collateralFactorBps;
            require(liquidationIncentiveBps < unsafeLiquidationIncentive,  "New liquidation param allow profitable self liquidation");
        }
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes("DBR MARKET")),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /**
    @notice sets the oracle to a new oracle. Only callable by governance.
    @param _oracle The new oracle conforming to the IOracle interface.
    */
    function setOracle(IOracle _oracle) public onlyGov { oracle = _oracle; }

    /**
    @notice sets the borrow controller to a new borrow controller. Only callable by governance.
    @param _borrowController The new borrow controller conforming to the IBorrowController interface.
    */
    function setBorrowController(IBorrowController _borrowController) public onlyGov { borrowController = _borrowController; }

    /**
    @notice sets the address of governance. Only callable by governance.
    @param _gov Address of the new governance.
    */
    function setGov(address _gov) public onlyGov { gov = _gov; }

    /**
    @notice sets the lender to a new lender. The lender is allowed to recall dola from the contract. Only callable by governance.
    @param _lender Address of the new lender.
    */
    function setLender(address _lender) public onlyGov { lender = _lender; }

    /**
    @notice sets the pause guardian. The pause guardian can pause borrowing. Only callable by governance.
    @param _pauseGuardian Address of the new pauseGuardian.
    */
    function setPauseGuardian(address _pauseGuardian) public onlyGov { pauseGuardian = _pauseGuardian; }
    
    /**
    @notice sets the Collateral Factor requirement of the market as measured in basis points. 1 = 0.01%. Only callable by governance.
    @dev Collateral factor mus be set below 100%
    @param _collateralFactorBps The new collateral factor as measured in basis points. 
    */
    function setCollateralFactorBps(uint _collateralFactorBps) public onlyGov liquidationParamChecker {
        require(_collateralFactorBps < 10000, "Invalid collateral factor");
        collateralFactorBps = _collateralFactorBps;
    }
    
    /**
    @notice sets the Liquidation Factor of the market as denoted in basis points.
     The liquidation Factor denotes the maximum amount of debt that can be liquidated in basis points.
     At 5000, 50% of of a borrower's underwater debt can be liquidated. Only callable by governance.
    @dev Must be set between 1 and 10000.
    @param _liquidationFactorBps The new liquidation factor in basis points. 1 = 0.01%/
    */
    function setLiquidationFactorBps(uint _liquidationFactorBps) public onlyGov {
        require(_liquidationFactorBps > 0 && _liquidationFactorBps <= 10000, "Invalid liquidation factor");
        liquidationFactorBps = _liquidationFactorBps;
    }

    /**
    @notice sets the Replenishment Incentive of the market as denoted in basis points.
     The Replenishment Incentive is the percentage paid out to replenishers on a successful forceReplenish call, denoted in basis points.
    @dev Must be set between 1 and 10000.
    @param _replenishmentIncentiveBps The new replenishment incentive set in basis points. 1 = 0.01%
    */
    function setReplenismentIncentiveBps(uint _replenishmentIncentiveBps) public onlyGov {
        require(_replenishmentIncentiveBps > 0 && _replenishmentIncentiveBps < 10000, "Invalid replenishment incentive");
        replenishmentIncentiveBps = _replenishmentIncentiveBps;
    }

    /**
    @notice sets the Liquidation Incentive of the market as denoted in basis points.
     The Liquidation Incentive is the percentage paid out to liquidators of a borrower's debt when successfully liquidated.
    @dev Must be set between 0 and 10000 - liquidation fee.
    @param _liquidationIncentiveBps The new liqudation incentive set in basis points. 1 = 0.01% 
    */
    function setLiquidationIncentiveBps(uint _liquidationIncentiveBps) public onlyGov liquidationParamChecker {
        require(_liquidationIncentiveBps > 0 && _liquidationIncentiveBps + liquidationFeeBps < 10000, "Invalid liquidation incentive");
        liquidationIncentiveBps = _liquidationIncentiveBps;
    }

    /**
    @notice sets the Liquidation Fee of the market as denoted in basis points.
     The Liquidation Fee is the percentage paid out to governance of a borrower's debt when successfully liquidated.
    @dev Must be set between 0 and 10000 - liquidation factor.
    @param _liquidationFeeBps The new liquidation fee set in basis points. 1 = 0.01%
    */
    function setLiquidationFeeBps(uint _liquidationFeeBps) public onlyGov liquidationParamChecker {
        require(_liquidationFeeBps > 0 && _liquidationFeeBps + liquidationIncentiveBps < 10000, "Invalid liquidation fee");
        liquidationFeeBps = _liquidationFeeBps;
    }

    /**
    @notice Recalls amount of DOLA to the lender.
    @param amount The amount od DOLA to recall to the the lender.
    */
    function recall(uint amount) public {
        require(msg.sender == lender, "Only lender can recall");
        dola.transfer(msg.sender, amount);
    }

    /**
    @notice Pauses or unpauses borrowing for the market. Only gov can unpause a market, while gov and pauseGuardian can pause it.
    @param _value Boolean representing the state pause state of borrows. true = paused, false = unpaused.
    */
    function pauseBorrows(bool _value) public {
        if(_value) {
            require(msg.sender == pauseGuardian || msg.sender == gov, "Only pause guardian or governance can pause");
        } else {
            require(msg.sender == gov, "Only governance can unpause");
        }
        borrowPaused = _value;
    }

    /**
    @notice Internal function for creating an escrow for users to deposit collateral in.
    @dev Uses create2 and minimal proxies to create the escrow at a deterministic address
    @param user The address of the user to create an escrow for.
    */
    function createEscrow(address user) internal returns (IEscrow instance) {
        address implementation = escrowImplementation;
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create2(0, ptr, 0x37, user)
        }
        require(instance != IEscrow(address(0)), "ERC1167: create2 failed");
        emit CreateEscrow(user, address(instance));
    }

    /**
    @notice Internal function for getting the escrow of a user.
    @dev If the escrow doesn't exist, an escrow contract is deployed.
    @param user The address of the user owning the escrow.
    */
    function getEscrow(address user) internal returns (IEscrow) {
        if(escrows[user] != IEscrow(address(0))) return escrows[user];
        IEscrow escrow = createEscrow(user);
        escrow.initialize(collateral, user);
        escrows[user] = escrow;
        return escrow;
    }

    /**
    @notice Deposit amount of collateral into escrow
    @dev Will deposit the amount into the escrow contract.
    @param amount Amount of collateral token to deposit.
    */
    function deposit(uint amount) public {
        deposit(msg.sender, amount);
    }

    /**
    @notice Deposit and borrow in a single transaction.
    @param amountDeposit Amount of collateral token to deposit into escrow.
    @param amountBorrow Amount of DOLA to borrow.
    */
    function depositAndBorrow(uint amountDeposit, uint amountBorrow) public {
        deposit(amountDeposit);
        borrow(amountBorrow);
    }

    /**
    @notice Deposit amount of collateral into escrow on behalf of msg.sender
    @dev Will deposit the amount into the escrow contract.
    @param user User to deposit on behalf of.
    @param amount Amount of collateral token to deposit.
    */
    function deposit(address user, uint amount) public {
        IEscrow escrow = getEscrow(user);
        collateral.transferFrom(msg.sender, address(escrow), amount);
        if(callOnDepositCallback) {
            escrow.onDeposit();
        }
        emit Deposit(user, amount);
    }

    /**
    @notice View function for predicting the deterministic escrow address of a user.
    @dev Only use deposit() function for deposits and NOT the predicted escrow address unless you know what you're doing
    @param user Address of the user owning the escrow.
    */
    function predictEscrow(address user) public view returns (IEscrow predicted) {
        address implementation = escrowImplementation;
        address deployer = address(this);
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
            mstore(add(ptr, 0x38), shl(0x60, deployer))
            mstore(add(ptr, 0x4c), user)
            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
            predicted := keccak256(add(ptr, 0x37), 0x55)
        }
    }

    /**
    @notice View function for getting the dollar value of the user's collateral in escrow for the market.
    @param user Address of the user.
    */
    function getCollateralValue(address user) public view returns (uint) {
        IEscrow escrow = predictEscrow(user);
        uint collateralBalance = escrow.balance();
        return collateralBalance * oracle.viewPrice(address(collateral), collateralFactorBps) / 1 ether;
    }

    /**
    @notice Internal function for getting the dollar value of the user's collateral in escrow for the market.
    @dev Updates the lowest price comparisons of the pessimistic oracle
    @param user Address of the user.
    */
    function getCollateralValueInternal(address user) internal returns (uint) {
        IEscrow escrow = predictEscrow(user);
        uint collateralBalance = escrow.balance();
        return collateralBalance * oracle.getPrice(address(collateral), collateralFactorBps) / 1 ether;
    }

    /**
    @notice View function for getting the credit limit of a user.
    @dev To calculate the available credit, subtract user debt from credit limit.
    @param user Address of the user.
    */
    function getCreditLimit(address user) public view returns (uint) {
        uint collateralValue = getCollateralValue(user);
        return collateralValue * collateralFactorBps / 10000;
    }

    /**
    @notice Internal function for getting the credit limit of a user.
    @dev To calculate the available credit, subtract user debt from credit limit. Updates the pessimistic oracle.
    @param user Address of the user.
    */
    function getCreditLimitInternal(address user) internal returns (uint) {
        uint collateralValue = getCollateralValueInternal(user);
        return collateralValue * collateralFactorBps / 10000;
    }
    /**
    @notice Internal function for getting the withdrawal limit of a user.
     The withdrawal limit is how much collateral a user can withdraw before their loan would be underwater. Updates the pessimistic oracle.
    @param user Address of the user.
    */
    function getWithdrawalLimitInternal(address user) internal returns (uint) {
        IEscrow escrow = predictEscrow(user);
        uint collateralBalance = escrow.balance();
        if(collateralBalance == 0) return 0;
        uint debt = debts[user];
        if(debt == 0) return collateralBalance;
        if(collateralFactorBps == 0) return 0;
        uint minimumCollateral = debt * 1 ether / oracle.getPrice(address(collateral), collateralFactorBps) * 10000 / collateralFactorBps;
        if(collateralBalance <= minimumCollateral) return 0;
        return collateralBalance - minimumCollateral;
    }

    /**
    @notice View function for getting the withdrawal limit of a user.
     The withdrawal limit is how much collateral a user can withdraw before their loan would be underwater.
    @param user Address of the user.
    */
    function getWithdrawalLimit(address user) public view returns (uint) {
        IEscrow escrow = predictEscrow(user);
        uint collateralBalance = escrow.balance();
        if(collateralBalance == 0) return 0;
        uint debt = debts[user];
        if(debt == 0) return collateralBalance;
        if(collateralFactorBps == 0) return 0;
        uint minimumCollateral = debt * 1 ether / oracle.viewPrice(address(collateral), collateralFactorBps) * 10000 / collateralFactorBps;
        if(collateralBalance <= minimumCollateral) return 0;
        return collateralBalance - minimumCollateral;
    }

    /**
    @notice Internal function for borrowing DOLA against collateral.
    @dev This internal function is shared between the borrow and borrowOnBehalf function
    @param borrower The address of the borrower that debt will be accrued to.
    @param to The address that will receive the borrowed DOLA
    @param amount The amount of DOLA to be borrowed
    */
    function borrowInternal(address borrower, address to, uint amount) internal {
        require(!borrowPaused, "Borrowing is paused");
        if(borrowController != IBorrowController(address(0))) {
            require(borrowController.borrowAllowed(msg.sender, borrower, amount), "Denied by borrow controller");
        }
        uint credit = getCreditLimitInternal(borrower);
        debts[borrower] += amount;
        require(credit >= debts[borrower], "Exceeded credit limit");
        totalDebt += amount;
        dbr.onBorrow(borrower, amount);
        dola.transfer(to, amount);
        emit Borrow(borrower, amount);
    }

    /**
    @notice Function for borrowing DOLA.
    @dev Will borrow to msg.sender
    @param amount The amount of DOLA to be borrowed.
    */
    function borrow(uint amount) public {
        borrowInternal(msg.sender, msg.sender, amount);
    }

    /**
    @notice Function for using a signed message to borrow on behalf of an address owning an escrow with collateral.
    @dev Signed messaged can be invalidated by incrementing the nonce. Will always borrow to the msg.sender.
    @param from The address of the user being borrowed from
    @param amount The amount to be borrowed
    @param deadline Timestamp after which the signed message will be invalid
    @param v The v param of the ECDSA signature
    @param r The r param of the ECDSA signature
    @param s The s param of the ECDSA signature
    */
    function borrowOnBehalf(address from, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) public {
        require(deadline >= block.timestamp, "DEADLINE_EXPIRED");
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "BorrowOnBehalf(address caller,address from,uint256 amount,uint256 nonce,uint256 deadline)"
                                ),
                                msg.sender,
                                from,
                                amount,
                                nonces[from]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );
            require(recoveredAddress != address(0) && recoveredAddress == from, "INVALID_SIGNER");
            borrowInternal(from, msg.sender, amount);
        }
    }

    /**
    @notice Internal function for withdrawing from the escrow
    @dev The internal function is shared by the withdraw function and withdrawOnBehalf function
    @param from The address owning the escrow to withdraw from.
    @param to The address receiving the tokens
    @param amount The amount being withdrawn.
    */
    function withdrawInternal(address from, address to, uint amount) internal {
        uint limit = getWithdrawalLimitInternal(from);
        require(limit >= amount, "Insufficient withdrawal limit");
        require(dbr.deficitOf(from) == 0, "Can't withdraw with DBR deficit");
        IEscrow escrow = getEscrow(from);
        escrow.pay(to, amount);
        emit Withdraw(from, to, amount);
    }

    /**
    @notice Function for withdrawing to msg.sender.
    @param amount Amount to withdraw.
    */
    function withdraw(uint amount) public {
        withdrawInternal(msg.sender, msg.sender, amount);
    }

    /**
    @notice Function for using a signed message to withdraw on behalf of an address owning an escrow with collateral.
    @dev Signed messaged can be invalidated by incrementing the nonce. Will always withdraw to the msg.sender.
    @param from The address of the user owning the escrow being withdrawn from
    @param amount The amount to be withdrawn
    @param deadline Timestamp after which the signed message will be invalid
    @param v The v param of the ECDSA signature
    @param r The r param of the ECDSA signature
    @param s The s param of the ECDSA signature
    */
    function withdrawOnBehalf(address from, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) public {
        require(deadline >= block.timestamp, "DEADLINE_EXPIRED");
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "WithdrawOnBehalf(address caller,address from,uint256 amount,uint256 nonce,uint256 deadline)"
                                ),
                                msg.sender,
                                from,
                                amount,
                                nonces[from]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );
            require(recoveredAddress != address(0) && recoveredAddress == from, "INVALID_SIGNER");
            withdrawInternal(from, msg.sender, amount);
        }
    }

    /**
    @notice Function for incrementing the nonce of the msg.sender, making their latest signed message unusable.
    */
    function invalidateNonce() public {
        nonces[msg.sender]++;
    }
    
    /**
    @notice Function for repaying debt on behalf of user. Debt must be repaid in DOLA.
    @dev If the user has a DBR deficit, they risk initial debt being accrued by forced replenishments.
    @param user Address of the user whose debt is being repaid
    @param amount DOLA amount to be repaid. If set to max uint debt will be repaid in full.
    */
    function repay(address user, uint amount) public {
        uint debt = debts[user];
        if(amount == type(uint).max){
            amount = debt;
        }
        require(debt >= amount, "Repayment greater than debt");
        debts[user] -= amount;
        totalDebt -= amount;
        dbr.onRepay(user, amount);
        if(address(borrowController) != address(0)){
            borrowController.onRepay(amount);
        }
        dola.transferFrom(msg.sender, address(this), amount);
        emit Repay(user, msg.sender, amount);
    }

    /**
    @notice Bundles repayment and withdrawal into a single function call.
    @param repayAmount Amount of DOLA to be repaid
    @param withdrawAmount Amount of underlying to be withdrawn from the escrow
    */
    function repayAndWithdraw(uint repayAmount, uint withdrawAmount) public {
        repay(msg.sender, repayAmount);
        withdraw(withdrawAmount);
    }

    /**
    @notice Function for forcing a user to replenish their DBR deficit at a pre-determined price.
     The replenishment will accrue additional DOLA debt.
     On a successful call, the caller will be paid a replenishment incentive.
    @dev The function will only top the user back up to 0, meaning that the user will have a DBR deficit again in the next block.
    @param user The address of the user being forced to replenish DBR
    @param amount The amount of DBR the user will be replenished.
    */
    function forceReplenish(address user, uint amount) public {
        uint deficit = dbr.deficitOf(user);
        require(deficit > 0, "No DBR deficit");
        require(deficit >= amount, "Amount > deficit");
        uint replenishmentCost = amount * dbr.replenishmentPriceBps() / 10000;
        uint replenisherReward = replenishmentCost * replenishmentIncentiveBps / 10000;
        debts[user] += replenishmentCost;
        uint collateralValue = getCollateralValueInternal(user) * (10000 - liquidationIncentiveBps - liquidationFeeBps) / 10000;
        require(collateralValue >= debts[user], "Exceeded collateral value");
        totalDebt += replenishmentCost;
        dbr.onForceReplenish(user, msg.sender, amount, replenisherReward);
        dola.transfer(msg.sender, replenisherReward);
    }
    /**
    @notice Function for forcing a user to replenish all of their DBR deficit at a pre-determined price.
     The replenishment will accrue additional DOLA debt.
     On a successful call, the caller will be paid a replenishment incentive.
    @dev The function will only top the user back up to 0, meaning that the user will have a DBR deficit again in the next block.
    @param user The address of the user being forced to replenish DBR
    */
    function forceReplenishAll(address user) public {
        uint deficit = dbr.deficitOf(user);
        forceReplenish(user, deficit);
    }

    /**
    @notice Function for liquidating a user's under water debt. Debt is under water when the value of a user's debt is above their collateral factor.
    @param user The user to be liquidated
    @param repaidDebt Th amount of user user debt to liquidate.
    */
    function liquidate(address user, uint repaidDebt) public {
        require(repaidDebt > 0, "Must repay positive debt");
        uint debt = debts[user];
        require(getCreditLimitInternal(user) < debt, "User debt is healthy");
        require(repaidDebt <= debt * liquidationFactorBps / 10000, "Exceeded liquidation factor");
        uint price = oracle.getPrice(address(collateral), collateralFactorBps);
        uint liquidatorReward = repaidDebt * 1 ether / price;
        liquidatorReward += liquidatorReward * liquidationIncentiveBps / 10000;
        debts[user] -= repaidDebt;
        totalDebt -= repaidDebt;
        dbr.onRepay(user, repaidDebt);
        borrowController.onRepay(repaidDebt);
        dola.transferFrom(msg.sender, address(this), repaidDebt);
        IEscrow escrow = predictEscrow(user);
        escrow.pay(msg.sender, liquidatorReward);
        if(liquidationFeeBps > 0) {
            uint liquidationFee = repaidDebt * 1 ether / price * liquidationFeeBps / 10000;
            uint balance = escrow.balance();
            if(balance >= liquidationFee) {
                escrow.pay(gov, liquidationFee);
            } else if(balance > 0) {
                escrow.pay(gov, balance);
            }
        }
        emit Liquidate(user, msg.sender, repaidDebt, liquidatorReward);
    }
    
    event Deposit(address indexed account, uint amount);
    event Borrow(address indexed account, uint amount);
    event Withdraw(address indexed account, address indexed to, uint amount);
    event Repay(address indexed account, address indexed repayer, uint amount);
    event Liquidate(address indexed account, address indexed liquidator, uint repaidDebt, uint liquidatorReward);
    event CreateEscrow(address indexed user, address escrow);
}

Settings
{
  "remappings": [
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_gov","type":"address"},{"internalType":"address","name":"_lender","type":"address"},{"internalType":"address","name":"_pauseGuardian","type":"address"},{"internalType":"address","name":"_escrowImplementation","type":"address"},{"internalType":"contract IDolaBorrowingRights","name":"_dbr","type":"address"},{"internalType":"contract IERC20","name":"_collateral","type":"address"},{"internalType":"contract IOracle","name":"_oracle","type":"address"},{"internalType":"uint256","name":"_collateralFactorBps","type":"uint256"},{"internalType":"uint256","name":"_replenishmentIncentiveBps","type":"uint256"},{"internalType":"uint256","name":"_liquidationIncentiveBps","type":"uint256"},{"internalType":"bool","name":"_callOnDepositCallback","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Borrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"escrow","type":"address"}],"name":"CreateEscrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"liquidator","type":"address"},{"indexed":false,"internalType":"uint256","name":"repaidDebt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquidatorReward","type":"uint256"}],"name":"Liquidate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"repayer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Repay","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"borrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"borrowController","outputs":[{"internalType":"contract IBorrowController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"borrowOnBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"borrowPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateral","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateralFactorBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dbr","outputs":[{"internalType":"contract IDolaBorrowingRights","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"debts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountDeposit","type":"uint256"},{"internalType":"uint256","name":"amountBorrow","type":"uint256"}],"name":"depositAndBorrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dola","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"escrowImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"escrows","outputs":[{"internalType":"contract IEscrow","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"forceReplenish","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"forceReplenishAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getCollateralValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getCreditLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getWithdrawalLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"invalidateNonce","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lender","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"repaidDebt","type":"uint256"}],"name":"liquidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liquidationFactorBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidationFeeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidationIncentiveBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_value","type":"bool"}],"name":"pauseBorrows","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseGuardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"predictEscrow","outputs":[{"internalType":"contract IEscrow","name":"predicted","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"repay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"repayAndWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"replenishmentIncentiveBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IBorrowController","name":"_borrowController","type":"address"}],"name":"setBorrowController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collateralFactorBps","type":"uint256"}],"name":"setCollateralFactorBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lender","type":"address"}],"name":"setLender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liquidationFactorBps","type":"uint256"}],"name":"setLiquidationFactorBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liquidationFeeBps","type":"uint256"}],"name":"setLiquidationFeeBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_liquidationIncentiveBps","type":"uint256"}],"name":"setLiquidationIncentiveBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IOracle","name":"_oracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pauseGuardian","type":"address"}],"name":"setPauseGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_replenishmentIncentiveBps","type":"uint256"}],"name":"setReplenismentIncentiveBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"withdrawOnBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"}]

61016060405273865377367054516e17014ccded1e7d814edc9ce460c0526113886009553480156200003057600080fd5b506040516200372b3803806200372b8339810160408190526200005391620003a0565b6127108410620000aa5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064015b60405180910390fd5b600082118015620000bc575061271082105b6200010a5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e746976650000006044820152606401620000a1565b6127108310620001745760405162461bcd60e51b815260206004820152602e60248201527f5265706c656e6973686d656e7420696e63656e74697665206d7573742062652060448201526d6c657373207468616e203130302560901b6064820152608401620000a1565b600080546001600160a01b03808e166001600160a01b031992831617909255600180548d8416908316179055600280548c841690831617905589821660805288821660a05287821660e0526004805492881692909116919091179055600584905560068390556007829055801515610100524661012052620002ac604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b610140526005541562000376576000600554600854612710620002d091906200049c565b600554620002e190612710620004b7565b620002ed9190620004d1565b620002f99190620004f3565b90508060075410620003745760405162461bcd60e51b815260206004820152603360248201527f4c69717569646174696f6e20706172616d20616c6c6f772070726f666974616260448201527f6c652073656c66206c69717569646174696f6e000000000000000000000000006064820152608401620000a1565b505b505050505050505050505062000516565b6001600160a01b03811681146200039d57600080fd5b50565b60008060008060008060008060008060006101608c8e031215620003c357600080fd5b8b51620003d08162000387565b60208d0151909b50620003e38162000387565b60408d0151909a50620003f68162000387565b60608d0151909950620004098162000387565b60808d01519098506200041c8162000387565b60a08d01519097506200042f8162000387565b60c08d0151909650620004428162000387565b8095505060e08c015193506101008c015192506101208c015191506101408c015180151581146200047257600080fd5b809150509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b60008219821115620004b257620004b262000486565b500190565b600082821015620004cc57620004cc62000486565b500390565b6000816000190483118215151615620004ee57620004ee62000486565b500290565b6000826200051157634e487b7160e01b600052601260045260246000fd5b500490565b60805160a05160c05160e0516101005161012051610140516131206200060b600039600061106101526000610f7b01526000611173015260008181610647015281816110f401528181611abd01528181611cae0152818161226701528181612a9701528181612be50152612d2c01526000818161068a01528181610b0901528181611689015281816118e201528181611e9d01526127780152600081816105e7015281816106ea01528181610a1701528181611346015281816114400152818161161801528181611dc1015281816126fa01526128ba0152600081816104430152818161129e0152612d9201526131206000f3fe608060405234801561001057600080fd5b50600436106102bb5760003560e01c80637164695a11610182578063bcead63e116100e9578063d1220a3c116100a2578063e031a8241161007c578063e031a8241461067c578063ea0593e414610685578063ebc9b94d146106ac578063fc7b9c18146106bf57600080fd5b8063d1220a3c1461062f578063d8dfeb4514610642578063e00f0a991461066957600080fd5b8063bcead63e146105a9578063c5ebeaec146105bc578063c74e6d80146105cf578063c7ed69cd146105e2578063c801861914610609578063cfad57a21461061c57600080fd5b80638951b0541161013b5780638951b0541461052d57806397904e4214610540578063b6b55f2514610553578063b75061bb14610566578063bcb4bbea14610579578063bcbaf4871461059657600080fd5b80637164695a146104b85780637adbf973146104cb5780637d32e793146104de5780637dc0d1d0146104f15780637ecebe00146105045780637f5007ed1461052457600080fd5b80633e553756116102265780634ef64ee7116101df5780634ef64ee7146104655780635a57b46f14610478578063651afe83146104805780636f1c4839146104935780636f48fbb61461049c5780636f8dd24c146104af57600080fd5b80633e553756146103d357806346e368d4146103dc578063477230b2146103ef57806347e7ef241461041857806348bde20c1461042b5780634ca8ff5a1461043e57600080fd5b80632c333e25116102785780632c333e25146103515780632e1a7d4d146103725780632ecd4e7d1461038557806334734dd3146103a55780633525f591146103b85780633644e515146103cb57600080fd5b80630e81c403146102c057806312d43a51146102d55780631ef08b751461030557806322867d7814610318578063236331e91461032b57806324a3d6221461033e575b600080fd5b6102d36102ce366004612e90565b6106c8565b005b6000546102e8906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6102d3610313366004612ead565b610767565b6102d3610326366004612f0f565b610945565b6102d3610339366004612e90565b610bcb565b6002546102e8906001600160a01b031681565b61036461035f366004612e90565b610c17565b6040519081526020016102fc565b6102d3610380366004612f3b565b610c47565b610364610393366004612e90565b600d6020526000908152604090205481565b6102d36103b3366004612f3b565b610c55565b6102d36103c6366004612ead565b610da7565b610364610f77565b61036460065481565b6102d36103ea366004612e90565b611083565b6102e86103fd366004612e90565b600c602052600090815260409020546001600160a01b031681565b6102d3610426366004612f0f565b6110cf565b6102d3610439366004612e90565b611233565b6102e87f000000000000000000000000000000000000000000000000000000000000000081565b6102e8610473366004612e90565b61127f565b6102d3611302565b6102d361048e366004612f0f565b611324565b61036460095481565b6102d36104aa366004612f3b565b611705565b61036460075481565b6102d36104c6366004612f3b565b611791565b6102d36104d9366004612e90565b61182c565b6102d36104ec366004612f3b565b611878565b6004546102e8906001600160a01b031681565b610364610512366004612e90565b600e6020526000908152604090205481565b61036460055481565b6102d361053b366004612f3b565b61195c565b61036461054e366004612e90565b611a12565b6102d3610561366004612f3b565b611b42565b6102d3610574366004612f54565b611b4c565b600a546105869060ff1681565b60405190151581526020016102fc565b6102d36105a4366004612f0f565b611b5e565b6001546102e8906001600160a01b031681565b6102d36105ca366004612f3b565b612168565b6103646105dd366004612e90565b612173565b6102e87f000000000000000000000000000000000000000000000000000000000000000081565b6102d3610617366004612f84565b61232b565b6102d361062a366004612e90565b612426565b6102d361063d366004612f3b565b612472565b6102e87f000000000000000000000000000000000000000000000000000000000000000081565b6003546102e8906001600160a01b031681565b61036460085481565b6102e87f000000000000000000000000000000000000000000000000000000000000000081565b6102d36106ba366004612f54565b6124ff565b610364600b5481565b604051630d9167c160e21b81526001600160a01b0382811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906336459f0490602401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190612fa1565b90506107638282611324565b5050565b428410156107af5760405162461bcd60e51b815260206004820152601060248201526f111150511312539157d156141254915160821b60448201526064015b60405180910390fd5b600060016107bb610f77565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f1f0bc49e000c018ca72680800f3b2f7ce61e76471cce3756387071d004b0eee98184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e08401909252815191012061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156108be573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906108f45750866001600160a01b0316816001600160a01b0316145b6109315760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107a6565b61093c873388612512565b50505050505050565b6001600160a01b0382166000908152600d60205260409020546001820161096a578091505b818110156109ba5760405162461bcd60e51b815260206004820152601b60248201527f52657061796d656e742067726561746572207468616e2064656274000000000060448201526064016107a6565b6001600160a01b0383166000908152600d6020526040812080548492906109e2908490612fd0565b9250508190555081600b60008282546109fb9190612fd0565b9091555050604051631b1a58c960e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d8d2c64890610a4e9086908690600401612fe7565b600060405180830381600087803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b50506003546001600160a01b0316159150610af290505760035460405163081e664160e01b8152600481018490526001600160a01b039091169063081e664190602401600060405180830381600087803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b505050505b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90610b4290339030908790600401613000565b6020604051808303816000875af1158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b859190613024565b5060405182815233906001600160a01b038516907f05f2eeda0e08e4b437f487c8d7d29b14537d15e3488170dc3de5dbdf8dac46849060200160405180910390a3505050565b6000546001600160a01b03163314610bf55760405162461bcd60e51b81526004016107a690613041565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080610c2383611a12565b905061271060055482610c369190613078565b610c409190613097565b9392505050565b610c5233338361283e565b50565b6000546001600160a01b03163314610c7f5760405162461bcd60e51b81526004016107a690613041565b600081118015610c9d575061271060085482610c9b91906130b9565b105b610ce95760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e7469766500000060448201526064016107a6565b600781905560055415610c52576000600554600854612710610d0b91906130b9565b600554610d1a90612710612fd0565b610d249190613078565b610d2e9190613097565b905080600754106107635760405162461bcd60e51b815260206004820152603760248201527f4e6577206c69717569646174696f6e20706172616d20616c6c6f772070726f6660448201527f697461626c652073656c66206c69717569646174696f6e00000000000000000060648201526084016107a6565b42841015610dea5760405162461bcd60e51b815260206004820152601060248201526f111150511312539157d156141254915160821b60448201526064016107a6565b60006001610df6610f77565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f7dbda1635348f4206be1d85078da9f4a74703081e4fa6e174f3fd066c56189658184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e08401909252815191012061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610ef9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610f2f5750866001600160a01b0316816001600160a01b0316145b610f6c5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107a6565b61093c87338861283e565b60007f0000000000000000000000000000000000000000000000000000000000000000461461105e5750604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6000546001600160a01b031633146110ad5760405162461bcd60e51b81526004016107a690613041565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006110da83612a34565b6040516323b872dd60e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061112d90339085908790600401613000565b6020604051808303816000875af115801561114c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111709190613024565b507f0000000000000000000000000000000000000000000000000000000000000000156111eb57806001600160a01b03166312c93f596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111d257600080fd5b505af11580156111e6573d6000803e3d6000fd5b505050505b826001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161122691815260200190565b60405180910390a2505050565b6000546001600160a01b0316331461125d5760405162461bcd60e51b81526004016107a690613041565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f0000000000000000000000000000000000000000000000000000000000000000606090811b60148301526f5af43d82803e903d91602b57fd5bf3ff60801b602883015230901b6038820152604c8101919091526037808220606c830152605591012090565b336000908152600e6020526040812080549161131d836130d1565b9190505550565b604051630d9167c160e21b81526001600160a01b0383811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906336459f0490602401602060405180830381865afa15801561138f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b39190612fa1565b9050600081116113f65760405162461bcd60e51b815260206004820152600e60248201526d139bc8111094881919599a58da5d60921b60448201526064016107a6565b818110156114395760405162461bcd60e51b815260206004820152601060248201526f105b5bdd5b9d080f881919599a58da5d60821b60448201526064016107a6565b60006127107f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a10f84cb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561149c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c09190612fa1565b6114ca9085613078565b6114d49190613097565b90506000612710600654836114e99190613078565b6114f39190613097565b6001600160a01b0386166000908152600d60205260408120805492935084929091906115209084906130b9565b90915550506008546007546000916127109161153c9083612fd0565b6115469190612fd0565b61154f88612b3a565b6115599190613078565b6115639190613097565b6001600160a01b0387166000908152600d60205260409020549091508110156115ce5760405162461bcd60e51b815260206004820152601960248201527f457863656564656420636f6c6c61746572616c2076616c75650000000000000060448201526064016107a6565b82600b60008282546115e091906130b9565b909155505060405163b2c0877560e01b81526001600160a01b03878116600483015233602483015260448201879052606482018490527f0000000000000000000000000000000000000000000000000000000000000000169063b2c0877590608401600060405180830381600087803b15801561165c57600080fd5b505af1158015611670573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb91506116c29033908690600401612fe7565b6020604051808303816000875af11580156116e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c9190613024565b6000546001600160a01b0316331461172f5760405162461bcd60e51b81526004016107a690613041565b600081118015611740575061271081105b61178c5760405162461bcd60e51b815260206004820152601f60248201527f496e76616c6964207265706c656e6973686d656e7420696e63656e746976650060448201526064016107a6565b600655565b6000546001600160a01b031633146117bb5760405162461bcd60e51b81526004016107a690613041565b612710811061180c5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064016107a6565b60058190558015610c52576000600554600854612710610d0b91906130b9565b6000546001600160a01b031633146118565760405162461bcd60e51b81526004016107a690613041565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146118cb5760405162461bcd60e51b815260206004820152601660248201527513db9b1e481b195b99195c8818d85b881c9958d85b1b60521b60448201526064016107a6565b60405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906119199033908590600401612fe7565b6020604051808303816000875af1158015611938573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107639190613024565b6000546001600160a01b031633146119865760405162461bcd60e51b81526004016107a690613041565b6000811180156119a45750612710600754826119a291906130b9565b105b6119f05760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206c69717569646174696f6e2066656500000000000000000060448201526064016107a6565b600881905560055415610c52576000600554600854612710610d0b91906130b9565b600080611a1e8361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a849190612fa1565b6004805460055460405163949c4fa360e01b8152939450670de0b6b3a7640000936001600160a01b039092169263949c4fa392611ae5927f000000000000000000000000000000000000000000000000000000000000000092909101612fe7565b602060405180830381865afa158015611b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b269190612fa1565b611b309083613078565b611b3a9190613097565b949350505050565b610c5233826110cf565b611b5582611b42565b61076381612168565b60008111611bae5760405162461bcd60e51b815260206004820152601860248201527f4d75737420726570617920706f7369746976652064656274000000000000000060448201526064016107a6565b6001600160a01b0382166000908152600d602052604090205480611bd184612c2c565b10611c155760405162461bcd60e51b8152602060048201526014602482015273557365722064656274206973206865616c74687960601b60448201526064016107a6565b61271060095482611c269190613078565b611c309190613097565b821115611c7f5760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206c69717569646174696f6e20666163746f72000000000060448201526064016107a6565b6004805460055460405163449e815d60e01b81526000936001600160a01b039093169263449e815d92611cd4927f00000000000000000000000000000000000000000000000000000000000000009201612fe7565b6020604051808303816000875af1158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190612fa1565b9050600081611d2e85670de0b6b3a7640000613078565b611d389190613097565b905061271060075482611d4b9190613078565b611d559190613097565b611d5f90826130b9565b6001600160a01b0386166000908152600d6020526040812080549293508692909190611d8c908490612fd0565b9250508190555083600b6000828254611da59190612fd0565b9091555050604051631b1a58c960e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d8d2c64890611df89088908890600401612fe7565b600060405180830381600087803b158015611e1257600080fd5b505af1158015611e26573d6000803e3d6000fd5b505060035460405163081e664160e01b8152600481018890526001600160a01b03909116925063081e66419150602401600060405180830381600087803b158015611e7057600080fd5b505af1158015611e84573d6000803e3d6000fd5b50506040516323b872dd60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692506323b872dd9150611ed890339030908990600401613000565b6020604051808303816000875af1158015611ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1b9190613024565b506000611f278661127f565b604051636203b43b60e11b81529091506001600160a01b0382169063c407687690611f589033908690600401612fe7565b600060405180830381600087803b158015611f7257600080fd5b505af1158015611f86573d6000803e3d6000fd5b505050506000600854111561211a5760006127106008548588670de0b6b3a7640000611fb29190613078565b611fbc9190613097565b611fc69190613078565b611fd09190613097565b90506000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612012573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120369190612fa1565b90508181106120aa57600054604051636203b43b60e11b81526001600160a01b038581169263c40768769261207392909116908690600401612fe7565b600060405180830381600087803b15801561208d57600080fd5b505af11580156120a1573d6000803e3d6000fd5b50505050612117565b801561211757600054604051636203b43b60e11b81526001600160a01b038581169263c4076876926120e492909116908590600401612fe7565b600060405180830381600087803b1580156120fe57600080fd5b505af1158015612112573d6000803e3d6000fd5b505050505b50505b604080518681526020810184905233916001600160a01b038916917ff3fa0eaee8f258c23b013654df25d1527f98a5c7ccd5e951dd77caca400ef972910160405180910390a3505050505050565b610c52333383612512565b60008061217f8361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e59190612fa1565b9050806000036121f9575060009392505050565b6001600160a01b0384166000908152600d60205260408120549081900361222257509392505050565b60055460000361223757506000949350505050565b6005546004805460405163949c4fa360e01b8152600093926001600160a01b039092169163949c4fa39161228f917f000000000000000000000000000000000000000000000000000000000000000091869101612fe7565b602060405180830381865afa1580156122ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d09190612fa1565b6122e284670de0b6b3a7640000613078565b6122ec9190613097565b6122f890612710613078565b6123029190613097565b90508083116123175750600095945050505050565b6123218184612fd0565b9695505050505050565b80156123b9576002546001600160a01b031633148061235457506000546001600160a01b031633145b6123b45760405162461bcd60e51b815260206004820152602b60248201527f4f6e6c7920706175736520677561726469616e206f7220676f7665726e616e6360448201526a652063616e20706175736560a81b60648201526084016107a6565b612413565b6000546001600160a01b031633146124135760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920676f7665726e616e63652063616e20756e7061757365000000000060448201526064016107a6565b600a805460ff1916911515919091179055565b6000546001600160a01b031633146124505760405162461bcd60e51b81526004016107a690613041565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461249c5760405162461bcd60e51b81526004016107a690613041565b6000811180156124ae57506127108111155b6124fa5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206c69717569646174696f6e20666163746f7200000000000060448201526064016107a6565b600955565b6125093383610945565b61076381610c47565b600a5460ff161561255b5760405162461bcd60e51b8152602060048201526013602482015272109bdc9c9bddda5b99c81a5cc81c185d5cd959606a1b60448201526064016107a6565b6003546001600160a01b03161561262f5760035460405163368f515360e21b81526001600160a01b039091169063da3d454c906125a090339087908690600401613000565b6020604051808303816000875af11580156125bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e39190613024565b61262f5760405162461bcd60e51b815260206004820152601b60248201527f44656e69656420627920626f72726f7720636f6e74726f6c6c6572000000000060448201526064016107a6565b600061263a84612c2c565b6001600160a01b0385166000908152600d60205260408120805492935084929091906126679084906130b9565b90915550506001600160a01b0384166000908152600d60205260409020548110156126cc5760405162461bcd60e51b8152602060048201526015602482015274115e18d9595919590818dc99591a5d081b1a5b5a5d605a1b60448201526064016107a6565b81600b60008282546126de91906130b9565b909155505060405163f7f11fb760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f7f11fb7906127319087908690600401612fe7565b600060405180830381600087803b15801561274b57600080fd5b505af115801561275f573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb91506127b19086908690600401612fe7565b6020604051808303816000875af11580156127d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f49190613024565b50836001600160a01b03167fcbc04eca7e9da35cb1393a6135a199ca52e450d5e9251cbd99f7847d33a367508360405161283091815260200190565b60405180910390a250505050565b600061284984612c38565b90508181101561289b5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e74207769746864726177616c206c696d697400000060448201526064016107a6565b604051630d9167c160e21b81526001600160a01b0385811660048301527f000000000000000000000000000000000000000000000000000000000000000016906336459f0490602401602060405180830381865afa158015612901573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129259190612fa1565b156129725760405162461bcd60e51b815260206004820152601f60248201527f43616e277420776974686472617720776974682044425220646566696369740060448201526064016107a6565b600061297d85612a34565b604051636203b43b60e11b81529091506001600160a01b0382169063c4076876906129ae9087908790600401612fe7565b600060405180830381600087803b1580156129c857600080fd5b505af11580156129dc573d6000803e3d6000fd5b50505050836001600160a01b0316856001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb85604051612a2591815260200190565b60405180910390a35050505050565b6001600160a01b038181166000908152600c602052604081205490911615612a7557506001600160a01b039081166000908152600c60205260409020541690565b6000612a8083612d73565b60405163485cc95560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015285811660248301529192509082169063485cc95590604401600060405180830381600087803b158015612aef57600080fd5b505af1158015612b03573d6000803e3d6000fd5b505050506001600160a01b039283166000908152600c6020526040902080546001600160a01b031916938216939093179092555090565b600080612b468361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bac9190612fa1565b6004805460055460405163449e815d60e01b8152939450670de0b6b3a7640000936001600160a01b039092169263449e815d92612c0d927f000000000000000000000000000000000000000000000000000000000000000092909101612fe7565b6020604051808303816000875af1158015611b02573d6000803e3d6000fd5b600080610c2383612b3a565b600080612c448361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612caa9190612fa1565b905080600003612cbe575060009392505050565b6001600160a01b0384166000908152600d602052604081205490819003612ce757509392505050565b600554600003612cfc57506000949350505050565b6005546004805460405163449e815d60e01b8152600093926001600160a01b039092169163449e815d91612d54917f000000000000000000000000000000000000000000000000000000000000000091869101612fe7565b6020604051808303816000875af11580156122ac573d6000803e3d6000fd5b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f0000000000000000000000000000000000000000000000000000000000000000606081901b60148301526e5af43d82803e903d91602b57fd5bf360881b60288301526000918360378285f59250506001600160a01b038216612e355760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c656400000000000000000060448201526064016107a6565b6040516001600160a01b0383811682528416907f1cfd6e6fe6d92716198ef80381fd40e4338b9a461cc4fc235c51b152f7f830159060200160405180910390a250919050565b6001600160a01b0381168114610c5257600080fd5b600060208284031215612ea257600080fd5b8135610c4081612e7b565b60008060008060008060c08789031215612ec657600080fd5b8635612ed181612e7b565b95506020870135945060408701359350606087013560ff81168114612ef557600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215612f2257600080fd5b8235612f2d81612e7b565b946020939093013593505050565b600060208284031215612f4d57600080fd5b5035919050565b60008060408385031215612f6757600080fd5b50508035926020909101359150565b8015158114610c5257600080fd5b600060208284031215612f9657600080fd5b8135610c4081612f76565b600060208284031215612fb357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015612fe257612fe2612fba565b500390565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561303657600080fd5b8151610c4081612f76565b6020808252601f908201527f4f6e6c7920676f762063616e2063616c6c20746869732066756e6374696f6e00604082015260600190565b600081600019048311821515161561309257613092612fba565b500290565b6000826130b457634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156130cc576130cc612fba565b500190565b6000600182016130e3576130e3612fba565b506001019056fea264697066735822122032627fc751b2e776fcb5e3b14d4ec1a19f496b8c68f3affda6f3c1ef806fe51164736f6c634300080d0033000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b0000000000000000000000002b34548b865ad66a2b046cb82e59ee43f75b90fd000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd0000000000000000000000002f32a5e5e000d1a7257090df260fc08f0bab2125000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71000000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa7000000000000000000000000abe146cf570fd27ddd985895ce9b138a7110cce80000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102bb5760003560e01c80637164695a11610182578063bcead63e116100e9578063d1220a3c116100a2578063e031a8241161007c578063e031a8241461067c578063ea0593e414610685578063ebc9b94d146106ac578063fc7b9c18146106bf57600080fd5b8063d1220a3c1461062f578063d8dfeb4514610642578063e00f0a991461066957600080fd5b8063bcead63e146105a9578063c5ebeaec146105bc578063c74e6d80146105cf578063c7ed69cd146105e2578063c801861914610609578063cfad57a21461061c57600080fd5b80638951b0541161013b5780638951b0541461052d57806397904e4214610540578063b6b55f2514610553578063b75061bb14610566578063bcb4bbea14610579578063bcbaf4871461059657600080fd5b80637164695a146104b85780637adbf973146104cb5780637d32e793146104de5780637dc0d1d0146104f15780637ecebe00146105045780637f5007ed1461052457600080fd5b80633e553756116102265780634ef64ee7116101df5780634ef64ee7146104655780635a57b46f14610478578063651afe83146104805780636f1c4839146104935780636f48fbb61461049c5780636f8dd24c146104af57600080fd5b80633e553756146103d357806346e368d4146103dc578063477230b2146103ef57806347e7ef241461041857806348bde20c1461042b5780634ca8ff5a1461043e57600080fd5b80632c333e25116102785780632c333e25146103515780632e1a7d4d146103725780632ecd4e7d1461038557806334734dd3146103a55780633525f591146103b85780633644e515146103cb57600080fd5b80630e81c403146102c057806312d43a51146102d55780631ef08b751461030557806322867d7814610318578063236331e91461032b57806324a3d6221461033e575b600080fd5b6102d36102ce366004612e90565b6106c8565b005b6000546102e8906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6102d3610313366004612ead565b610767565b6102d3610326366004612f0f565b610945565b6102d3610339366004612e90565b610bcb565b6002546102e8906001600160a01b031681565b61036461035f366004612e90565b610c17565b6040519081526020016102fc565b6102d3610380366004612f3b565b610c47565b610364610393366004612e90565b600d6020526000908152604090205481565b6102d36103b3366004612f3b565b610c55565b6102d36103c6366004612ead565b610da7565b610364610f77565b61036460065481565b6102d36103ea366004612e90565b611083565b6102e86103fd366004612e90565b600c602052600090815260409020546001600160a01b031681565b6102d3610426366004612f0f565b6110cf565b6102d3610439366004612e90565b611233565b6102e87f0000000000000000000000002f32a5e5e000d1a7257090df260fc08f0bab212581565b6102e8610473366004612e90565b61127f565b6102d3611302565b6102d361048e366004612f0f565b611324565b61036460095481565b6102d36104aa366004612f3b565b611705565b61036460075481565b6102d36104c6366004612f3b565b611791565b6102d36104d9366004612e90565b61182c565b6102d36104ec366004612f3b565b611878565b6004546102e8906001600160a01b031681565b610364610512366004612e90565b600e6020526000908152604090205481565b61036460055481565b6102d361053b366004612f3b565b61195c565b61036461054e366004612e90565b611a12565b6102d3610561366004612f3b565b611b42565b6102d3610574366004612f54565b611b4c565b600a546105869060ff1681565b60405190151581526020016102fc565b6102d36105a4366004612f0f565b611b5e565b6001546102e8906001600160a01b031681565b6102d36105ca366004612f3b565b612168565b6103646105dd366004612e90565b612173565b6102e87f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71081565b6102d3610617366004612f84565b61232b565b6102d361062a366004612e90565b612426565b6102d361063d366004612f3b565b612472565b6102e87f00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa781565b6003546102e8906001600160a01b031681565b61036460085481565b6102e87f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce481565b6102d36106ba366004612f54565b6124ff565b610364600b5481565b604051630d9167c160e21b81526001600160a01b0382811660048301526000917f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710909116906336459f0490602401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190612fa1565b90506107638282611324565b5050565b428410156107af5760405162461bcd60e51b815260206004820152601060248201526f111150511312539157d156141254915160821b60448201526064015b60405180910390fd5b600060016107bb610f77565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f1f0bc49e000c018ca72680800f3b2f7ce61e76471cce3756387071d004b0eee98184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e08401909252815191012061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156108be573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906108f45750866001600160a01b0316816001600160a01b0316145b6109315760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107a6565b61093c873388612512565b50505050505050565b6001600160a01b0382166000908152600d60205260409020546001820161096a578091505b818110156109ba5760405162461bcd60e51b815260206004820152601b60248201527f52657061796d656e742067726561746572207468616e2064656274000000000060448201526064016107a6565b6001600160a01b0383166000908152600d6020526040812080548492906109e2908490612fd0565b9250508190555081600b60008282546109fb9190612fd0565b9091555050604051631b1a58c960e31b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063d8d2c64890610a4e9086908690600401612fe7565b600060405180830381600087803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b50506003546001600160a01b0316159150610af290505760035460405163081e664160e01b8152600481018490526001600160a01b039091169063081e664190602401600060405180830381600087803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b505050505b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416906323b872dd90610b4290339030908790600401613000565b6020604051808303816000875af1158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b859190613024565b5060405182815233906001600160a01b038516907f05f2eeda0e08e4b437f487c8d7d29b14537d15e3488170dc3de5dbdf8dac46849060200160405180910390a3505050565b6000546001600160a01b03163314610bf55760405162461bcd60e51b81526004016107a690613041565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080610c2383611a12565b905061271060055482610c369190613078565b610c409190613097565b9392505050565b610c5233338361283e565b50565b6000546001600160a01b03163314610c7f5760405162461bcd60e51b81526004016107a690613041565b600081118015610c9d575061271060085482610c9b91906130b9565b105b610ce95760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e7469766500000060448201526064016107a6565b600781905560055415610c52576000600554600854612710610d0b91906130b9565b600554610d1a90612710612fd0565b610d249190613078565b610d2e9190613097565b905080600754106107635760405162461bcd60e51b815260206004820152603760248201527f4e6577206c69717569646174696f6e20706172616d20616c6c6f772070726f6660448201527f697461626c652073656c66206c69717569646174696f6e00000000000000000060648201526084016107a6565b42841015610dea5760405162461bcd60e51b815260206004820152601060248201526f111150511312539157d156141254915160821b60448201526064016107a6565b60006001610df6610f77565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f7dbda1635348f4206be1d85078da9f4a74703081e4fa6e174f3fd066c56189658184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e08401909252815191012061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610ef9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610f2f5750866001600160a01b0316816001600160a01b0316145b610f6c5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107a6565b61093c87338861283e565b60007f0000000000000000000000000000000000000000000000000000000000000001461461105e5750604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b507f483aa406579ec571fc0456dd069f10221a6b42235efe2cea273db7ff8f33439a90565b6000546001600160a01b031633146110ad5760405162461bcd60e51b81526004016107a690613041565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006110da83612a34565b6040516323b872dd60e01b81529091506001600160a01b037f00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa716906323b872dd9061112d90339085908790600401613000565b6020604051808303816000875af115801561114c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111709190613024565b507f0000000000000000000000000000000000000000000000000000000000000001156111eb57806001600160a01b03166312c93f596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111d257600080fd5b505af11580156111e6573d6000803e3d6000fd5b505050505b826001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161122691815260200190565b60405180910390a2505050565b6000546001600160a01b0316331461125d5760405162461bcd60e51b81526004016107a690613041565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f0000000000000000000000002f32a5e5e000d1a7257090df260fc08f0bab2125606090811b60148301526f5af43d82803e903d91602b57fd5bf3ff60801b602883015230901b6038820152604c8101919091526037808220606c830152605591012090565b336000908152600e6020526040812080549161131d836130d1565b9190505550565b604051630d9167c160e21b81526001600160a01b0383811660048301526000917f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710909116906336459f0490602401602060405180830381865afa15801561138f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b39190612fa1565b9050600081116113f65760405162461bcd60e51b815260206004820152600e60248201526d139bc8111094881919599a58da5d60921b60448201526064016107a6565b818110156114395760405162461bcd60e51b815260206004820152601060248201526f105b5bdd5b9d080f881919599a58da5d60821b60448201526064016107a6565b60006127107f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d7106001600160a01b031663a10f84cb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561149c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c09190612fa1565b6114ca9085613078565b6114d49190613097565b90506000612710600654836114e99190613078565b6114f39190613097565b6001600160a01b0386166000908152600d60205260408120805492935084929091906115209084906130b9565b90915550506008546007546000916127109161153c9083612fd0565b6115469190612fd0565b61154f88612b3a565b6115599190613078565b6115639190613097565b6001600160a01b0387166000908152600d60205260409020549091508110156115ce5760405162461bcd60e51b815260206004820152601960248201527f457863656564656420636f6c6c61746572616c2076616c75650000000000000060448201526064016107a6565b82600b60008282546115e091906130b9565b909155505060405163b2c0877560e01b81526001600160a01b03878116600483015233602483015260448201879052606482018490527f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063b2c0877590608401600060405180830381600087803b15801561165c57600080fd5b505af1158015611670573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416925063a9059cbb91506116c29033908690600401612fe7565b6020604051808303816000875af11580156116e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c9190613024565b6000546001600160a01b0316331461172f5760405162461bcd60e51b81526004016107a690613041565b600081118015611740575061271081105b61178c5760405162461bcd60e51b815260206004820152601f60248201527f496e76616c6964207265706c656e6973686d656e7420696e63656e746976650060448201526064016107a6565b600655565b6000546001600160a01b031633146117bb5760405162461bcd60e51b81526004016107a690613041565b612710811061180c5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064016107a6565b60058190558015610c52576000600554600854612710610d0b91906130b9565b6000546001600160a01b031633146118565760405162461bcd60e51b81526004016107a690613041565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146118cb5760405162461bcd60e51b815260206004820152601660248201527513db9b1e481b195b99195c8818d85b881c9958d85b1b60521b60448201526064016107a6565b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce4169063a9059cbb906119199033908590600401612fe7565b6020604051808303816000875af1158015611938573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107639190613024565b6000546001600160a01b031633146119865760405162461bcd60e51b81526004016107a690613041565b6000811180156119a45750612710600754826119a291906130b9565b105b6119f05760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206c69717569646174696f6e2066656500000000000000000060448201526064016107a6565b600881905560055415610c52576000600554600854612710610d0b91906130b9565b600080611a1e8361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a849190612fa1565b6004805460055460405163949c4fa360e01b8152939450670de0b6b3a7640000936001600160a01b039092169263949c4fa392611ae5927f00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa792909101612fe7565b602060405180830381865afa158015611b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b269190612fa1565b611b309083613078565b611b3a9190613097565b949350505050565b610c5233826110cf565b611b5582611b42565b61076381612168565b60008111611bae5760405162461bcd60e51b815260206004820152601860248201527f4d75737420726570617920706f7369746976652064656274000000000000000060448201526064016107a6565b6001600160a01b0382166000908152600d602052604090205480611bd184612c2c565b10611c155760405162461bcd60e51b8152602060048201526014602482015273557365722064656274206973206865616c74687960601b60448201526064016107a6565b61271060095482611c269190613078565b611c309190613097565b821115611c7f5760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206c69717569646174696f6e20666163746f72000000000060448201526064016107a6565b6004805460055460405163449e815d60e01b81526000936001600160a01b039093169263449e815d92611cd4927f00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa79201612fe7565b6020604051808303816000875af1158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190612fa1565b9050600081611d2e85670de0b6b3a7640000613078565b611d389190613097565b905061271060075482611d4b9190613078565b611d559190613097565b611d5f90826130b9565b6001600160a01b0386166000908152600d6020526040812080549293508692909190611d8c908490612fd0565b9250508190555083600b6000828254611da59190612fd0565b9091555050604051631b1a58c960e31b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063d8d2c64890611df89088908890600401612fe7565b600060405180830381600087803b158015611e1257600080fd5b505af1158015611e26573d6000803e3d6000fd5b505060035460405163081e664160e01b8152600481018890526001600160a01b03909116925063081e66419150602401600060405180830381600087803b158015611e7057600080fd5b505af1158015611e84573d6000803e3d6000fd5b50506040516323b872dd60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce41692506323b872dd9150611ed890339030908990600401613000565b6020604051808303816000875af1158015611ef7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1b9190613024565b506000611f278661127f565b604051636203b43b60e11b81529091506001600160a01b0382169063c407687690611f589033908690600401612fe7565b600060405180830381600087803b158015611f7257600080fd5b505af1158015611f86573d6000803e3d6000fd5b505050506000600854111561211a5760006127106008548588670de0b6b3a7640000611fb29190613078565b611fbc9190613097565b611fc69190613078565b611fd09190613097565b90506000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612012573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120369190612fa1565b90508181106120aa57600054604051636203b43b60e11b81526001600160a01b038581169263c40768769261207392909116908690600401612fe7565b600060405180830381600087803b15801561208d57600080fd5b505af11580156120a1573d6000803e3d6000fd5b50505050612117565b801561211757600054604051636203b43b60e11b81526001600160a01b038581169263c4076876926120e492909116908590600401612fe7565b600060405180830381600087803b1580156120fe57600080fd5b505af1158015612112573d6000803e3d6000fd5b505050505b50505b604080518681526020810184905233916001600160a01b038916917ff3fa0eaee8f258c23b013654df25d1527f98a5c7ccd5e951dd77caca400ef972910160405180910390a3505050505050565b610c52333383612512565b60008061217f8361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e59190612fa1565b9050806000036121f9575060009392505050565b6001600160a01b0384166000908152600d60205260408120549081900361222257509392505050565b60055460000361223757506000949350505050565b6005546004805460405163949c4fa360e01b8152600093926001600160a01b039092169163949c4fa39161228f917f00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa791869101612fe7565b602060405180830381865afa1580156122ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d09190612fa1565b6122e284670de0b6b3a7640000613078565b6122ec9190613097565b6122f890612710613078565b6123029190613097565b90508083116123175750600095945050505050565b6123218184612fd0565b9695505050505050565b80156123b9576002546001600160a01b031633148061235457506000546001600160a01b031633145b6123b45760405162461bcd60e51b815260206004820152602b60248201527f4f6e6c7920706175736520677561726469616e206f7220676f7665726e616e6360448201526a652063616e20706175736560a81b60648201526084016107a6565b612413565b6000546001600160a01b031633146124135760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920676f7665726e616e63652063616e20756e7061757365000000000060448201526064016107a6565b600a805460ff1916911515919091179055565b6000546001600160a01b031633146124505760405162461bcd60e51b81526004016107a690613041565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461249c5760405162461bcd60e51b81526004016107a690613041565b6000811180156124ae57506127108111155b6124fa5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206c69717569646174696f6e20666163746f7200000000000060448201526064016107a6565b600955565b6125093383610945565b61076381610c47565b600a5460ff161561255b5760405162461bcd60e51b8152602060048201526013602482015272109bdc9c9bddda5b99c81a5cc81c185d5cd959606a1b60448201526064016107a6565b6003546001600160a01b03161561262f5760035460405163368f515360e21b81526001600160a01b039091169063da3d454c906125a090339087908690600401613000565b6020604051808303816000875af11580156125bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125e39190613024565b61262f5760405162461bcd60e51b815260206004820152601b60248201527f44656e69656420627920626f72726f7720636f6e74726f6c6c6572000000000060448201526064016107a6565b600061263a84612c2c565b6001600160a01b0385166000908152600d60205260408120805492935084929091906126679084906130b9565b90915550506001600160a01b0384166000908152600d60205260409020548110156126cc5760405162461bcd60e51b8152602060048201526015602482015274115e18d9595919590818dc99591a5d081b1a5b5a5d605a1b60448201526064016107a6565b81600b60008282546126de91906130b9565b909155505060405163f7f11fb760e01b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063f7f11fb7906127319087908690600401612fe7565b600060405180830381600087803b15801561274b57600080fd5b505af115801561275f573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416925063a9059cbb91506127b19086908690600401612fe7565b6020604051808303816000875af11580156127d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127f49190613024565b50836001600160a01b03167fcbc04eca7e9da35cb1393a6135a199ca52e450d5e9251cbd99f7847d33a367508360405161283091815260200190565b60405180910390a250505050565b600061284984612c38565b90508181101561289b5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e74207769746864726177616c206c696d697400000060448201526064016107a6565b604051630d9167c160e21b81526001600160a01b0385811660048301527f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71016906336459f0490602401602060405180830381865afa158015612901573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129259190612fa1565b156129725760405162461bcd60e51b815260206004820152601f60248201527f43616e277420776974686472617720776974682044425220646566696369740060448201526064016107a6565b600061297d85612a34565b604051636203b43b60e11b81529091506001600160a01b0382169063c4076876906129ae9087908790600401612fe7565b600060405180830381600087803b1580156129c857600080fd5b505af11580156129dc573d6000803e3d6000fd5b50505050836001600160a01b0316856001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb85604051612a2591815260200190565b60405180910390a35050505050565b6001600160a01b038181166000908152600c602052604081205490911615612a7557506001600160a01b039081166000908152600c60205260409020541690565b6000612a8083612d73565b60405163485cc95560e01b81526001600160a01b037f00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa78116600483015285811660248301529192509082169063485cc95590604401600060405180830381600087803b158015612aef57600080fd5b505af1158015612b03573d6000803e3d6000fd5b505050506001600160a01b039283166000908152600c6020526040902080546001600160a01b031916938216939093179092555090565b600080612b468361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bac9190612fa1565b6004805460055460405163449e815d60e01b8152939450670de0b6b3a7640000936001600160a01b039092169263449e815d92612c0d927f00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa792909101612fe7565b6020604051808303816000875af1158015611b02573d6000803e3d6000fd5b600080610c2383612b3a565b600080612c448361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612caa9190612fa1565b905080600003612cbe575060009392505050565b6001600160a01b0384166000908152600d602052604081205490819003612ce757509392505050565b600554600003612cfc57506000949350505050565b6005546004805460405163449e815d60e01b8152600093926001600160a01b039092169163449e815d91612d54917f00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa791869101612fe7565b6020604051808303816000875af11580156122ac573d6000803e3d6000fd5b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f0000000000000000000000002f32a5e5e000d1a7257090df260fc08f0bab2125606081901b60148301526e5af43d82803e903d91602b57fd5bf360881b60288301526000918360378285f59250506001600160a01b038216612e355760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c656400000000000000000060448201526064016107a6565b6040516001600160a01b0383811682528416907f1cfd6e6fe6d92716198ef80381fd40e4338b9a461cc4fc235c51b152f7f830159060200160405180910390a250919050565b6001600160a01b0381168114610c5257600080fd5b600060208284031215612ea257600080fd5b8135610c4081612e7b565b60008060008060008060c08789031215612ec657600080fd5b8635612ed181612e7b565b95506020870135945060408701359350606087013560ff81168114612ef557600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215612f2257600080fd5b8235612f2d81612e7b565b946020939093013593505050565b600060208284031215612f4d57600080fd5b5035919050565b60008060408385031215612f6757600080fd5b50508035926020909101359150565b8015158114610c5257600080fd5b600060208284031215612f9657600080fd5b8135610c4081612f76565b600060208284031215612fb357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015612fe257612fe2612fba565b500390565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561303657600080fd5b8151610c4081612f76565b6020808252601f908201527f4f6e6c7920676f762063616e2063616c6c20746869732066756e6374696f6e00604082015260600190565b600081600019048311821515161561309257613092612fba565b500290565b6000826130b457634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156130cc576130cc612fba565b500190565b6000600182016130e3576130e3612fba565b506001019056fea264697066735822122032627fc751b2e776fcb5e3b14d4ec1a19f496b8c68f3affda6f3c1ef806fe51164736f6c634300080d0033

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

000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b0000000000000000000000002b34548b865ad66a2b046cb82e59ee43f75b90fd000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd0000000000000000000000002f32a5e5e000d1a7257090df260fc08f0bab2125000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71000000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa7000000000000000000000000abe146cf570fd27ddd985895ce9b138a7110cce80000000000000000000000000000000000000000000000000000000000001388000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : _gov (address): 0x926dF14a23BE491164dCF93f4c468A50ef659D5B
Arg [1] : _lender (address): 0x2b34548b865ad66A2B046cb82e59eE43F75B90fd
Arg [2] : _pauseGuardian (address): 0xE3eD95e130ad9E15643f5A5f232a3daE980784cd
Arg [3] : _escrowImplementation (address): 0x2F32a5E5E000d1a7257090DF260fC08F0Bab2125
Arg [4] : _dbr (address): 0xAD038Eb671c44b853887A7E32528FaB35dC5D710
Arg [5] : _collateral (address): 0x62B9c7356A2Dc64a1969e19C23e4f579F9810Aa7
Arg [6] : _oracle (address): 0xaBe146CF570FD27ddD985895ce9B138a7110cce8
Arg [7] : _collateralFactorBps (uint256): 5000
Arg [8] : _replenishmentIncentiveBps (uint256): 5000
Arg [9] : _liquidationIncentiveBps (uint256): 1000
Arg [10] : _callOnDepositCallback (bool): True

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b
Arg [1] : 0000000000000000000000002b34548b865ad66a2b046cb82e59ee43f75b90fd
Arg [2] : 000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd
Arg [3] : 0000000000000000000000002f32a5e5e000d1a7257090df260fc08f0bab2125
Arg [4] : 000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710
Arg [5] : 00000000000000000000000062b9c7356a2dc64a1969e19c23e4f579f9810aa7
Arg [6] : 000000000000000000000000abe146cf570fd27ddd985895ce9b138a7110cce8
Arg [7] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [8] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [9] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000001


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

Borrow DOLA using cvxCRV as collateral on Inverse Finance's FiRM fixed rate lending market

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.