More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 979 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Repay | 20642505 | 3 hrs ago | IN | 0 ETH | 0.00038454 | ||||
Deposit | 20642226 | 4 hrs ago | IN | 0 ETH | 0.00102057 | ||||
Borrow | 20642213 | 4 hrs ago | IN | 0 ETH | 0.00177549 | ||||
Repay | 20641094 | 8 hrs ago | IN | 0 ETH | 0.0001867 | ||||
Deposit And Borr... | 20637384 | 21 hrs ago | IN | 0 ETH | 0.00035642 | ||||
Deposit | 20634149 | 31 hrs ago | IN | 0 ETH | 0.00054641 | ||||
Deposit And Borr... | 20630590 | 43 hrs ago | IN | 0 ETH | 0.00031966 | ||||
Deposit | 20626933 | 2 days ago | IN | 0 ETH | 0.00020423 | ||||
Deposit | 20625172 | 2 days ago | IN | 0 ETH | 0.00018455 | ||||
Borrow | 20625164 | 2 days ago | IN | 0 ETH | 0.00029593 | ||||
Deposit | 20623255 | 2 days ago | IN | 0 ETH | 0.00019957 | ||||
Repay | 20613813 | 4 days ago | IN | 0 ETH | 0.00024827 | ||||
Withdraw | 20598301 | 6 days ago | IN | 0 ETH | 0.00012085 | ||||
Borrow | 20597932 | 6 days ago | IN | 0 ETH | 0.0001505 | ||||
Withdraw | 20594232 | 6 days ago | IN | 0 ETH | 0.00028126 | ||||
Borrow | 20589929 | 7 days ago | IN | 0 ETH | 0.00018215 | ||||
Deposit And Borr... | 20586790 | 7 days ago | IN | 0 ETH | 0.00062932 | ||||
Deposit | 20582353 | 8 days ago | IN | 0 ETH | 0.00023848 | ||||
Deposit | 20581227 | 8 days ago | IN | 0 ETH | 0.00012203 | ||||
Borrow | 20581218 | 8 days ago | IN | 0 ETH | 0.00018115 | ||||
Deposit | 20581067 | 8 days ago | IN | 0 ETH | 0.00018297 | ||||
Deposit And Borr... | 20580490 | 8 days ago | IN | 0 ETH | 0.00029403 | ||||
Borrow | 20579538 | 8 days ago | IN | 0 ETH | 0.00049394 | ||||
Withdraw | 20579158 | 9 days ago | IN | 0 ETH | 0.0002007 | ||||
Deposit | 20578669 | 9 days ago | IN | 0 ETH | 0.0007596 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Market
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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 withdrawing maximum allowed to msg.sender. @dev Useful for use with escrows that continously compound tokens, so there won't be dust amounts left @dev Dangerous to use when the user has any amount of debt! */ function withdrawMax() public { withdrawInternal(msg.sender, msg.sender, getWithdrawalLimitInternal(msg.sender)); } /** @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 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. @dev Useful for use with escrows that continously compound tokens, so there won't be dust amounts left @dev Dangerous to use when the user has any amount of debt! @param from The address of the user owning the escrow being withdrawn from @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 withdrawMaxOnBehalf(address from, 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( "WithdrawMaxOnBehalf(address caller,address from,uint256 nonce,uint256 deadline)" ), msg.sender, from, nonces[from]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == from, "INVALID_SIGNER"); withdrawInternal(from, msg.sender, getWithdrawalLimitInternal(from)); } } /** @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); if(address(borrowController) != address(0)){ borrowController.onRepay(repaidDebt); } dola.transferFrom(msg.sender, address(this), repaidDebt); IEscrow escrow = predictEscrow(user); escrow.pay(msg.sender, liquidatorReward); if(liquidationFeeBps > 0) { uint liquidationFee = repaidDebt * 1 ether / price * liquidationFeeBps / 10000; uint balance = escrow.balance(); if(balance >= liquidationFee) { escrow.pay(gov, liquidationFee); } else if(balance > 0) { escrow.pay(gov, balance); } } emit Liquidate(user, msg.sender, repaidDebt, liquidatorReward); } event Deposit(address indexed account, uint amount); event Borrow(address indexed account, uint amount); event Withdraw(address indexed account, address indexed to, uint amount); event Repay(address indexed account, address indexed repayer, uint amount); event Liquidate(address indexed account, address indexed liquidator, uint repaidDebt, uint liquidatorReward); event CreateEscrow(address indexed user, address escrow); }
{ "remappings": [ "ds-test/=lib/solmate/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":[],"name":"withdrawMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"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":"withdrawMaxOnBehalf","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"}]
Contract Creation Code
61016060405273865377367054516e17014ccded1e7d814edc9ce460c0526113886009553480156200003057600080fd5b506040516200393f3803806200393f8339810160408190526200005391620003a0565b6127108410620000aa5760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064015b60405180910390fd5b600082118015620000bc575061271082105b6200010a5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e746976650000006044820152606401620000a1565b6127108310620001745760405162461bcd60e51b815260206004820152602e60248201527f5265706c656e6973686d656e7420696e63656e74697665206d7573742062652060448201526d6c657373207468616e203130302560901b6064820152608401620000a1565b600080546001600160a01b03808e166001600160a01b031992831617909255600180548d8416908316179055600280548c841690831617905589821660805288821660a05287821660e0526004805492881692909116919091179055600584905560068390556007829055801515610100524661012052620002ac604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b610140526005541562000376576000600554600854612710620002d091906200049c565b600554620002e190612710620004b7565b620002ed9190620004d1565b620002f99190620004f3565b90508060075410620003745760405162461bcd60e51b815260206004820152603360248201527f4c69717569646174696f6e20706172616d20616c6c6f772070726f666974616260448201527f6c652073656c66206c69717569646174696f6e000000000000000000000000006064820152608401620000a1565b505b505050505050505050505062000516565b6001600160a01b03811681146200039d57600080fd5b50565b60008060008060008060008060008060006101608c8e031215620003c357600080fd5b8b51620003d08162000387565b60208d0151909b50620003e38162000387565b60408d0151909a50620003f68162000387565b60608d0151909950620004098162000387565b60808d01519098506200041c8162000387565b60a08d01519097506200042f8162000387565b60c08d0151909650620004428162000387565b8095505060e08c015193506101008c015192506101208c015191506101408c015180151581146200047257600080fd5b809150509295989b509295989b9093969950565b634e487b7160e01b600052601160045260246000fd5b60008219821115620004b257620004b262000486565b500190565b600082821015620004cc57620004cc62000486565b500390565b6000816000190483118215151615620004ee57620004ee62000486565b500290565b6000826200051157634e487b7160e01b600052601260045260246000fd5b500490565b60805160a05160c05160e0516101005161012051610140516133346200060b6000396000611186015260006110a0015260006112980152600081816106900152818161121901528181611be201528181611dd3015281816123a00152818161274f01528181612d1b0152612e690152600081816106db01528181610c86015281816117ae01528181611a0701528181611fd80152612bf20152600081816106300152818161073b01528181610b940152818161146b015281816115650152818161173d01528181611ee6015281816128120152612b7401526000818161048c015281816113c30152612edb01526133346000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c80637164695a1161019d578063c5ebeaec116100e9578063d8dfeb45116100a2578063e5cd8b6a1161007c578063e5cd8b6a146106ce578063ea0593e4146106d6578063ebc9b94d146106fd578063fc7b9c181461071057600080fd5b8063d8dfeb451461068b578063e00f0a99146106b2578063e031a824146106c557600080fd5b8063c5ebeaec14610605578063c74e6d8014610618578063c7ed69cd1461062b578063c801861914610652578063cfad57a214610665578063d1220a3c1461067857600080fd5b80638951b05411610156578063b75061bb11610130578063b75061bb146105af578063bcb4bbea146105c2578063bcbaf487146105df578063bcead63e146105f257600080fd5b80638951b0541461057657806397904e4214610589578063b6b55f251461059c57600080fd5b80637164695a146105015780637adbf973146105145780637d32e793146105275780637dc0d1d01461053a5780637ecebe001461054d5780637f5007ed1461056d57600080fd5b80633644e5151161025c5780634ca8ff5a11610215578063651afe83116101ef578063651afe83146104c95780636f1c4839146104dc5780636f48fbb6146104e55780636f8dd24c146104f857600080fd5b80634ca8ff5a146104875780634ef64ee7146104ae5780635a57b46f146104c157600080fd5b80633644e515146104145780633e5537561461041c57806346e368d414610425578063477230b21461043857806347e7ef241461046157806348bde20c1461047457600080fd5b806324a3d622116102ae57806324a3d622146103875780632c333e251461039a5780632e1a7d4d146103bb5780632ecd4e7d146103ce57806334734dd3146103ee5780633525f5911461040157600080fd5b80630e81c403146102f657806312d43a511461030b5780631e5a3a4b1461033b5780631ef08b751461034e57806322867d7814610361578063236331e914610374575b600080fd5b610309610304366004612fd9565b610719565b005b60005461031e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61030961034936600461300c565b6107b8565b61030961035c36600461305c565b610941565b61030961036f3660046130b6565b610ac2565b610309610382366004612fd9565b610d48565b60025461031e906001600160a01b031681565b6103ad6103a8366004612fd9565b610d94565b604051908152602001610332565b6103096103c93660046130e2565b610dc4565b6103ad6103dc366004612fd9565b600d6020526000908152604090205481565b6103096103fc3660046130e2565b610dd2565b61030961040f36600461305c565b610f24565b6103ad61109c565b6103ad60065481565b610309610433366004612fd9565b6111a8565b61031e610446366004612fd9565b600c602052600090815260409020546001600160a01b031681565b61030961046f3660046130b6565b6111f4565b610309610482366004612fd9565b611358565b61031e7f000000000000000000000000000000000000000000000000000000000000000081565b61031e6104bc366004612fd9565b6113a4565b610309611427565b6103096104d73660046130b6565b611449565b6103ad60095481565b6103096104f33660046130e2565b61182a565b6103ad60075481565b61030961050f3660046130e2565b6118b6565b610309610522366004612fd9565b611951565b6103096105353660046130e2565b61199d565b60045461031e906001600160a01b031681565b6103ad61055b366004612fd9565b600e6020526000908152604090205481565b6103ad60055481565b6103096105843660046130e2565b611a81565b6103ad610597366004612fd9565b611b37565b6103096105aa3660046130e2565b611c67565b6103096105bd3660046130fb565b611c71565b600a546105cf9060ff1681565b6040519015158152602001610332565b6103096105ed3660046130b6565b611c83565b60015461031e906001600160a01b031681565b6103096106133660046130e2565b6122a1565b6103ad610626366004612fd9565b6122ac565b61031e7f000000000000000000000000000000000000000000000000000000000000000081565b61030961066036600461312b565b612464565b610309610673366004612fd9565b61255f565b6103096106863660046130e2565b6125ab565b61031e7f000000000000000000000000000000000000000000000000000000000000000081565b60035461031e906001600160a01b031681565b6103ad60085481565b610309612638565b61031e7f000000000000000000000000000000000000000000000000000000000000000081565b61030961070b3660046130fb565b612648565b6103ad600b5481565b604051630d9167c160e21b81526001600160a01b0382811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906336459f0490602401602060405180830381865afa158015610784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a89190613148565b90506107b48282611449565b5050565b428410156107e15760405162461bcd60e51b81526004016107d890613161565b60405180910390fd5b600060016107ed61109c565b6001600160a01b0388166000818152600e602090815260409182902080546001810190915582517f8d1d73617555ca8eaa7b0817ffc5bca6d6180656a9e3bc96c20620c10b2254088184015233818501526060810194909452608084015260a08084018b90528251808503909101815260c084019092528151910120610876929160e00161318b565b60408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156108d4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061090a5750856001600160a01b0316816001600160a01b0316145b6109265760405162461bcd60e51b81526004016107d8906131a6565b61093986336109348961265b565b612796565b505050505050565b428410156109615760405162461bcd60e51b81526004016107d890613161565b6000600161096d61109c565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f1f0bc49e000c018ca72680800f3b2f7ce61e76471cce3756387071d004b0eee98184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e0840190925281519101206109fe92916101000161318b565b60408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610a5c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610a925750866001600160a01b0316816001600160a01b0316145b610aae5760405162461bcd60e51b81526004016107d8906131a6565b610ab987338861298c565b50505050505050565b6001600160a01b0382166000908152600d602052604090205460018201610ae7578091505b81811015610b375760405162461bcd60e51b815260206004820152601b60248201527f52657061796d656e742067726561746572207468616e2064656274000000000060448201526064016107d8565b6001600160a01b0383166000908152600d602052604081208054849290610b5f9084906131e4565b9250508190555081600b6000828254610b7891906131e4565b9091555050604051631b1a58c960e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d8d2c64890610bcb90869086906004016131fb565b600060405180830381600087803b158015610be557600080fd5b505af1158015610bf9573d6000803e3d6000fd5b50506003546001600160a01b0316159150610c6f90505760035460405163081e664160e01b8152600481018490526001600160a01b039091169063081e664190602401600060405180830381600087803b158015610c5657600080fd5b505af1158015610c6a573d6000803e3d6000fd5b505050505b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90610cbf90339030908790600401613214565b6020604051808303816000875af1158015610cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d029190613238565b5060405182815233906001600160a01b038516907f05f2eeda0e08e4b437f487c8d7d29b14537d15e3488170dc3de5dbdf8dac46849060200160405180910390a3505050565b6000546001600160a01b03163314610d725760405162461bcd60e51b81526004016107d890613255565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080610da083611b37565b905061271060055482610db3919061328c565b610dbd91906132ab565b9392505050565b610dcf333383612796565b50565b6000546001600160a01b03163314610dfc5760405162461bcd60e51b81526004016107d890613255565b600081118015610e1a575061271060085482610e1891906132cd565b105b610e665760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e7469766500000060448201526064016107d8565b600781905560055415610dcf576000600554600854612710610e8891906132cd565b600554610e97906127106131e4565b610ea1919061328c565b610eab91906132ab565b905080600754106107b45760405162461bcd60e51b815260206004820152603760248201527f4e6577206c69717569646174696f6e20706172616d20616c6c6f772070726f6660448201527f697461626c652073656c66206c69717569646174696f6e00000000000000000060648201526084016107d8565b42841015610f445760405162461bcd60e51b81526004016107d890613161565b60006001610f5061109c565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f7dbda1635348f4206be1d85078da9f4a74703081e4fa6e174f3fd066c56189658184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e084019092528151910120610fe192916101000161318b565b60408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561103f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110755750866001600160a01b0316816001600160a01b0316145b6110915760405162461bcd60e51b81526004016107d8906131a6565b610ab9873388612796565b60007f000000000000000000000000000000000000000000000000000000000000000046146111835750604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6000546001600160a01b031633146111d25760405162461bcd60e51b81526004016107d890613255565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006111ff83612cb8565b6040516323b872dd60e01b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061125290339085908790600401613214565b6020604051808303816000875af1158015611271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112959190613238565b507f00000000000000000000000000000000000000000000000000000000000000001561131057806001600160a01b03166312c93f596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156112f757600080fd5b505af115801561130b573d6000803e3d6000fd5b505050505b826001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161134b91815260200190565b60405180910390a2505050565b6000546001600160a01b031633146113825760405162461bcd60e51b81526004016107d890613255565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f0000000000000000000000000000000000000000000000000000000000000000606090811b60148301526f5af43d82803e903d91602b57fd5bf3ff60801b602883015230901b6038820152604c8101919091526037808220606c830152605591012090565b336000908152600e60205260408120805491611442836132e5565b9190505550565b604051630d9167c160e21b81526001600160a01b0383811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906336459f0490602401602060405180830381865afa1580156114b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d89190613148565b90506000811161151b5760405162461bcd60e51b815260206004820152600e60248201526d139bc8111094881919599a58da5d60921b60448201526064016107d8565b8181101561155e5760405162461bcd60e51b815260206004820152601060248201526f105b5bdd5b9d080f881919599a58da5d60821b60448201526064016107d8565b60006127107f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a10f84cb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e59190613148565b6115ef908561328c565b6115f991906132ab565b905060006127106006548361160e919061328c565b61161891906132ab565b6001600160a01b0386166000908152600d60205260408120805492935084929091906116459084906132cd565b90915550506008546007546000916127109161166190836131e4565b61166b91906131e4565b61167488612dbe565b61167e919061328c565b61168891906132ab565b6001600160a01b0387166000908152600d60205260409020549091508110156116f35760405162461bcd60e51b815260206004820152601960248201527f457863656564656420636f6c6c61746572616c2076616c75650000000000000060448201526064016107d8565b82600b600082825461170591906132cd565b909155505060405163b2c0877560e01b81526001600160a01b03878116600483015233602483015260448201879052606482018490527f0000000000000000000000000000000000000000000000000000000000000000169063b2c0877590608401600060405180830381600087803b15801561178157600080fd5b505af1158015611795573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb91506117e790339086906004016131fb565b6020604051808303816000875af1158015611806573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab99190613238565b6000546001600160a01b031633146118545760405162461bcd60e51b81526004016107d890613255565b600081118015611865575061271081105b6118b15760405162461bcd60e51b815260206004820152601f60248201527f496e76616c6964207265706c656e6973686d656e7420696e63656e746976650060448201526064016107d8565b600655565b6000546001600160a01b031633146118e05760405162461bcd60e51b81526004016107d890613255565b61271081106119315760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064016107d8565b60058190558015610dcf576000600554600854612710610e8891906132cd565b6000546001600160a01b0316331461197b5760405162461bcd60e51b81526004016107d890613255565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146119f05760405162461bcd60e51b815260206004820152601660248201527513db9b1e481b195b99195c8818d85b881c9958d85b1b60521b60448201526064016107d8565b60405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90611a3e90339085906004016131fb565b6020604051808303816000875af1158015611a5d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b49190613238565b6000546001600160a01b03163314611aab5760405162461bcd60e51b81526004016107d890613255565b600081118015611ac9575061271060075482611ac791906132cd565b105b611b155760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206c69717569646174696f6e2066656500000000000000000060448201526064016107d8565b600881905560055415610dcf576000600554600854612710610e8891906132cd565b600080611b43836113a4565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba99190613148565b6004805460055460405163949c4fa360e01b8152939450670de0b6b3a7640000936001600160a01b039092169263949c4fa392611c0a927f0000000000000000000000000000000000000000000000000000000000000000929091016131fb565b602060405180830381865afa158015611c27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4b9190613148565b611c55908361328c565b611c5f91906132ab565b949350505050565b610dcf33826111f4565b611c7a82611c67565b6107b4816122a1565b60008111611cd35760405162461bcd60e51b815260206004820152601860248201527f4d75737420726570617920706f7369746976652064656274000000000000000060448201526064016107d8565b6001600160a01b0382166000908152600d602052604090205480611cf684612eb0565b10611d3a5760405162461bcd60e51b8152602060048201526014602482015273557365722064656274206973206865616c74687960601b60448201526064016107d8565b61271060095482611d4b919061328c565b611d5591906132ab565b821115611da45760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206c69717569646174696f6e20666163746f72000000000060448201526064016107d8565b6004805460055460405163449e815d60e01b81526000936001600160a01b039093169263449e815d92611df9927f000000000000000000000000000000000000000000000000000000000000000092016131fb565b6020604051808303816000875af1158015611e18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3c9190613148565b9050600081611e5385670de0b6b3a764000061328c565b611e5d91906132ab565b905061271060075482611e70919061328c565b611e7a91906132ab565b611e8490826132cd565b6001600160a01b0386166000908152600d6020526040812080549293508692909190611eb19084906131e4565b9250508190555083600b6000828254611eca91906131e4565b9091555050604051631b1a58c960e31b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d8d2c64890611f1d90889088906004016131fb565b600060405180830381600087803b158015611f3757600080fd5b505af1158015611f4b573d6000803e3d6000fd5b50506003546001600160a01b0316159150611fc190505760035460405163081e664160e01b8152600481018690526001600160a01b039091169063081e664190602401600060405180830381600087803b158015611fa857600080fd5b505af1158015611fbc573d6000803e3d6000fd5b505050505b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061201190339030908990600401613214565b6020604051808303816000875af1158015612030573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120549190613238565b506000612060866113a4565b604051636203b43b60e11b81529091506001600160a01b0382169063c40768769061209190339086906004016131fb565b600060405180830381600087803b1580156120ab57600080fd5b505af11580156120bf573d6000803e3d6000fd5b50505050600060085411156122535760006127106008548588670de0b6b3a76400006120eb919061328c565b6120f591906132ab565b6120ff919061328c565b61210991906132ab565b90506000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561214b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216f9190613148565b90508181106121e357600054604051636203b43b60e11b81526001600160a01b038581169263c4076876926121ac929091169086906004016131fb565b600060405180830381600087803b1580156121c657600080fd5b505af11580156121da573d6000803e3d6000fd5b50505050612250565b801561225057600054604051636203b43b60e11b81526001600160a01b038581169263c40768769261221d929091169085906004016131fb565b600060405180830381600087803b15801561223757600080fd5b505af115801561224b573d6000803e3d6000fd5b505050505b50505b604080518681526020810184905233916001600160a01b038916917ff3fa0eaee8f258c23b013654df25d1527f98a5c7ccd5e951dd77caca400ef972910160405180910390a3505050505050565b610dcf33338361298c565b6000806122b8836113a4565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231e9190613148565b905080600003612332575060009392505050565b6001600160a01b0384166000908152600d60205260408120549081900361235b57509392505050565b60055460000361237057506000949350505050565b6005546004805460405163949c4fa360e01b8152600093926001600160a01b039092169163949c4fa3916123c8917f0000000000000000000000000000000000000000000000000000000000000000918691016131fb565b602060405180830381865afa1580156123e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124099190613148565b61241b84670de0b6b3a764000061328c565b61242591906132ab565b6124319061271061328c565b61243b91906132ab565b90508083116124505750600095945050505050565b61245a81846131e4565b9695505050505050565b80156124f2576002546001600160a01b031633148061248d57506000546001600160a01b031633145b6124ed5760405162461bcd60e51b815260206004820152602b60248201527f4f6e6c7920706175736520677561726469616e206f7220676f7665726e616e6360448201526a652063616e20706175736560a81b60648201526084016107d8565b61254c565b6000546001600160a01b0316331461254c5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920676f7665726e616e63652063616e20756e7061757365000000000060448201526064016107d8565b600a805460ff1916911515919091179055565b6000546001600160a01b031633146125895760405162461bcd60e51b81526004016107d890613255565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146125d55760405162461bcd60e51b81526004016107d890613255565b6000811180156125e757506127108111155b6126335760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206c69717569646174696f6e20666163746f7200000000000060448201526064016107d8565b600955565b61264633336109343361265b565b565b6126523383610ac2565b6107b481610dc4565b600080612667836113a4565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126cd9190613148565b9050806000036126e1575060009392505050565b6001600160a01b0384166000908152600d60205260408120549081900361270a57509392505050565b60055460000361271f57506000949350505050565b6005546004805460405163449e815d60e01b8152600093926001600160a01b039092169163449e815d91612777917f0000000000000000000000000000000000000000000000000000000000000000918691016131fb565b6020604051808303816000875af11580156123e5573d6000803e3d6000fd5b60006127a18461265b565b9050818110156127f35760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e74207769746864726177616c206c696d697400000060448201526064016107d8565b604051630d9167c160e21b81526001600160a01b0385811660048301527f000000000000000000000000000000000000000000000000000000000000000016906336459f0490602401602060405180830381865afa158015612859573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061287d9190613148565b156128ca5760405162461bcd60e51b815260206004820152601f60248201527f43616e277420776974686472617720776974682044425220646566696369740060448201526064016107d8565b60006128d585612cb8565b604051636203b43b60e11b81529091506001600160a01b0382169063c40768769061290690879087906004016131fb565b600060405180830381600087803b15801561292057600080fd5b505af1158015612934573d6000803e3d6000fd5b50505050836001600160a01b0316856001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8560405161297d91815260200190565b60405180910390a35050505050565b600a5460ff16156129d55760405162461bcd60e51b8152602060048201526013602482015272109bdc9c9bddda5b99c81a5cc81c185d5cd959606a1b60448201526064016107d8565b6003546001600160a01b031615612aa95760035460405163368f515360e21b81526001600160a01b039091169063da3d454c90612a1a90339087908690600401613214565b6020604051808303816000875af1158015612a39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5d9190613238565b612aa95760405162461bcd60e51b815260206004820152601b60248201527f44656e69656420627920626f72726f7720636f6e74726f6c6c6572000000000060448201526064016107d8565b6000612ab484612eb0565b6001600160a01b0385166000908152600d6020526040812080549293508492909190612ae19084906132cd565b90915550506001600160a01b0384166000908152600d6020526040902054811015612b465760405162461bcd60e51b8152602060048201526015602482015274115e18d9595919590818dc99591a5d081b1a5b5a5d605a1b60448201526064016107d8565b81600b6000828254612b5891906132cd565b909155505060405163f7f11fb760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f7f11fb790612bab90879086906004016131fb565b600060405180830381600087803b158015612bc557600080fd5b505af1158015612bd9573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150612c2b90869086906004016131fb565b6020604051808303816000875af1158015612c4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c6e9190613238565b50836001600160a01b03167fcbc04eca7e9da35cb1393a6135a199ca52e450d5e9251cbd99f7847d33a3675083604051612caa91815260200190565b60405180910390a250505050565b6001600160a01b038181166000908152600c602052604081205490911615612cf957506001600160a01b039081166000908152600c60205260409020541690565b6000612d0483612ebc565b60405163485cc95560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015285811660248301529192509082169063485cc95590604401600060405180830381600087803b158015612d7357600080fd5b505af1158015612d87573d6000803e3d6000fd5b505050506001600160a01b039283166000908152600c6020526040902080546001600160a01b031916938216939093179092555090565b600080612dca836113a4565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e309190613148565b6004805460055460405163449e815d60e01b8152939450670de0b6b3a7640000936001600160a01b039092169263449e815d92612e91927f0000000000000000000000000000000000000000000000000000000000000000929091016131fb565b6020604051808303816000875af1158015611c27573d6000803e3d6000fd5b600080610da083612dbe565b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f0000000000000000000000000000000000000000000000000000000000000000606081901b60148301526e5af43d82803e903d91602b57fd5bf360881b60288301526000918360378285f59250506001600160a01b038216612f7e5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c656400000000000000000060448201526064016107d8565b6040516001600160a01b0383811682528416907f1cfd6e6fe6d92716198ef80381fd40e4338b9a461cc4fc235c51b152f7f830159060200160405180910390a250919050565b6001600160a01b0381168114610dcf57600080fd5b600060208284031215612feb57600080fd5b8135610dbd81612fc4565b803560ff8116811461300757600080fd5b919050565b600080600080600060a0868803121561302457600080fd5b853561302f81612fc4565b94506020860135935061304460408701612ff6565b94979396509394606081013594506080013592915050565b60008060008060008060c0878903121561307557600080fd5b863561308081612fc4565b9550602087013594506040870135935061309c60608801612ff6565b92506080870135915060a087013590509295509295509295565b600080604083850312156130c957600080fd5b82356130d481612fc4565b946020939093013593505050565b6000602082840312156130f457600080fd5b5035919050565b6000806040838503121561310e57600080fd5b50508035926020909101359150565b8015158114610dcf57600080fd5b60006020828403121561313d57600080fd5b8135610dbd8161311d565b60006020828403121561315a57600080fd5b5051919050565b60208082526010908201526f111150511312539157d156141254915160821b604082015260600190565b61190160f01b81526002810192909252602282015260420190565b6020808252600e908201526d24a72b20a624a22fa9a4a3a722a960911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156131f6576131f66131ce565b500390565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561324a57600080fd5b8151610dbd8161311d565b6020808252601f908201527f4f6e6c7920676f762063616e2063616c6c20746869732066756e6374696f6e00604082015260600190565b60008160001904831182151516156132a6576132a66131ce565b500290565b6000826132c857634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156132e0576132e06131ce565b500190565b6000600182016132f7576132f76131ce565b506001019056fea2646970667358221220256da296100735f49039031471702258c6506653065f49295cb423ce97aa81b964736f6c634300080d0033000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b0000000000000000000000002b34548b865ad66a2b046cb82e59ee43f75b90fd000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd000000000000000000000000f2a2b6c1f47c75ffacdbf60b35f2ed2d35f0a9c1000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d7100000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b000000000000000000000000abe146cf570fd27ddd985895ce9b138a7110cce80000000000000000000000000000000000000000000000000000000000001b58000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102f15760003560e01c80637164695a1161019d578063c5ebeaec116100e9578063d8dfeb45116100a2578063e5cd8b6a1161007c578063e5cd8b6a146106ce578063ea0593e4146106d6578063ebc9b94d146106fd578063fc7b9c181461071057600080fd5b8063d8dfeb451461068b578063e00f0a99146106b2578063e031a824146106c557600080fd5b8063c5ebeaec14610605578063c74e6d8014610618578063c7ed69cd1461062b578063c801861914610652578063cfad57a214610665578063d1220a3c1461067857600080fd5b80638951b05411610156578063b75061bb11610130578063b75061bb146105af578063bcb4bbea146105c2578063bcbaf487146105df578063bcead63e146105f257600080fd5b80638951b0541461057657806397904e4214610589578063b6b55f251461059c57600080fd5b80637164695a146105015780637adbf973146105145780637d32e793146105275780637dc0d1d01461053a5780637ecebe001461054d5780637f5007ed1461056d57600080fd5b80633644e5151161025c5780634ca8ff5a11610215578063651afe83116101ef578063651afe83146104c95780636f1c4839146104dc5780636f48fbb6146104e55780636f8dd24c146104f857600080fd5b80634ca8ff5a146104875780634ef64ee7146104ae5780635a57b46f146104c157600080fd5b80633644e515146104145780633e5537561461041c57806346e368d414610425578063477230b21461043857806347e7ef241461046157806348bde20c1461047457600080fd5b806324a3d622116102ae57806324a3d622146103875780632c333e251461039a5780632e1a7d4d146103bb5780632ecd4e7d146103ce57806334734dd3146103ee5780633525f5911461040157600080fd5b80630e81c403146102f657806312d43a511461030b5780631e5a3a4b1461033b5780631ef08b751461034e57806322867d7814610361578063236331e914610374575b600080fd5b610309610304366004612fd9565b610719565b005b60005461031e906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61030961034936600461300c565b6107b8565b61030961035c36600461305c565b610941565b61030961036f3660046130b6565b610ac2565b610309610382366004612fd9565b610d48565b60025461031e906001600160a01b031681565b6103ad6103a8366004612fd9565b610d94565b604051908152602001610332565b6103096103c93660046130e2565b610dc4565b6103ad6103dc366004612fd9565b600d6020526000908152604090205481565b6103096103fc3660046130e2565b610dd2565b61030961040f36600461305c565b610f24565b6103ad61109c565b6103ad60065481565b610309610433366004612fd9565b6111a8565b61031e610446366004612fd9565b600c602052600090815260409020546001600160a01b031681565b61030961046f3660046130b6565b6111f4565b610309610482366004612fd9565b611358565b61031e7f000000000000000000000000f2a2b6c1f47c75ffacdbf60b35f2ed2d35f0a9c181565b61031e6104bc366004612fd9565b6113a4565b610309611427565b6103096104d73660046130b6565b611449565b6103ad60095481565b6103096104f33660046130e2565b61182a565b6103ad60075481565b61030961050f3660046130e2565b6118b6565b610309610522366004612fd9565b611951565b6103096105353660046130e2565b61199d565b60045461031e906001600160a01b031681565b6103ad61055b366004612fd9565b600e6020526000908152604090205481565b6103ad60055481565b6103096105843660046130e2565b611a81565b6103ad610597366004612fd9565b611b37565b6103096105aa3660046130e2565b611c67565b6103096105bd3660046130fb565b611c71565b600a546105cf9060ff1681565b6040519015158152602001610332565b6103096105ed3660046130b6565b611c83565b60015461031e906001600160a01b031681565b6103096106133660046130e2565b6122a1565b6103ad610626366004612fd9565b6122ac565b61031e7f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71081565b61030961066036600461312b565b612464565b610309610673366004612fd9565b61255f565b6103096106863660046130e2565b6125ab565b61031e7f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b81565b60035461031e906001600160a01b031681565b6103ad60085481565b610309612638565b61031e7f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce481565b61030961070b3660046130fb565b612648565b6103ad600b5481565b604051630d9167c160e21b81526001600160a01b0382811660048301526000917f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710909116906336459f0490602401602060405180830381865afa158015610784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a89190613148565b90506107b48282611449565b5050565b428410156107e15760405162461bcd60e51b81526004016107d890613161565b60405180910390fd5b600060016107ed61109c565b6001600160a01b0388166000818152600e602090815260409182902080546001810190915582517f8d1d73617555ca8eaa7b0817ffc5bca6d6180656a9e3bc96c20620c10b2254088184015233818501526060810194909452608084015260a08084018b90528251808503909101815260c084019092528151910120610876929160e00161318b565b60408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156108d4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061090a5750856001600160a01b0316816001600160a01b0316145b6109265760405162461bcd60e51b81526004016107d8906131a6565b61093986336109348961265b565b612796565b505050505050565b428410156109615760405162461bcd60e51b81526004016107d890613161565b6000600161096d61109c565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f1f0bc49e000c018ca72680800f3b2f7ce61e76471cce3756387071d004b0eee98184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e0840190925281519101206109fe92916101000161318b565b60408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610a5c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590610a925750866001600160a01b0316816001600160a01b0316145b610aae5760405162461bcd60e51b81526004016107d8906131a6565b610ab987338861298c565b50505050505050565b6001600160a01b0382166000908152600d602052604090205460018201610ae7578091505b81811015610b375760405162461bcd60e51b815260206004820152601b60248201527f52657061796d656e742067726561746572207468616e2064656274000000000060448201526064016107d8565b6001600160a01b0383166000908152600d602052604081208054849290610b5f9084906131e4565b9250508190555081600b6000828254610b7891906131e4565b9091555050604051631b1a58c960e31b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063d8d2c64890610bcb90869086906004016131fb565b600060405180830381600087803b158015610be557600080fd5b505af1158015610bf9573d6000803e3d6000fd5b50506003546001600160a01b0316159150610c6f90505760035460405163081e664160e01b8152600481018490526001600160a01b039091169063081e664190602401600060405180830381600087803b158015610c5657600080fd5b505af1158015610c6a573d6000803e3d6000fd5b505050505b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416906323b872dd90610cbf90339030908790600401613214565b6020604051808303816000875af1158015610cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d029190613238565b5060405182815233906001600160a01b038516907f05f2eeda0e08e4b437f487c8d7d29b14537d15e3488170dc3de5dbdf8dac46849060200160405180910390a3505050565b6000546001600160a01b03163314610d725760405162461bcd60e51b81526004016107d890613255565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080610da083611b37565b905061271060055482610db3919061328c565b610dbd91906132ab565b9392505050565b610dcf333383612796565b50565b6000546001600160a01b03163314610dfc5760405162461bcd60e51b81526004016107d890613255565b600081118015610e1a575061271060085482610e1891906132cd565b105b610e665760405162461bcd60e51b815260206004820152601d60248201527f496e76616c6964206c69717569646174696f6e20696e63656e7469766500000060448201526064016107d8565b600781905560055415610dcf576000600554600854612710610e8891906132cd565b600554610e97906127106131e4565b610ea1919061328c565b610eab91906132ab565b905080600754106107b45760405162461bcd60e51b815260206004820152603760248201527f4e6577206c69717569646174696f6e20706172616d20616c6c6f772070726f6660448201527f697461626c652073656c66206c69717569646174696f6e00000000000000000060648201526084016107d8565b42841015610f445760405162461bcd60e51b81526004016107d890613161565b60006001610f5061109c565b6001600160a01b0389166000818152600e602090815260409182902080546001810190915582517f7dbda1635348f4206be1d85078da9f4a74703081e4fa6e174f3fd066c56189658184015233818501526060810194909452608084018c905260a084015260c08084018b90528251808503909101815260e084019092528151910120610fe192916101000161318b565b60408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa15801561103f573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906110755750866001600160a01b0316816001600160a01b0316145b6110915760405162461bcd60e51b81526004016107d8906131a6565b610ab9873388612796565b60007f000000000000000000000000000000000000000000000000000000000000000146146111835750604080518082018252600a8152691110948813505492d15560b21b60209182015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f4fdd2304dc9d5c5a62691d8e7e6cf5fe56e23281f4652fb6b06b133c9c2b03b4818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b507f65ad3066d68ebb0beeb9cbc09d691ae934fe73629f9ab6a645550e7c24b9461890565b6000546001600160a01b031633146111d25760405162461bcd60e51b81526004016107d890613255565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60006111ff83612cb8565b6040516323b872dd60e01b81529091506001600160a01b037f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b16906323b872dd9061125290339085908790600401613214565b6020604051808303816000875af1158015611271573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112959190613238565b507f00000000000000000000000000000000000000000000000000000000000000011561131057806001600160a01b03166312c93f596040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156112f757600080fd5b505af115801561130b573d6000803e3d6000fd5b505050505b826001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161134b91815260200190565b60405180910390a2505050565b6000546001600160a01b031633146113825760405162461bcd60e51b81526004016107d890613255565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f000000000000000000000000f2a2b6c1f47c75ffacdbf60b35f2ed2d35f0a9c1606090811b60148301526f5af43d82803e903d91602b57fd5bf3ff60801b602883015230901b6038820152604c8101919091526037808220606c830152605591012090565b336000908152600e60205260408120805491611442836132e5565b9190505550565b604051630d9167c160e21b81526001600160a01b0383811660048301526000917f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710909116906336459f0490602401602060405180830381865afa1580156114b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d89190613148565b90506000811161151b5760405162461bcd60e51b815260206004820152600e60248201526d139bc8111094881919599a58da5d60921b60448201526064016107d8565b8181101561155e5760405162461bcd60e51b815260206004820152601060248201526f105b5bdd5b9d080f881919599a58da5d60821b60448201526064016107d8565b60006127107f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d7106001600160a01b031663a10f84cb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e59190613148565b6115ef908561328c565b6115f991906132ab565b905060006127106006548361160e919061328c565b61161891906132ab565b6001600160a01b0386166000908152600d60205260408120805492935084929091906116459084906132cd565b90915550506008546007546000916127109161166190836131e4565b61166b91906131e4565b61167488612dbe565b61167e919061328c565b61168891906132ab565b6001600160a01b0387166000908152600d60205260409020549091508110156116f35760405162461bcd60e51b815260206004820152601960248201527f457863656564656420636f6c6c61746572616c2076616c75650000000000000060448201526064016107d8565b82600b600082825461170591906132cd565b909155505060405163b2c0877560e01b81526001600160a01b03878116600483015233602483015260448201879052606482018490527f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063b2c0877590608401600060405180830381600087803b15801561178157600080fd5b505af1158015611795573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416925063a9059cbb91506117e790339086906004016131fb565b6020604051808303816000875af1158015611806573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab99190613238565b6000546001600160a01b031633146118545760405162461bcd60e51b81526004016107d890613255565b600081118015611865575061271081105b6118b15760405162461bcd60e51b815260206004820152601f60248201527f496e76616c6964207265706c656e6973686d656e7420696e63656e746976650060448201526064016107d8565b600655565b6000546001600160a01b031633146118e05760405162461bcd60e51b81526004016107d890613255565b61271081106119315760405162461bcd60e51b815260206004820152601960248201527f496e76616c696420636f6c6c61746572616c20666163746f720000000000000060448201526064016107d8565b60058190558015610dcf576000600554600854612710610e8891906132cd565b6000546001600160a01b0316331461197b5760405162461bcd60e51b81526004016107d890613255565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b031633146119f05760405162461bcd60e51b815260206004820152601660248201527513db9b1e481b195b99195c8818d85b881c9958d85b1b60521b60448201526064016107d8565b60405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce4169063a9059cbb90611a3e90339085906004016131fb565b6020604051808303816000875af1158015611a5d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b49190613238565b6000546001600160a01b03163314611aab5760405162461bcd60e51b81526004016107d890613255565b600081118015611ac9575061271060075482611ac791906132cd565b105b611b155760405162461bcd60e51b815260206004820152601760248201527f496e76616c6964206c69717569646174696f6e2066656500000000000000000060448201526064016107d8565b600881905560055415610dcf576000600554600854612710610e8891906132cd565b600080611b43836113a4565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba99190613148565b6004805460055460405163949c4fa360e01b8152939450670de0b6b3a7640000936001600160a01b039092169263949c4fa392611c0a927f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b929091016131fb565b602060405180830381865afa158015611c27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c4b9190613148565b611c55908361328c565b611c5f91906132ab565b949350505050565b610dcf33826111f4565b611c7a82611c67565b6107b4816122a1565b60008111611cd35760405162461bcd60e51b815260206004820152601860248201527f4d75737420726570617920706f7369746976652064656274000000000000000060448201526064016107d8565b6001600160a01b0382166000908152600d602052604090205480611cf684612eb0565b10611d3a5760405162461bcd60e51b8152602060048201526014602482015273557365722064656274206973206865616c74687960601b60448201526064016107d8565b61271060095482611d4b919061328c565b611d5591906132ab565b821115611da45760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206c69717569646174696f6e20666163746f72000000000060448201526064016107d8565b6004805460055460405163449e815d60e01b81526000936001600160a01b039093169263449e815d92611df9927f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b92016131fb565b6020604051808303816000875af1158015611e18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3c9190613148565b9050600081611e5385670de0b6b3a764000061328c565b611e5d91906132ab565b905061271060075482611e70919061328c565b611e7a91906132ab565b611e8490826132cd565b6001600160a01b0386166000908152600d6020526040812080549293508692909190611eb19084906131e4565b9250508190555083600b6000828254611eca91906131e4565b9091555050604051631b1a58c960e31b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063d8d2c64890611f1d90889088906004016131fb565b600060405180830381600087803b158015611f3757600080fd5b505af1158015611f4b573d6000803e3d6000fd5b50506003546001600160a01b0316159150611fc190505760035460405163081e664160e01b8152600481018690526001600160a01b039091169063081e664190602401600060405180830381600087803b158015611fa857600080fd5b505af1158015611fbc573d6000803e3d6000fd5b505050505b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416906323b872dd9061201190339030908990600401613214565b6020604051808303816000875af1158015612030573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120549190613238565b506000612060866113a4565b604051636203b43b60e11b81529091506001600160a01b0382169063c40768769061209190339086906004016131fb565b600060405180830381600087803b1580156120ab57600080fd5b505af11580156120bf573d6000803e3d6000fd5b50505050600060085411156122535760006127106008548588670de0b6b3a76400006120eb919061328c565b6120f591906132ab565b6120ff919061328c565b61210991906132ab565b90506000826001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa15801561214b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216f9190613148565b90508181106121e357600054604051636203b43b60e11b81526001600160a01b038581169263c4076876926121ac929091169086906004016131fb565b600060405180830381600087803b1580156121c657600080fd5b505af11580156121da573d6000803e3d6000fd5b50505050612250565b801561225057600054604051636203b43b60e11b81526001600160a01b038581169263c40768769261221d929091169085906004016131fb565b600060405180830381600087803b15801561223757600080fd5b505af115801561224b573d6000803e3d6000fd5b505050505b50505b604080518681526020810184905233916001600160a01b038916917ff3fa0eaee8f258c23b013654df25d1527f98a5c7ccd5e951dd77caca400ef972910160405180910390a3505050505050565b610dcf33338361298c565b6000806122b8836113a4565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231e9190613148565b905080600003612332575060009392505050565b6001600160a01b0384166000908152600d60205260408120549081900361235b57509392505050565b60055460000361237057506000949350505050565b6005546004805460405163949c4fa360e01b8152600093926001600160a01b039092169163949c4fa3916123c8917f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b918691016131fb565b602060405180830381865afa1580156123e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124099190613148565b61241b84670de0b6b3a764000061328c565b61242591906132ab565b6124319061271061328c565b61243b91906132ab565b90508083116124505750600095945050505050565b61245a81846131e4565b9695505050505050565b80156124f2576002546001600160a01b031633148061248d57506000546001600160a01b031633145b6124ed5760405162461bcd60e51b815260206004820152602b60248201527f4f6e6c7920706175736520677561726469616e206f7220676f7665726e616e6360448201526a652063616e20706175736560a81b60648201526084016107d8565b61254c565b6000546001600160a01b0316331461254c5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c7920676f7665726e616e63652063616e20756e7061757365000000000060448201526064016107d8565b600a805460ff1916911515919091179055565b6000546001600160a01b031633146125895760405162461bcd60e51b81526004016107d890613255565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146125d55760405162461bcd60e51b81526004016107d890613255565b6000811180156125e757506127108111155b6126335760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964206c69717569646174696f6e20666163746f7200000000000060448201526064016107d8565b600955565b61264633336109343361265b565b565b6126523383610ac2565b6107b481610dc4565b600080612667836113a4565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126cd9190613148565b9050806000036126e1575060009392505050565b6001600160a01b0384166000908152600d60205260408120549081900361270a57509392505050565b60055460000361271f57506000949350505050565b6005546004805460405163449e815d60e01b8152600093926001600160a01b039092169163449e815d91612777917f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b918691016131fb565b6020604051808303816000875af11580156123e5573d6000803e3d6000fd5b60006127a18461265b565b9050818110156127f35760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e74207769746864726177616c206c696d697400000060448201526064016107d8565b604051630d9167c160e21b81526001600160a01b0385811660048301527f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d71016906336459f0490602401602060405180830381865afa158015612859573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061287d9190613148565b156128ca5760405162461bcd60e51b815260206004820152601f60248201527f43616e277420776974686472617720776974682044425220646566696369740060448201526064016107d8565b60006128d585612cb8565b604051636203b43b60e11b81529091506001600160a01b0382169063c40768769061290690879087906004016131fb565b600060405180830381600087803b15801561292057600080fd5b505af1158015612934573d6000803e3d6000fd5b50505050836001600160a01b0316856001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8560405161297d91815260200190565b60405180910390a35050505050565b600a5460ff16156129d55760405162461bcd60e51b8152602060048201526013602482015272109bdc9c9bddda5b99c81a5cc81c185d5cd959606a1b60448201526064016107d8565b6003546001600160a01b031615612aa95760035460405163368f515360e21b81526001600160a01b039091169063da3d454c90612a1a90339087908690600401613214565b6020604051808303816000875af1158015612a39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5d9190613238565b612aa95760405162461bcd60e51b815260206004820152601b60248201527f44656e69656420627920626f72726f7720636f6e74726f6c6c6572000000000060448201526064016107d8565b6000612ab484612eb0565b6001600160a01b0385166000908152600d6020526040812080549293508492909190612ae19084906132cd565b90915550506001600160a01b0384166000908152600d6020526040902054811015612b465760405162461bcd60e51b8152602060048201526015602482015274115e18d9595919590818dc99591a5d081b1a5b5a5d605a1b60448201526064016107d8565b81600b6000828254612b5891906132cd565b909155505060405163f7f11fb760e01b81526001600160a01b037f000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710169063f7f11fb790612bab90879086906004016131fb565b600060405180830381600087803b158015612bc557600080fd5b505af1158015612bd9573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000865377367054516e17014ccded1e7d814edc9ce416925063a9059cbb9150612c2b90869086906004016131fb565b6020604051808303816000875af1158015612c4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c6e9190613238565b50836001600160a01b03167fcbc04eca7e9da35cb1393a6135a199ca52e450d5e9251cbd99f7847d33a3675083604051612caa91815260200190565b60405180910390a250505050565b6001600160a01b038181166000908152600c602052604081205490911615612cf957506001600160a01b039081166000908152600c60205260409020541690565b6000612d0483612ebc565b60405163485cc95560e01b81526001600160a01b037f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b8116600483015285811660248301529192509082169063485cc95590604401600060405180830381600087803b158015612d7357600080fd5b505af1158015612d87573d6000803e3d6000fd5b505050506001600160a01b039283166000908152600c6020526040902080546001600160a01b031916938216939093179092555090565b600080612dca836113a4565b90506000816001600160a01b031663b69ef8a86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e309190613148565b6004805460055460405163449e815d60e01b8152939450670de0b6b3a7640000936001600160a01b039092169263449e815d92612e91927f0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b929091016131fb565b6020604051808303816000875af1158015611c27573d6000803e3d6000fd5b600080610da083612dbe565b604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81527f000000000000000000000000f2a2b6c1f47c75ffacdbf60b35f2ed2d35f0a9c1606081901b60148301526e5af43d82803e903d91602b57fd5bf360881b60288301526000918360378285f59250506001600160a01b038216612f7e5760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c656400000000000000000060448201526064016107d8565b6040516001600160a01b0383811682528416907f1cfd6e6fe6d92716198ef80381fd40e4338b9a461cc4fc235c51b152f7f830159060200160405180910390a250919050565b6001600160a01b0381168114610dcf57600080fd5b600060208284031215612feb57600080fd5b8135610dbd81612fc4565b803560ff8116811461300757600080fd5b919050565b600080600080600060a0868803121561302457600080fd5b853561302f81612fc4565b94506020860135935061304460408701612ff6565b94979396509394606081013594506080013592915050565b60008060008060008060c0878903121561307557600080fd5b863561308081612fc4565b9550602087013594506040870135935061309c60608801612ff6565b92506080870135915060a087013590509295509295509295565b600080604083850312156130c957600080fd5b82356130d481612fc4565b946020939093013593505050565b6000602082840312156130f457600080fd5b5035919050565b6000806040838503121561310e57600080fd5b50508035926020909101359150565b8015158114610dcf57600080fd5b60006020828403121561313d57600080fd5b8135610dbd8161311d565b60006020828403121561315a57600080fd5b5051919050565b60208082526010908201526f111150511312539157d156141254915160821b604082015260600190565b61190160f01b81526002810192909252602282015260420190565b6020808252600e908201526d24a72b20a624a22fa9a4a3a722a960911b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156131f6576131f66131ce565b500390565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561324a57600080fd5b8151610dbd8161311d565b6020808252601f908201527f4f6e6c7920676f762063616e2063616c6c20746869732066756e6374696f6e00604082015260600190565b60008160001904831182151516156132a6576132a66131ce565b500290565b6000826132c857634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156132e0576132e06131ce565b500190565b6000600182016132f7576132f76131ce565b506001019056fea2646970667358221220256da296100735f49039031471702258c6506653065f49295cb423ce97aa81b964736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b0000000000000000000000002b34548b865ad66a2b046cb82e59ee43f75b90fd000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd000000000000000000000000f2a2b6c1f47c75ffacdbf60b35f2ed2d35f0a9c1000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d7100000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b000000000000000000000000abe146cf570fd27ddd985895ce9b138a7110cce80000000000000000000000000000000000000000000000000000000000001b58000000000000000000000000000000000000000000000000000000000000138800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _gov (address): 0x926dF14a23BE491164dCF93f4c468A50ef659D5B
Arg [1] : _lender (address): 0x2b34548b865ad66A2B046cb82e59eE43F75B90fd
Arg [2] : _pauseGuardian (address): 0xE3eD95e130ad9E15643f5A5f232a3daE980784cd
Arg [3] : _escrowImplementation (address): 0xf2a2b6c1F47c75FFacDbF60B35F2Ed2d35f0a9C1
Arg [4] : _dbr (address): 0xAD038Eb671c44b853887A7E32528FaB35dC5D710
Arg [5] : _collateral (address): 0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B
Arg [6] : _oracle (address): 0xaBe146CF570FD27ddD985895ce9B138a7110cce8
Arg [7] : _collateralFactorBps (uint256): 7000
Arg [8] : _replenishmentIncentiveBps (uint256): 5000
Arg [9] : _liquidationIncentiveBps (uint256): 1000
Arg [10] : _callOnDepositCallback (bool): True
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b
Arg [1] : 0000000000000000000000002b34548b865ad66a2b046cb82e59ee43f75b90fd
Arg [2] : 000000000000000000000000e3ed95e130ad9e15643f5a5f232a3dae980784cd
Arg [3] : 000000000000000000000000f2a2b6c1f47c75ffacdbf60b35f2ed2d35f0a9c1
Arg [4] : 000000000000000000000000ad038eb671c44b853887a7e32528fab35dc5d710
Arg [5] : 0000000000000000000000004e3fbd56cd56c3e72c1403e103b45db9da5b9d2b
Arg [6] : 000000000000000000000000abe146cf570fd27ddd985895ce9b138a7110cce8
Arg [7] : 0000000000000000000000000000000000000000000000000000000000001b58
Arg [8] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [9] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.99636 | 856,530.4939 | $853,412.58 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.