ETH Price: $3,100.16 (+1.53%)
Gas: 25 Gwei

Contract

0x63fAd99705a255fE2D500e498dbb3A9aE5AA1Ee8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Deposit191295532024-01-31 22:51:5974 days ago1706741519IN
Inverse Finance: FiRM CRV Market
0 ETH0.0013658929.39236903
Deposit190768012024-01-24 13:29:3582 days ago1706102975IN
Inverse Finance: FiRM CRV Market
0 ETH0.0005900214.15089785
Deposit189585482024-01-07 23:45:2398 days ago1704671123IN
Inverse Finance: FiRM CRV Market
0 ETH0.0015971834.37845295
Deposit189584772024-01-07 23:31:1198 days ago1704670271IN
Inverse Finance: FiRM CRV Market
0 ETH0.0014619831.46820189
Withdraw188363182023-12-21 19:26:59115 days ago1703186819IN
Inverse Finance: FiRM CRV Market
0 ETH0.005665944.3608969
Deposit181255372023-09-13 6:15:35215 days ago1694585735IN
Inverse Finance: FiRM CRV Market
0 ETH0.0009126321.64530679
Deposit180054222023-08-27 10:31:23232 days ago1693132283IN
Inverse Finance: FiRM CRV Market
0 ETH0.0006087112.97479574
Deposit179933082023-08-25 17:50:47233 days ago1692985847IN
Inverse Finance: FiRM CRV Market
0 ETH0.0014057129.95543605
Deposit178909892023-08-11 10:16:11248 days ago1691748971IN
Inverse Finance: FiRM CRV Market
0 ETH0.0007025214.97438355
Deposit178445762023-08-04 22:24:11254 days ago1691187851IN
Inverse Finance: FiRM CRV Market
0 ETH0.0008544918.20443567
Deposit178299662023-08-02 21:21:35256 days ago1691011295IN
Inverse Finance: FiRM CRV Market
0 ETH0.0012271926.1511999
Withdraw178202812023-08-01 12:54:11258 days ago1690894451IN
Inverse Finance: FiRM CRV Market
0 ETH0.0014614517.99507827
Repay178190182023-08-01 8:40:35258 days ago1690879235IN
Inverse Finance: FiRM CRV Market
0 ETH0.0013076515.45204064
Repay178189872023-08-01 8:34:23258 days ago1690878863IN
Inverse Finance: FiRM CRV Market
0 ETH0.0013734116.22900868
Deposit176425682023-07-07 14:37:47283 days ago1688740667IN
Inverse Finance: FiRM CRV Market
0 ETH0.0021748651.61175534
Borrow176425202023-07-07 14:28:11283 days ago1688740091IN
Inverse Finance: FiRM CRV Market
0 ETH0.0120880559.24149843
Borrow176361802023-07-06 17:06:47284 days ago1688663207IN
Inverse Finance: FiRM CRV Market
0 ETH0.0053083928.39364693
Repay175569452023-06-25 13:58:59295 days ago1687701539IN
Inverse Finance: FiRM CRV Market
0 ETH0.0011231812.83422441
Borrow175569022023-06-25 13:50:23295 days ago1687701023IN
Inverse Finance: FiRM CRV Market
0 ETH0.0024142611.83132043
Borrow174954462023-06-16 22:44:59303 days ago1686955499IN
Inverse Finance: FiRM CRV Market
0 ETH0.0041801220.48729381
Deposit174954432023-06-16 22:44:23303 days ago1686955463IN
Inverse Finance: FiRM CRV Market
0 ETH0.0008921921.17262485
Deposit And Borr...174838812023-06-15 7:43:11305 days ago1686814991IN
Inverse Finance: FiRM CRV Market
0 ETH0.0039270517.85478891
Repay174817222023-06-15 0:26:35305 days ago1686788795IN
Inverse Finance: FiRM CRV Market
0 ETH0.0015698218.54995169
Deposit174813222023-06-14 23:05:11305 days ago1686783911IN
Inverse Finance: FiRM CRV Market
0 ETH0.0008164219.38020622
Deposit And Borr...174806992023-06-14 20:57:59305 days ago1686776279IN
Inverse Finance: FiRM CRV Market
0 ETH0.010783949.03024261
View all transactions

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To Value
171233352023-04-25 12:41:11356 days ago1682426471
Inverse Finance: FiRM CRV Market
 Contract Creation0 ETH
170353852023-04-13 0:30:11368 days ago1681345811
Inverse Finance: FiRM CRV Market
 Contract Creation0 ETH
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);
        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/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/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

[{"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"}]

61016060405273865377367054516e17014ccded1e7d814edc9ce460c0526113886009553480156200003057600080fd5b50604051620036cd380380620036cd8339810160408190526200005391620003a0565b6127108410620000aa5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064015b60405180910390fd5b600082118015620000bc575061271082105b6200010a5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e746976650000006044820152606401620000a1565b6127108310620001745760405162461bcd60e51b815260206004820152602e60248201527f5265706c656e6973686d656e7420696e63656e74697665206d7573742062652060448201526d6c657373207468616e203130302560901b6064820152608401620000a1565b600080546001600160a01b03808e166001600160a01b031992831617909255600180548d8416908316179055600280548c841690831617905589821660805288821660a05287821660e0526004805492881692909116919091179055600584905560068390556007829055801515610100524661012052620002ac604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b610140526005541562000376576000600554600854612710620002d091906200049c565b600554620002e190612710620004b7565b620002ed9190620004d1565b620002f99190620004f3565b90508060075410620003745760405162461bcd60e51b815260206004820152603360248201527f4c69717569646174696f6e20706172616d20616c6c6f772070726f666974616260448201527f6c652073656c66206c69717569646174696f6e000000000000000000000000006064820152608401620000a1565b505b505050505050505050505062000516565b6001600160a01b03811681146200039d57600080fd5b50565b60008060008060008060008060008060006101608c8e031215620003c357600080fd5b8b51620003d08162000387565b60208d0151909b50620003e38162000387565b60408d0151909a50620003f68162000387565b60608d0151909950620004098162000387565b60808d01519098506200041c8162000387565b60a08d01519097506200042f8162000387565b60c08d0151909650620004428162000387565b8095505060e08c015193506101008c015192506101208c015191506101408c015180151581146200047257600080fd5b809150509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b60008219821115620004b257620004b262000486565b500190565b600082821015620004cc57620004cc62000486565b500390565b6000816000190483118215151615620004ee57620004ee62000486565b500290565b6000826200051157634e487b7160e01b600052601260045260246000fd5b500490565b60805160a05160c05160e0516101005161012051610140516130c26200060b600039600061106101526000610f7b01526000611173015260008181610647015281816110f401528181611abd01528181611cae0152818161220901528181612a3901528181612b870152612cce01526000818161068a01528181610b0901528181611689015281816118e201528181611e3f015261271a0152600081816105e7015281816106ea01528181610a1701528181611346015281816114400152818161161801528181611dc10152818161269c015261285c0152600081816104430152818161129e0152612d3401526130c26000f3fe608060405234801561001057600080fd5b50600436106102bb5760003560e01c80637164695a11610182578063bcead63e116100e9578063d1220a3c116100a2578063e031a8241161007c578063e031a8241461067c578063ea0593e414610685578063ebc9b94d146106ac578063fc7b9c18146106bf57600080fd5b8063d1220a3c1461062f578063d8dfeb4514610642578063e00f0a991461066957600080fd5b8063bcead63e146105a9578063c5ebeaec146105bc578063c74e6d80146105cf578063c7ed69cd146105e2578063c801861914610609578063cfad57a21461061c57600080fd5b80638951b0541161013b5780638951b0541461052d57806397904e4214610540578063b6b55f2514610553578063b75061bb14610566578063bcb4bbea14610579578063bcbaf4871461059657600080fd5b80637164695a146104b85780637adbf973146104cb5780637d32e793146104de5780637dc0d1d0146104f15780637ecebe00146105045780637f5007ed1461052457600080fd5b80633e553756116102265780634ef64ee7116101df5780634ef64ee7146104655780635a57b46f14610478578063651afe83146104805780636f1c4839146104935780636f48fbb61461049c5780636f8dd24c146104af57600080fd5b80633e553756146103d357806346e368d4146103dc578063477230b2146103ef57806347e7ef241461041857806348bde20c1461042b5780634ca8ff5a1461043e57600080fd5b80632c333e25116102785780632c333e25146103515780632e1a7d4d146103725780632ecd4e7d1461038557806334734dd3146103a55780633525f591146103b85780633644e515146103cb57600080fd5b80630e81c403146102c057806312d43a51146102d55780631ef08b751461030557806322867d7814610318578063236331e91461032b57806324a3d6221461033e575b600080fd5b6102d36102ce366004612e32565b6106c8565b005b6000546102e8906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6102d3610313366004612e4f565b610767565b6102d3610326366004612eb1565b610945565b6102d3610339366004612e32565b610bcb565b6002546102e8906001600160a01b031681565b61036461035f366004612e32565b610c17565b6040519081526020016102fc565b6102d3610380366004612edd565b610c47565b610364610393366004612e32565b600d6020526000908152604090205481565b6102d36103b3366004612edd565b610c55565b6102d36103c6366004612e4f565b610da7565b610364610f77565b61036460065481565b6102d36103ea366004612e32565b611083565b6102e86103fd366004612e32565b600c602052600090815260409020546001600160a01b031681565b6102d3610426366004612eb1565b6110cf565b6102d3610439366004612e32565b611233565b6102e87f000000000000000000000000000000000000000000000000000000000000000081565b6102e8610473366004612e32565b61127f565b6102d3611302565b6102d361048e366004612eb1565b611324565b61036460095481565b6102d36104aa366004612edd565b611705565b61036460075481565b6102d36104c6366004612edd565b611791565b6102d36104d9366004612e32565b61182c565b6102d36104ec366004612edd565b611878565b6004546102e8906001600160a01b031681565b610364610512366004612e32565b600e6020526000908152604090205481565b61036460055481565b6102d361053b366004612edd565b61195c565b61036461054e366004612e32565b611a12565b6102d3610561366004612edd565b611b42565b6102d3610574366004612ef6565b611b4c565b600a546105869060ff1681565b60405190151581526020016102fc565b6102d36105a4366004612eb1565b611b5e565b6001546102e8906001600160a01b031681565b6102d36105ca366004612edd565b61210a565b6103646105dd366004612e32565b612115565b6102e87f000000000000000000000000000000000000000000000000000000000000000081565b6102d3610617366004612f26565b6122cd565b6102d361062a366004612e32565b6123c8565b6102d361063d366004612edd565b612414565b6102e87f000000000000000000000000000000000000000000000000000000000000000081565b6003546102e8906001600160a01b031681565b61036460085481565b6102e87f000000000000000000000000000000000000000000000000000000000000000081565b6102d36106ba366004612ef6565b6124a1565b610364600b5481565b604051630d9167c160e21b81526001600160a01b0382811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906336459f0490602401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190612f43565b90506107638282611324565b5050565b428410156107af5760405162461bcd60e51b815260206004820152601060248201526f111150511312539157d156141254915160821b60448201526064015b60405180910390fd5b600060016107bb610f77565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f1f0bc49e000c018ca72680800f3b2f7ce61e76471cce3756387071d004b0eee98184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e08401909252815191012061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156108be573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906108f45750866001600160a01b0316816001600160a01b0316145b6109315760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107a6565b61093c8733886124b4565b50505050505050565b6001600160a01b0382166000908152600d60205260409020546001820161096a578091505b818110156109ba5760405162461bcd60e51b815260206004820152601b60248201527f52657061796d656e742067726561746572207468616e2064656274000000000060448201526064016107a6565b6001600160a01b0383166000908152600d6020526040812080548492906109e2908490612f72565b9250508190555081600b60008282546109fb9190612f72565b9091555050604051631b1a58c960e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d8d2c64890610a4e9086908690600401612f89565b600060405180830381600087803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b50506003546001600160a01b0316159150610af290505760035460405163081e664160e01b8152600481018490526001600160a01b039091169063081e664190602401600060405180830381600087803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b505050505b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90610b4290339030908790600401612fa2565b6020604051808303816000875af1158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b859190612fc6565b5060405182815233906001600160a01b038516907f05f2eeda0e08e4b437f487c8d7d29b14537d15e3488170dc3de5dbdf8dac46849060200160405180910390a3505050565b6000546001600160a01b03163314610bf55760405162461bcd60e51b81526004016107a690612fe3565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080610c2383611a12565b905061271060055482610c36919061301a565b610c409190613039565b9392505050565b610c523333836127e0565b50565b6000546001600160a01b03163314610c7f5760405162461bcd60e51b81526004016107a690612fe3565b600081118015610c9d575061271060085482610c9b919061305b565b105b610ce95760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e7469766500000060448201526064016107a6565b600781905560055415610c52576000600554600854612710610d0b919061305b565b600554610d1a90612710612f72565b610d24919061301a565b610d2e9190613039565b905080600754106107635760405162461bcd60e51b815260206004820152603760248201527f4e6577206c69717569646174696f6e20706172616d20616c6c6f772070726f6660448201527f697461626c652073656c66206c69717569646174696f6e00000000000000000060648201526084016107a6565b42841015610dea5760405162461bcd60e51b815260206004820152601060248201526f111150511312539157d156141254915160821b60448201526064016107a6565b60006001610df6610f77565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f7dbda1635348f4206be1d85078da9f4a74703081e4fa6e174f3fd066c56189658184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e08401909252815191012061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610ef9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610f2f5750866001600160a01b0316816001600160a01b0316145b610f6c5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107a6565b61093c8733886127e0565b60007f0000000000000000000000000000000000000000000000000000000000000000461461105e5750604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6000546001600160a01b031633146110ad5760405162461bcd60e51b81526004016107a690612fe3565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006110da836129d6565b6040516323b872dd60e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061112d90339085908790600401612fa2565b6020604051808303816000875af115801561114c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111709190612fc6565b507f0000000000000000000000000000000000000000000000000000000000000000156111eb57806001600160a01b03166312c93f596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111d257600080fd5b505af11580156111e6573d6000803e3d6000fd5b505050505b826001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161122691815260200190565b60405180910390a2505050565b6000546001600160a01b0316331461125d5760405162461bcd60e51b81526004016107a690612fe3565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f0000000000000000000000000000000000000000000000000000000000000000606090811b60148301526f5af43d82803e903d91602b57fd5bf3ff60801b602883015230901b6038820152604c8101919091526037808220606c830152605591012090565b336000908152600e6020526040812080549161131d83613073565b9190505550565b604051630d9167c160e21b81526001600160a01b0383811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906336459f0490602401602060405180830381865afa15801561138f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b39190612f43565b9050600081116113f65760405162461bcd60e51b815260206004820152600e60248201526d139bc8111094881919599a58da5d60921b60448201526064016107a6565b818110156114395760405162461bcd60e51b815260206004820152601060248201526f105b5bdd5b9d080f881919599a58da5d60821b60448201526064016107a6565b60006127107f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a10f84cb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561149c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c09190612f43565b6114ca908561301a565b6114d49190613039565b90506000612710600654836114e9919061301a565b6114f39190613039565b6001600160a01b0386166000908152600d602052604081208054929350849290919061152090849061305b565b90915550506008546007546000916127109161153c9083612f72565b6115469190612f72565b61154f88612adc565b611559919061301a565b6115639190613039565b6001600160a01b0387166000908152600d60205260409020549091508110156115ce5760405162461bcd60e51b815260206004820152601960248201527f457863656564656420636f6c6c61746572616c2076616c75650000000000000060448201526064016107a6565b82600b60008282546115e0919061305b565b909155505060405163b2c0877560e01b81526001600160a01b03878116600483015233602483015260448201879052606482018490527f0000000000000000000000000000000000000000000000000000000000000000169063b2c0877590608401600060405180830381600087803b15801561165c57600080fd5b505af1158015611670573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb91506116c29033908690600401612f89565b6020604051808303816000875af11580156116e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c9190612fc6565b6000546001600160a01b0316331461172f5760405162461bcd60e51b81526004016107a690612fe3565b600081118015611740575061271081105b61178c5760405162461bcd60e51b815260206004820152601f60248201527f496e76616c6964207265706c656e6973686d656e7420696e63656e746976650060448201526064016107a6565b600655565b6000546001600160a01b031633146117bb5760405162461bcd60e51b81526004016107a690612fe3565b612710811061180c5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064016107a6565b60058190558015610c52576000600554600854612710610d0b919061305b565b6000546001600160a01b031633146118565760405162461bcd60e51b81526004016107a690612fe3565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146118cb5760405162461bcd60e51b815260206004820152601660248201527513db9b1e481b195b99195c8818d85b881c9958d85b1b60521b60448201526064016107a6565b60405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906119199033908590600401612f89565b6020604051808303816000875af1158015611938573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107639190612fc6565b6000546001600160a01b031633146119865760405162461bcd60e51b81526004016107a690612fe3565b6000811180156119a45750612710600754826119a2919061305b565b105b6119f05760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206c69717569646174696f6e2066656500000000000000000060448201526064016107a6565b600881905560055415610c52576000600554600854612710610d0b919061305b565b600080611a1e8361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a849190612f43565b6004805460055460405163949c4fa360e01b8152939450670de0b6b3a7640000936001600160a01b039092169263949c4fa392611ae5927f000000000000000000000000000000000000000000000000000000000000000092909101612f89565b602060405180830381865afa158015611b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b269190612f43565b611b30908361301a565b611b3a9190613039565b949350505050565b610c5233826110cf565b611b5582611b42565b6107638161210a565b60008111611bae5760405162461bcd60e51b815260206004820152601860248201527f4d75737420726570617920706f7369746976652064656274000000000000000060448201526064016107a6565b6001600160a01b0382166000908152600d602052604090205480611bd184612bce565b10611c155760405162461bcd60e51b8152602060048201526014602482015273557365722064656274206973206865616c74687960601b60448201526064016107a6565b61271060095482611c26919061301a565b611c309190613039565b821115611c7f5760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206c69717569646174696f6e20666163746f72000000000060448201526064016107a6565b6004805460055460405163449e815d60e01b81526000936001600160a01b039093169263449e815d92611cd4927f00000000000000000000000000000000000000000000000000000000000000009201612f89565b6020604051808303816000875af1158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190612f43565b9050600081611d2e85670de0b6b3a764000061301a565b611d389190613039565b905061271060075482611d4b919061301a565b611d559190613039565b611d5f908261305b565b6001600160a01b0386166000908152600d6020526040812080549293508692909190611d8c908490612f72565b9250508190555083600b6000828254611da59190612f72565b9091555050604051631b1a58c960e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d8d2c64890611df89088908890600401612f89565b600060405180830381600087803b158015611e1257600080fd5b505af1158015611e26573d6000803e3d6000fd5b50506040516323b872dd60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692506323b872dd9150611e7a90339030908990600401612fa2565b6020604051808303816000875af1158015611e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebd9190612fc6565b506000611ec98661127f565b604051636203b43b60e11b81529091506001600160a01b0382169063c407687690611efa9033908690600401612f89565b600060405180830381600087803b158015611f1457600080fd5b505af1158015611f28573d6000803e3d6000fd5b50505050600060085411156120bc5760006127106008548588670de0b6b3a7640000611f54919061301a565b611f5e9190613039565b611f68919061301a565b611f729190613039565b90506000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd89190612f43565b905081811061204c57600054604051636203b43b60e11b81526001600160a01b038581169263c40768769261201592909116908690600401612f89565b600060405180830381600087803b15801561202f57600080fd5b505af1158015612043573d6000803e3d6000fd5b505050506120b9565b80156120b957600054604051636203b43b60e11b81526001600160a01b038581169263c40768769261208692909116908590600401612f89565b600060405180830381600087803b1580156120a057600080fd5b505af11580156120b4573d6000803e3d6000fd5b505050505b50505b604080518681526020810184905233916001600160a01b038916917ff3fa0eaee8f258c23b013654df25d1527f98a5c7ccd5e951dd77caca400ef972910160405180910390a3505050505050565b610c523333836124b4565b6000806121218361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612163573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121879190612f43565b90508060000361219b575060009392505050565b6001600160a01b0384166000908152600d6020526040812054908190036121c457509392505050565b6005546000036121d957506000949350505050565b6005546004805460405163949c4fa360e01b8152600093926001600160a01b039092169163949c4fa391612231917f000000000000000000000000000000000000000000000000000000000000000091869101612f89565b602060405180830381865afa15801561224e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122729190612f43565b61228484670de0b6b3a764000061301a565b61228e9190613039565b61229a9061271061301a565b6122a49190613039565b90508083116122b95750600095945050505050565b6122c38184612f72565b9695505050505050565b801561235b576002546001600160a01b03163314806122f657506000546001600160a01b031633145b6123565760405162461bcd60e51b815260206004820152602b60248201527f4f6e6c7920706175736520677561726469616e206f7220676f7665726e616e6360448201526a652063616e20706175736560a81b60648201526084016107a6565b6123b5565b6000546001600160a01b031633146123b55760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920676f7665726e616e63652063616e20756e7061757365000000000060448201526064016107a6565b600a805460ff1916911515919091179055565b6000546001600160a01b031633146123f25760405162461bcd60e51b81526004016107a690612fe3565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461243e5760405162461bcd60e51b81526004016107a690612fe3565b60008111801561245057506127108111155b61249c5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206c69717569646174696f6e20666163746f7200000000000060448201526064016107a6565b600955565b6124ab3383610945565b61076381610c47565b600a5460ff16156124fd5760405162461bcd60e51b8152602060048201526013602482015272109bdc9c9bddda5b99c81a5cc81c185d5cd959606a1b60448201526064016107a6565b6003546001600160a01b0316156125d15760035460405163368f515360e21b81526001600160a01b039091169063da3d454c9061254290339087908690600401612fa2565b6020604051808303816000875af1158015612561573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125859190612fc6565b6125d15760405162461bcd60e51b815260206004820152601b60248201527f44656e69656420627920626f72726f7720636f6e74726f6c6c6572000000000060448201526064016107a6565b60006125dc84612bce565b6001600160a01b0385166000908152600d602052604081208054929350849290919061260990849061305b565b90915550506001600160a01b0384166000908152600d602052604090205481101561266e5760405162461bcd60e51b8152602060048201526015602482015274115e18d9595919590818dc99591a5d081b1a5b5a5d605a1b60448201526064016107a6565b81600b6000828254612680919061305b565b909155505060405163f7f11fb760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f7f11fb7906126d39087908690600401612f89565b600060405180830381600087803b1580156126ed57600080fd5b505af1158015612701573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb91506127539086908690600401612f89565b6020604051808303816000875af1158015612772573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127969190612fc6565b50836001600160a01b03167fcbc04eca7e9da35cb1393a6135a199ca52e450d5e9251cbd99f7847d33a36750836040516127d291815260200190565b60405180910390a250505050565b60006127eb84612bda565b90508181101561283d5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e74207769746864726177616c206c696d697400000060448201526064016107a6565b604051630d9167c160e21b81526001600160a01b0385811660048301527f000000000000000000000000000000000000000000000000000000000000000016906336459f0490602401602060405180830381865afa1580156128a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c79190612f43565b156129145760405162461bcd60e51b815260206004820152601f60248201527f43616e277420776974686472617720776974682044425220646566696369740060448201526064016107a6565b600061291f856129d6565b604051636203b43b60e11b81529091506001600160a01b0382169063c4076876906129509087908790600401612f89565b600060405180830381600087803b15801561296a57600080fd5b505af115801561297e573d6000803e3d6000fd5b50505050836001600160a01b0316856001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb856040516129c791815260200190565b60405180910390a35050505050565b6001600160a01b038181166000908152600c602052604081205490911615612a1757506001600160a01b039081166000908152600c60205260409020541690565b6000612a2283612d15565b60405163485cc95560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015285811660248301529192509082169063485cc95590604401600060405180830381600087803b158015612a9157600080fd5b505af1158015612aa5573d6000803e3d6000fd5b505050506001600160a01b039283166000908152600c6020526040902080546001600160a01b031916938216939093179092555090565b600080612ae88361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b4e9190612f43565b6004805460055460405163449e815d60e01b8152939450670de0b6b3a7640000936001600160a01b039092169263449e815d92612baf927f000000000000000000000000000000000000000000000000000000000000000092909101612f89565b6020604051808303816000875af1158015611b02573d6000803e3d6000fd5b600080610c2383612adc565b600080612be68361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c4c9190612f43565b905080600003612c60575060009392505050565b6001600160a01b0384166000908152600d602052604081205490819003612c8957509392505050565b600554600003612c9e57506000949350505050565b6005546004805460405163449e815d60e01b8152600093926001600160a01b039092169163449e815d91612cf6917f000000000000000000000000000000000000000000000000000000000000000091869101612f89565b6020604051808303816000875af115801561224e573d6000803e3d6000fd5b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f0000000000000000000000000000000000000000000000000000000000000000606081901b60148301526e5af43d82803e903d91602b57fd5bf360881b60288301526000918360378285f59250506001600160a01b038216612dd75760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c656400000000000000000060448201526064016107a6565b6040516001600160a01b0383811682528416907f1cfd6e6fe6d92716198ef80381fd40e4338b9a461cc4fc235c51b152f7f830159060200160405180910390a250919050565b6001600160a01b0381168114610c5257600080fd5b600060208284031215612e4457600080fd5b8135610c4081612e1d565b60008060008060008060c08789031215612e6857600080fd5b8635612e7381612e1d565b95506020870135945060408701359350606087013560ff81168114612e9757600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215612ec457600080fd5b8235612ecf81612e1d565b946020939093013593505050565b600060208284031215612eef57600080fd5b5035919050565b60008060408385031215612f0957600080fd5b50508035926020909101359150565b8015158114610c5257600080fd5b600060208284031215612f3857600080fd5b8135610c4081612f18565b600060208284031215612f5557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015612f8457612f84612f5c565b500390565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215612fd857600080fd5b8151610c4081612f18565b6020808252601f908201527f4f6e6c7920676f762063616e2063616c6c20746869732066756e6374696f6e00604082015260600190565b600081600019048311821515161561303457613034612f5c565b500290565b60008261305657634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561306e5761306e612f5c565b500190565b60006001820161308557613085612f5c565b506001019056fea2646970667358221220ea3f6dc6c319d9ba898ddbe4bfff27d6307c8d3eeb007aa0a4d2930849ad5b7664736f6c634300080d0033000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b0000000000000000000000002b34548b865ad66a2b046cb82e59ee43f75b90fd000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd000000000000000000000000c06053fcad0a0df7cc32289a135bbea9030c010f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000abe146cf570fd27ddd985895ce9b138a7110cce80000000000000000000000000000000000000000000000000000000000001964000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102bb5760003560e01c80637164695a11610182578063bcead63e116100e9578063d1220a3c116100a2578063e031a8241161007c578063e031a8241461067c578063ea0593e414610685578063ebc9b94d146106ac578063fc7b9c18146106bf57600080fd5b8063d1220a3c1461062f578063d8dfeb4514610642578063e00f0a991461066957600080fd5b8063bcead63e146105a9578063c5ebeaec146105bc578063c74e6d80146105cf578063c7ed69cd146105e2578063c801861914610609578063cfad57a21461061c57600080fd5b80638951b0541161013b5780638951b0541461052d57806397904e4214610540578063b6b55f2514610553578063b75061bb14610566578063bcb4bbea14610579578063bcbaf4871461059657600080fd5b80637164695a146104b85780637adbf973146104cb5780637d32e793146104de5780637dc0d1d0146104f15780637ecebe00146105045780637f5007ed1461052457600080fd5b80633e553756116102265780634ef64ee7116101df5780634ef64ee7146104655780635a57b46f14610478578063651afe83146104805780636f1c4839146104935780636f48fbb61461049c5780636f8dd24c146104af57600080fd5b80633e553756146103d357806346e368d4146103dc578063477230b2146103ef57806347e7ef241461041857806348bde20c1461042b5780634ca8ff5a1461043e57600080fd5b80632c333e25116102785780632c333e25146103515780632e1a7d4d146103725780632ecd4e7d1461038557806334734dd3146103a55780633525f591146103b85780633644e515146103cb57600080fd5b80630e81c403146102c057806312d43a51146102d55780631ef08b751461030557806322867d7814610318578063236331e91461032b57806324a3d6221461033e575b600080fd5b6102d36102ce366004612e32565b6106c8565b005b6000546102e8906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6102d3610313366004612e4f565b610767565b6102d3610326366004612eb1565b610945565b6102d3610339366004612e32565b610bcb565b6002546102e8906001600160a01b031681565b61036461035f366004612e32565b610c17565b6040519081526020016102fc565b6102d3610380366004612edd565b610c47565b610364610393366004612e32565b600d6020526000908152604090205481565b6102d36103b3366004612edd565b610c55565b6102d36103c6366004612e4f565b610da7565b610364610f77565b61036460065481565b6102d36103ea366004612e32565b611083565b6102e86103fd366004612e32565b600c602052600090815260409020546001600160a01b031681565b6102d3610426366004612eb1565b6110cf565b6102d3610439366004612e32565b611233565b6102e87f000000000000000000000000c06053fcad0a0df7cc32289a135bbea9030c010f81565b6102e8610473366004612e32565b61127f565b6102d3611302565b6102d361048e366004612eb1565b611324565b61036460095481565b6102d36104aa366004612edd565b611705565b61036460075481565b6102d36104c6366004612edd565b611791565b6102d36104d9366004612e32565b61182c565b6102d36104ec366004612edd565b611878565b6004546102e8906001600160a01b031681565b610364610512366004612e32565b600e6020526000908152604090205481565b61036460055481565b6102d361053b366004612edd565b61195c565b61036461054e366004612e32565b611a12565b6102d3610561366004612edd565b611b42565b6102d3610574366004612ef6565b611b4c565b600a546105869060ff1681565b60405190151581526020016102fc565b6102d36105a4366004612eb1565b611b5e565b6001546102e8906001600160a01b031681565b6102d36105ca366004612edd565b61210a565b6103646105dd366004612e32565b612115565b6102e87f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71081565b6102d3610617366004612f26565b6122cd565b6102d361062a366004612e32565b6123c8565b6102d361063d366004612edd565b612414565b6102e87f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd5281565b6003546102e8906001600160a01b031681565b61036460085481565b6102e87f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce481565b6102d36106ba366004612ef6565b6124a1565b610364600b5481565b604051630d9167c160e21b81526001600160a01b0382811660048301526000917f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710909116906336459f0490602401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190612f43565b90506107638282611324565b5050565b428410156107af5760405162461bcd60e51b815260206004820152601060248201526f111150511312539157d156141254915160821b60448201526064015b60405180910390fd5b600060016107bb610f77565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f1f0bc49e000c018ca72680800f3b2f7ce61e76471cce3756387071d004b0eee98184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e08401909252815191012061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156108be573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906108f45750866001600160a01b0316816001600160a01b0316145b6109315760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107a6565b61093c8733886124b4565b50505050505050565b6001600160a01b0382166000908152600d60205260409020546001820161096a578091505b818110156109ba5760405162461bcd60e51b815260206004820152601b60248201527f52657061796d656e742067726561746572207468616e2064656274000000000060448201526064016107a6565b6001600160a01b0383166000908152600d6020526040812080548492906109e2908490612f72565b9250508190555081600b60008282546109fb9190612f72565b9091555050604051631b1a58c960e31b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063d8d2c64890610a4e9086908690600401612f89565b600060405180830381600087803b158015610a6857600080fd5b505af1158015610a7c573d6000803e3d6000fd5b50506003546001600160a01b0316159150610af290505760035460405163081e664160e01b8152600481018490526001600160a01b039091169063081e664190602401600060405180830381600087803b158015610ad957600080fd5b505af1158015610aed573d6000803e3d6000fd5b505050505b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416906323b872dd90610b4290339030908790600401612fa2565b6020604051808303816000875af1158015610b61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b859190612fc6565b5060405182815233906001600160a01b038516907f05f2eeda0e08e4b437f487c8d7d29b14537d15e3488170dc3de5dbdf8dac46849060200160405180910390a3505050565b6000546001600160a01b03163314610bf55760405162461bcd60e51b81526004016107a690612fe3565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080610c2383611a12565b905061271060055482610c36919061301a565b610c409190613039565b9392505050565b610c523333836127e0565b50565b6000546001600160a01b03163314610c7f5760405162461bcd60e51b81526004016107a690612fe3565b600081118015610c9d575061271060085482610c9b919061305b565b105b610ce95760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e7469766500000060448201526064016107a6565b600781905560055415610c52576000600554600854612710610d0b919061305b565b600554610d1a90612710612f72565b610d24919061301a565b610d2e9190613039565b905080600754106107635760405162461bcd60e51b815260206004820152603760248201527f4e6577206c69717569646174696f6e20706172616d20616c6c6f772070726f6660448201527f697461626c652073656c66206c69717569646174696f6e00000000000000000060648201526084016107a6565b42841015610dea5760405162461bcd60e51b815260206004820152601060248201526f111150511312539157d156141254915160821b60448201526064016107a6565b60006001610df6610f77565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f7dbda1635348f4206be1d85078da9f4a74703081e4fa6e174f3fd066c56189658184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e08401909252815191012061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610ef9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610f2f5750866001600160a01b0316816001600160a01b0316145b610f6c5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b60448201526064016107a6565b61093c8733886127e0565b60007f0000000000000000000000000000000000000000000000000000000000000001461461105e5750604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b507f5a56fdb539ff958f3e44f5924ad71a1fe7763a8935e2232e71d00db9e0e9650890565b6000546001600160a01b031633146110ad5760405162461bcd60e51b81526004016107a690612fe3565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006110da836129d6565b6040516323b872dd60e01b81529091506001600160a01b037f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd5216906323b872dd9061112d90339085908790600401612fa2565b6020604051808303816000875af115801561114c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111709190612fc6565b507f0000000000000000000000000000000000000000000000000000000000000000156111eb57806001600160a01b03166312c93f596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111d257600080fd5b505af11580156111e6573d6000803e3d6000fd5b505050505b826001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161122691815260200190565b60405180910390a2505050565b6000546001600160a01b0316331461125d5760405162461bcd60e51b81526004016107a690612fe3565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f000000000000000000000000c06053fcad0a0df7cc32289a135bbea9030c010f606090811b60148301526f5af43d82803e903d91602b57fd5bf3ff60801b602883015230901b6038820152604c8101919091526037808220606c830152605591012090565b336000908152600e6020526040812080549161131d83613073565b9190505550565b604051630d9167c160e21b81526001600160a01b0383811660048301526000917f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710909116906336459f0490602401602060405180830381865afa15801561138f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b39190612f43565b9050600081116113f65760405162461bcd60e51b815260206004820152600e60248201526d139bc8111094881919599a58da5d60921b60448201526064016107a6565b818110156114395760405162461bcd60e51b815260206004820152601060248201526f105b5bdd5b9d080f881919599a58da5d60821b60448201526064016107a6565b60006127107f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d7106001600160a01b031663a10f84cb6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561149c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c09190612f43565b6114ca908561301a565b6114d49190613039565b90506000612710600654836114e9919061301a565b6114f39190613039565b6001600160a01b0386166000908152600d602052604081208054929350849290919061152090849061305b565b90915550506008546007546000916127109161153c9083612f72565b6115469190612f72565b61154f88612adc565b611559919061301a565b6115639190613039565b6001600160a01b0387166000908152600d60205260409020549091508110156115ce5760405162461bcd60e51b815260206004820152601960248201527f457863656564656420636f6c6c61746572616c2076616c75650000000000000060448201526064016107a6565b82600b60008282546115e0919061305b565b909155505060405163b2c0877560e01b81526001600160a01b03878116600483015233602483015260448201879052606482018490527f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063b2c0877590608401600060405180830381600087803b15801561165c57600080fd5b505af1158015611670573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416925063a9059cbb91506116c29033908690600401612f89565b6020604051808303816000875af11580156116e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093c9190612fc6565b6000546001600160a01b0316331461172f5760405162461bcd60e51b81526004016107a690612fe3565b600081118015611740575061271081105b61178c5760405162461bcd60e51b815260206004820152601f60248201527f496e76616c6964207265706c656e6973686d656e7420696e63656e746976650060448201526064016107a6565b600655565b6000546001600160a01b031633146117bb5760405162461bcd60e51b81526004016107a690612fe3565b612710811061180c5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064016107a6565b60058190558015610c52576000600554600854612710610d0b919061305b565b6000546001600160a01b031633146118565760405162461bcd60e51b81526004016107a690612fe3565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146118cb5760405162461bcd60e51b815260206004820152601660248201527513db9b1e481b195b99195c8818d85b881c9958d85b1b60521b60448201526064016107a6565b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce4169063a9059cbb906119199033908590600401612f89565b6020604051808303816000875af1158015611938573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107639190612fc6565b6000546001600160a01b031633146119865760405162461bcd60e51b81526004016107a690612fe3565b6000811180156119a45750612710600754826119a2919061305b565b105b6119f05760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206c69717569646174696f6e2066656500000000000000000060448201526064016107a6565b600881905560055415610c52576000600554600854612710610d0b919061305b565b600080611a1e8361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a849190612f43565b6004805460055460405163949c4fa360e01b8152939450670de0b6b3a7640000936001600160a01b039092169263949c4fa392611ae5927f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd5292909101612f89565b602060405180830381865afa158015611b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b269190612f43565b611b30908361301a565b611b3a9190613039565b949350505050565b610c5233826110cf565b611b5582611b42565b6107638161210a565b60008111611bae5760405162461bcd60e51b815260206004820152601860248201527f4d75737420726570617920706f7369746976652064656274000000000000000060448201526064016107a6565b6001600160a01b0382166000908152600d602052604090205480611bd184612bce565b10611c155760405162461bcd60e51b8152602060048201526014602482015273557365722064656274206973206865616c74687960601b60448201526064016107a6565b61271060095482611c26919061301a565b611c309190613039565b821115611c7f5760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206c69717569646174696f6e20666163746f72000000000060448201526064016107a6565b6004805460055460405163449e815d60e01b81526000936001600160a01b039093169263449e815d92611cd4927f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd529201612f89565b6020604051808303816000875af1158015611cf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d179190612f43565b9050600081611d2e85670de0b6b3a764000061301a565b611d389190613039565b905061271060075482611d4b919061301a565b611d559190613039565b611d5f908261305b565b6001600160a01b0386166000908152600d6020526040812080549293508692909190611d8c908490612f72565b9250508190555083600b6000828254611da59190612f72565b9091555050604051631b1a58c960e31b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063d8d2c64890611df89088908890600401612f89565b600060405180830381600087803b158015611e1257600080fd5b505af1158015611e26573d6000803e3d6000fd5b50506040516323b872dd60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce41692506323b872dd9150611e7a90339030908990600401612fa2565b6020604051808303816000875af1158015611e99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebd9190612fc6565b506000611ec98661127f565b604051636203b43b60e11b81529091506001600160a01b0382169063c407687690611efa9033908690600401612f89565b600060405180830381600087803b158015611f1457600080fd5b505af1158015611f28573d6000803e3d6000fd5b50505050600060085411156120bc5760006127106008548588670de0b6b3a7640000611f54919061301a565b611f5e9190613039565b611f68919061301a565b611f729190613039565b90506000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd89190612f43565b905081811061204c57600054604051636203b43b60e11b81526001600160a01b038581169263c40768769261201592909116908690600401612f89565b600060405180830381600087803b15801561202f57600080fd5b505af1158015612043573d6000803e3d6000fd5b505050506120b9565b80156120b957600054604051636203b43b60e11b81526001600160a01b038581169263c40768769261208692909116908590600401612f89565b600060405180830381600087803b1580156120a057600080fd5b505af11580156120b4573d6000803e3d6000fd5b505050505b50505b604080518681526020810184905233916001600160a01b038916917ff3fa0eaee8f258c23b013654df25d1527f98a5c7ccd5e951dd77caca400ef972910160405180910390a3505050505050565b610c523333836124b4565b6000806121218361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612163573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121879190612f43565b90508060000361219b575060009392505050565b6001600160a01b0384166000908152600d6020526040812054908190036121c457509392505050565b6005546000036121d957506000949350505050565b6005546004805460405163949c4fa360e01b8152600093926001600160a01b039092169163949c4fa391612231917f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd5291869101612f89565b602060405180830381865afa15801561224e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122729190612f43565b61228484670de0b6b3a764000061301a565b61228e9190613039565b61229a9061271061301a565b6122a49190613039565b90508083116122b95750600095945050505050565b6122c38184612f72565b9695505050505050565b801561235b576002546001600160a01b03163314806122f657506000546001600160a01b031633145b6123565760405162461bcd60e51b815260206004820152602b60248201527f4f6e6c7920706175736520677561726469616e206f7220676f7665726e616e6360448201526a652063616e20706175736560a81b60648201526084016107a6565b6123b5565b6000546001600160a01b031633146123b55760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920676f7665726e616e63652063616e20756e7061757365000000000060448201526064016107a6565b600a805460ff1916911515919091179055565b6000546001600160a01b031633146123f25760405162461bcd60e51b81526004016107a690612fe3565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461243e5760405162461bcd60e51b81526004016107a690612fe3565b60008111801561245057506127108111155b61249c5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206c69717569646174696f6e20666163746f7200000000000060448201526064016107a6565b600955565b6124ab3383610945565b61076381610c47565b600a5460ff16156124fd5760405162461bcd60e51b8152602060048201526013602482015272109bdc9c9bddda5b99c81a5cc81c185d5cd959606a1b60448201526064016107a6565b6003546001600160a01b0316156125d15760035460405163368f515360e21b81526001600160a01b039091169063da3d454c9061254290339087908690600401612fa2565b6020604051808303816000875af1158015612561573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125859190612fc6565b6125d15760405162461bcd60e51b815260206004820152601b60248201527f44656e69656420627920626f72726f7720636f6e74726f6c6c6572000000000060448201526064016107a6565b60006125dc84612bce565b6001600160a01b0385166000908152600d602052604081208054929350849290919061260990849061305b565b90915550506001600160a01b0384166000908152600d602052604090205481101561266e5760405162461bcd60e51b8152602060048201526015602482015274115e18d9595919590818dc99591a5d081b1a5b5a5d605a1b60448201526064016107a6565b81600b6000828254612680919061305b565b909155505060405163f7f11fb760e01b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063f7f11fb7906126d39087908690600401612f89565b600060405180830381600087803b1580156126ed57600080fd5b505af1158015612701573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416925063a9059cbb91506127539086908690600401612f89565b6020604051808303816000875af1158015612772573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127969190612fc6565b50836001600160a01b03167fcbc04eca7e9da35cb1393a6135a199ca52e450d5e9251cbd99f7847d33a36750836040516127d291815260200190565b60405180910390a250505050565b60006127eb84612bda565b90508181101561283d5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e74207769746864726177616c206c696d697400000060448201526064016107a6565b604051630d9167c160e21b81526001600160a01b0385811660048301527f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71016906336459f0490602401602060405180830381865afa1580156128a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128c79190612f43565b156129145760405162461bcd60e51b815260206004820152601f60248201527f43616e277420776974686472617720776974682044425220646566696369740060448201526064016107a6565b600061291f856129d6565b604051636203b43b60e11b81529091506001600160a01b0382169063c4076876906129509087908790600401612f89565b600060405180830381600087803b15801561296a57600080fd5b505af115801561297e573d6000803e3d6000fd5b50505050836001600160a01b0316856001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb856040516129c791815260200190565b60405180910390a35050505050565b6001600160a01b038181166000908152600c602052604081205490911615612a1757506001600160a01b039081166000908152600c60205260409020541690565b6000612a2283612d15565b60405163485cc95560e01b81526001600160a01b037f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd528116600483015285811660248301529192509082169063485cc95590604401600060405180830381600087803b158015612a9157600080fd5b505af1158015612aa5573d6000803e3d6000fd5b505050506001600160a01b039283166000908152600c6020526040902080546001600160a01b031916938216939093179092555090565b600080612ae88361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b4e9190612f43565b6004805460055460405163449e815d60e01b8152939450670de0b6b3a7640000936001600160a01b039092169263449e815d92612baf927f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd5292909101612f89565b6020604051808303816000875af1158015611b02573d6000803e3d6000fd5b600080610c2383612adc565b600080612be68361127f565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c4c9190612f43565b905080600003612c60575060009392505050565b6001600160a01b0384166000908152600d602052604081205490819003612c8957509392505050565b600554600003612c9e57506000949350505050565b6005546004805460405163449e815d60e01b8152600093926001600160a01b039092169163449e815d91612cf6917f000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd5291869101612f89565b6020604051808303816000875af115801561224e573d6000803e3d6000fd5b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f000000000000000000000000c06053fcad0a0df7cc32289a135bbea9030c010f606081901b60148301526e5af43d82803e903d91602b57fd5bf360881b60288301526000918360378285f59250506001600160a01b038216612dd75760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c656400000000000000000060448201526064016107a6565b6040516001600160a01b0383811682528416907f1cfd6e6fe6d92716198ef80381fd40e4338b9a461cc4fc235c51b152f7f830159060200160405180910390a250919050565b6001600160a01b0381168114610c5257600080fd5b600060208284031215612e4457600080fd5b8135610c4081612e1d565b60008060008060008060c08789031215612e6857600080fd5b8635612e7381612e1d565b95506020870135945060408701359350606087013560ff81168114612e9757600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215612ec457600080fd5b8235612ecf81612e1d565b946020939093013593505050565b600060208284031215612eef57600080fd5b5035919050565b60008060408385031215612f0957600080fd5b50508035926020909101359150565b8015158114610c5257600080fd5b600060208284031215612f3857600080fd5b8135610c4081612f18565b600060208284031215612f5557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015612f8457612f84612f5c565b500390565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b600060208284031215612fd857600080fd5b8151610c4081612f18565b6020808252601f908201527f4f6e6c7920676f762063616e2063616c6c20746869732066756e6374696f6e00604082015260600190565b600081600019048311821515161561303457613034612f5c565b500290565b60008261305657634e487b7160e01b600052601260045260246000fd5b500490565b6000821982111561306e5761306e612f5c565b500190565b60006001820161308557613085612f5c565b506001019056fea2646970667358221220ea3f6dc6c319d9ba898ddbe4bfff27d6307c8d3eeb007aa0a4d2930849ad5b7664736f6c634300080d0033

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

000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b0000000000000000000000002b34548b865ad66a2b046cb82e59ee43f75b90fd000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd000000000000000000000000c06053fcad0a0df7cc32289a135bbea9030c010f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000abe146cf570fd27ddd985895ce9b138a7110cce80000000000000000000000000000000000000000000000000000000000001964000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000000

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

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


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 CRV 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
[ 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.