Spend less on fees, more on crypto. Buy crypto easily with MoonPay Balance. 20M+ users trust MoonPay worldwide.
Ready to onboard to Ethereum? With MetaMask Portfolio, you're in control.
Don’t invest unless you’re prepared to lose all the money you invest.
Ready to simplify your web3 experience? Try the all-in-one web3 app trusted by millions worldwide.
No gas? No problem. MetaMask Gas Station includes gas fees directly in your quote.
Everyday giveaways up to 100 ETH, Lucky Spins. Deposit BONUS 300% and Cashbacks!
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
Slots, Roulette, Poker & more - Proud sponsors of UFC, Everton & StakeF1 team!
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
Anonymous play on awesome games - sign up now for 25 free jackpot spins - worth $100s!
100s of games, generous bonuses, 20+ years of trusted gaming. Join CryptoWins & start winning today!
Overview
ETH Balance
Eth Value
$44,184.28 (@ $3,432.91/ETH)Token Holdings
Could not find any matches!
- ERC-20 Tokens (12)11.19405326 AAVEAave Token (AAVE)$3,925.42@350.6725,502.380521 USDCUSDC (USDC)$25,502.38@1.000.1506835 WBTCWrapped BTC (WBTC)$14,778.28@98,075.0015.37479749 wstETHWrapped liqu... (wstETH)$62,801.59@4,084.714.75ERC20 ***1.2 TokenERC-20 TOKEN*[Suspicious]3,999.99 TokenERC-20 TOKEN*[Suspicious]1.7 TokenERC-20 TOKEN*[Suspicious]3,999.99 TokenERC-20 TOKEN*[Suspicious]0.7 TokenERC-20 TOKEN*[Suspicious]350 TokenERC-20 TOKEN*[Suspicious]3,289 TokenERC-20 TOKEN*[Spam]NFT Tokens (29)zsteth.com : airdrop recipient# zsteth.com : airdrop recipientERC-1155claim rewards on apyusd.netapyusd.netERC-1155LidowstETH.comLidowstETH.comERC-1155claim rewards on pooled-ether.compooled-ether.comERC-1155claim rewards on staave.netstaave.netERC-1155claim rewards on wbtcnetwork.netwbtcnetwork.netERC-1155debridgeth.comWithdrawal Badge debridgeth.comERC-1155ether-origin.comWithdrawal NFT ether-origin.comERC-1155claim rewards on wsteth.orgwsteth.orgERC-1155ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]ERC-1155 TOKEN*[Suspicious]
- Transactions
- Internal Transactions
- Token Transfers (ERC-20)
- NFT Transfers
- Contract
- Events
- Analytics
- Multichain Portfolio
- Cards New
Advanced Filter- Filter by Tx Type:
- Tx
- Internal Tx
- ERC-20
- NFTs
Latest 25 from a total of 103 transactions
Transaction Hash MethodBlockFromToDistribute Proto... 18908898 2024-01-01 0:00:47 360 days ago 1704067247 IN 0 ETH$0.00 0.00305942 34 Distribute Proto... 18473546 2023-11-01 0:00:47 421 days ago 1698796847 IN 0 ETH$0.00 0.00359932 40 Distribute Proto... 17991867 2023-08-25 13:00:35 488 days ago 1692968435 IN 0 ETH$0.00 0.03945622 46 Distribute Proto... 17941831 2023-08-18 13:00:35 495 days ago 1692363635 IN 0 ETH$0.00 0.0396991 50 Distribute Proto... 17891804 2023-08-11 13:00:35 502 days ago 1691758835 IN 0 ETH$0.00 0.04376049 51 Distribute Proto... 17841781 2023-08-04 13:00:35 509 days ago 1691154035 IN 0 ETH$0.00 0.05633237 59 Distribute Proto... 17791713 2023-07-28 13:00:35 516 days ago 1690549235 IN 0 ETH$0.00 0.04718531 53 Distribute Proto... 17741673 2023-07-21 13:00:35 523 days ago 1689944435 IN 0 ETH$0.00 0.0411888 48 Distribute Proto... 17691861 2023-07-14 13:00:47 530 days ago 1689339647 IN 0 ETH$0.00 0.04806116 56 Distribute Proto... 17642085 2023-07-07 13:00:47 537 days ago 1688734847 IN 0 ETH$0.00 0.04204312 49 Distribute Proto... 17592250 2023-06-30 13:00:35 544 days ago 1688130035 IN 0 ETH$0.00 0.03952799 66 Distribute Proto... 17542427 2023-06-23 13:00:47 551 days ago 1687525247 IN 0 ETH$0.00 0.02215464 38 Distribute Proto... 17492557 2023-06-16 13:00:35 558 days ago 1686920435 IN 0 ETH$0.00 0.03176224 42 Distribute Proto... 17442831 2023-06-09 13:00:35 565 days ago 1686315635 IN 0 ETH$0.00 0.0450191 53 Distribute Proto... 17393207 2023-06-02 13:00:35 572 days ago 1685710835 IN 0 ETH$0.00 0.04885048 57 Distribute Proto... 17343428 2023-05-26 13:00:47 579 days ago 1685106047 IN 0 ETH$0.00 0.0496782 52 Distribute Proto... 17311417 2023-05-22 0:55:35 584 days ago 1684716935 IN 0 ETH$0.00 0.04843297 49 Transfer 17295204 2023-05-19 18:06:35 586 days ago 1684519595 IN 0.07 ETH$240.30 0.00124407 59.08686215 Distribute Proto... 17244290 2023-05-12 13:00:47 593 days ago 1683896447 IN 0 ETH$0.00 0.09511747 96 Distribute Proto... 17210996 2023-05-07 20:21:47 598 days ago 1683490907 IN 0 ETH$0.00 0.14858131 149 Distribute Proto... 17144785 2023-04-28 13:00:47 607 days ago 1682686847 IN 0 ETH$0.00 0.05616348 58 Distribute Proto... 17094927 2023-04-21 13:00:47 614 days ago 1682082047 IN 0 ETH$0.00 0.0561803 58 Distribute Proto... 17045571 2023-04-14 13:00:47 621 days ago 1681477247 IN 0 ETH$0.00 0.0579194 62 Distribute Proto... 16996769 2023-04-07 13:00:47 628 days ago 1680872447 IN 0 ETH$0.00 0.04587275 47 Distribute Proto... 16947340 2023-03-31 13:00:47 635 days ago 1680267647 IN 0 ETH$0.00 0.0470029 49 Latest 25 internal transactions (View All)
Advanced mode:Parent Transaction Hash Block FromTo21443406 2024-12-20 11:22:35 5 days ago 1734693755 0.38980534 ETH$1,338.17 21393554 2024-12-13 12:21:11 12 days ago 1734092471 0.40057657 ETH$1,375.14 21343074 2024-12-06 11:11:59 19 days ago 1733483519 0.37879074 ETH$1,300.35 21292980 2024-11-29 11:13:23 26 days ago 1732878803 0.36847879 ETH$1,264.95 21242834 2024-11-22 11:00:23 33 days ago 1732273223 0.35318545 ETH$1,212.45 21192575 2024-11-15 10:43:11 40 days ago 1731667391 0.33860647 ETH$1,162.41 21092239 2024-11-01 10:36:11 54 days ago 1730457371 0.3303955 ETH$1,134.22 21042282 2024-10-25 11:18:11 61 days ago 1729855091 0.31131001 ETH$1,068.70 20992163 2024-10-18 11:30:59 68 days ago 1729251059 0.33796103 ETH$1,160.19 20942087 2024-10-11 11:29:35 75 days ago 1728646175 0.3332968 ETH$1,144.18 20891790 2024-10-04 11:14:23 82 days ago 1728040463 0.38308856 ETH$1,315.11 20841663 2024-09-27 11:28:35 89 days ago 1727436515 0.35204896 ETH$1,208.55 20791312 2024-09-20 10:50:35 96 days ago 1726829435 0.5572382 ETH$1,912.95 20691270 2024-09-06 11:31:23 110 days ago 1725622283 0.39002387 ETH$1,338.92 20641094 2024-08-30 11:28:23 117 days ago 1725017303 0.57273427 ETH$1,966.14 20590982 2024-08-23 11:24:11 124 days ago 1724412251 0.37393834 ETH$1,283.70 20490741 2024-08-09 11:27:47 138 days ago 1723202867 0.31580416 ETH$1,084.13 20440406 2024-08-02 10:56:59 145 days ago 1722596219 0.39324615 ETH$1,349.98 20390452 2024-07-26 11:33:47 152 days ago 1721993627 0.38658079 ETH$1,327.10 20340366 2024-07-19 11:45:47 159 days ago 1721389547 0.33412539 ETH$1,147.02 20290115 2024-07-12 11:26:59 166 days ago 1720783619 0.33249934 ETH$1,141.44 20240094 2024-07-05 11:45:47 173 days ago 1720179947 0.3336555 ETH$1,145.41 20189754 2024-06-28 11:01:47 180 days ago 1719572507 0.37009606 ETH$1,270.51 20139780 2024-06-21 11:24:35 187 days ago 1718969075 0.51169587 ETH$1,756.61 20039717 2024-06-07 11:40:35 201 days ago 1717760435 0.35959726 ETH$1,234.46 Loading...LoadingContract Name:FeeCustody
Compiler Versionv0.8.11+commit.d7f03943
Optimization Enabled:Yes with 9999 runs
Other Settings:default evmVersionContract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/IFeeDistributor.sol"; import "../interfaces/IChainlink.sol"; import "../interfaces/IWETH.sol"; import "../interfaces/IWSTETH.sol"; import "../interfaces/ICRV.sol"; import "../interfaces/IYVUSDC.sol"; import "../interfaces/ISwapRouter.sol"; import "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol"; /** @title FeeCustody @notice Custody Contract for Ribbon Vault Management / Performance Fees */ contract FeeCustody is Ownable { using SafeERC20 for IERC20; address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant WSTETH = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0; address public constant STETH = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84; address public constant USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address public yvUSDC = 0xa354F35829Ae975e850e23e9615b11Da1B3dC4DE; // WETH Distribution Token IERC20 public distributionToken = IERC20(WETH); // Protocol revenue recipient address public protocolRevenueRecipient; // Address of fee distributor contract for RBN lockers to claim IFeeDistributor public feeDistributor; // % allocation (0 - 100%) from protocol revenue to allocate to RBN lockers. // 2 decimals. ex: 10% = 1000 uint256 public pctAllocationForRBNLockers; uint256 public constant TOTAL_PCT = 10000; // Equals 100% ISwapRouter public constant UNIV3_SWAP_ROUTER = ISwapRouter(0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45); ICRV public constant STETH_ETH_CRV_POOL = ICRV(0xDC24316b9AE028F1497c275EB9192a3Ea0f67022); // Intermediary path asset for univ3 swaps. // Empty if direct pool swap between asset and distribution asset mapping(address => bytes) public intermediaryPath; // Oracle between asset/usd pair for total // reward approximation across all assets earned mapping(address => address) public oracles; address[] public assets; // Keeper for weekly distributions address public keeper; // Events event NewAsset(address asset, bytes intermediaryPath); event RecoveredAsset(address asset); event NewFeeDistributor(address feeDistributor); event NewYVUSDC(address yvUSDC); event NewRBNLockerAllocation(uint256 pctAllocationForRBNLockers); event NewDistributionToken(address distributionToken); event NewProtocolRevenueRecipient(address protocolRevenueRecipient); event NewKeeper(address keeper); /** * @notice * Constructor * @param _pctAllocationForRBNLockers percent allocated for RBN lockers (100% = 10000) * @param _feeDistributor address of fee distributor where protocol revenue claimable * @param _protocolRevenueRecipient address of multisig * @param _admin admin * @param _keeper keeper */ constructor( uint256 _pctAllocationForRBNLockers, address _feeDistributor, address _protocolRevenueRecipient, address _admin, address _keeper ) { require(_feeDistributor != address(0), "!_feeDistributor"); require( _protocolRevenueRecipient != address(0), "!_protocolRevenueRecipient" ); require(_admin != address(0), "!_admin"); require(_keeper != address(0), "!_keeper"); pctAllocationForRBNLockers = _pctAllocationForRBNLockers; feeDistributor = IFeeDistributor(_feeDistributor); protocolRevenueRecipient = _protocolRevenueRecipient; keeper = _keeper; } receive() external payable {} /** * @notice * Swaps RBN locker allocation of protocol revenu to distributionToken, * sends the rest to the multisig * @dev Can be called by keeper * @param _minAmountOut min amount out for every asset type swap. * will need to be in order of assets in assets[] array. should be * fine if we keep track. * @return toDistribute amount of distributionToken distributed to fee distributor */ function distributeProtocolRevenue(uint256[] calldata _minAmountOut) external returns (uint256 toDistribute) { require(msg.sender == keeper, "!keeper"); if (address(distributionToken) == WETH) { IWETH(address(distributionToken)).deposit{value: address(this).balance}(); } uint256 len = assets.length; for (uint256 i; i < len; i++) { IERC20 asset = IERC20(assets[i]); uint256 assetBalance = asset.balanceOf(address(this)); if (assetBalance == 0) { continue; } uint256 multiSigRevenue = (assetBalance * (TOTAL_PCT - pctAllocationForRBNLockers)) / TOTAL_PCT; // If we are holding the distributionToken itself, // do not swap if (address(asset) != address(distributionToken)) { // Calculate RBN allocation amount to swap for distributionToken uint256 amountIn = assetBalance - multiSigRevenue; _swap(address(asset), amountIn, _minAmountOut[i]); } // Transfer multisig allocation of protocol revenue to multisig asset.safeTransfer(protocolRevenueRecipient, multiSigRevenue); } toDistribute = distributionToken.balanceOf(address(this)); distributionToken.safeApprove(address(feeDistributor), toDistribute); // Tranfer RBN locker allocation of protocol revenue to fee distributor feeDistributor.burn(address(distributionToken), toDistribute); } /** * @notice * Amount of _asset allocated to RBN lockers from current balance * @return amount allocated to RBN lockers */ function claimableByRBNLockersOfAsset(address _asset) external view returns (uint256) { uint256 allocPCT = pctAllocationForRBNLockers; uint256 balance = _asset == address(0) ? address(this).balance : IERC20(_asset).balanceOf(address(this)); return (balance * allocPCT) / TOTAL_PCT; } /** * @notice * Amount of _asset allocated to multisig from current balance * @return amount allocated to multisig */ function claimableByProtocolOfAsset(address _asset) external view returns (uint256) { uint256 allocPCT = TOTAL_PCT - pctAllocationForRBNLockers; uint256 balance = _asset == address(0) ? address(this).balance : IERC20(_asset).balanceOf(address(this)); return (balance * allocPCT) / TOTAL_PCT; } /** * @notice * Total allocated to RBN lockers across all assets balances * @return total allocated (in USD) */ function totalClaimableByRBNLockersInUSD() external view returns (uint256) { uint256 allocPCT = pctAllocationForRBNLockers; return _getTotalAssetValue(allocPCT); } /** * @notice * Total allocated to multisig across all assets balances * @return total allocated (in USD) */ function totalClaimableByProtocolInUSD() external view returns (uint256) { uint256 allocPCT = TOTAL_PCT - pctAllocationForRBNLockers; return _getTotalAssetValue(allocPCT); } /** * @notice * Total claimable across all asset balances based on allocation PCT * @param _allocPCT allocation percentage * @return claimable total claimable (in USD) */ function _getTotalAssetValue(uint256 _allocPCT) internal view returns (uint256 claimable) { uint256 len = assets.length; for (uint256 i; i < len; i++) { IChainlink oracle = IChainlink(oracles[assets[i]]); ERC20 asset = ERC20(assets[i]); uint256 bal = asset.balanceOf(address(this)); if (assets[i] == WSTETH) { bal = IWSTETH(assets[i]).getStETHByWstETH(bal); } else if (assets[i] == yvUSDC) { bal = (bal * IYVUSDC(assets[i]).pricePerShare()) / 10**6; } uint256 balance = bal * (10**(18 - asset.decimals())); if (assets[i] == WETH) { balance += address(this).balance; } // Approximate claimable by multiplying // current asset balance with current asset price in USD claimable += (balance * uint256(oracle.latestAnswer()) * _allocPCT) / 10**8 / TOTAL_PCT; } } /** * @notice * Swaps _amountIn of _asset into distributionToken * @param _asset asset to swap from * @param _amountIn amount to swap of asset * @param _minAmountOut min amount out for every asset type swap */ function _swap( address _asset, uint256 _amountIn, uint256 _minAmountOut ) internal { if (_asset == WSTETH) { uint256 _stethAmountIn = IWSTETH(_asset).unwrap(_amountIn); TransferHelper.safeApprove( STETH, address(STETH_ETH_CRV_POOL), _stethAmountIn ); STETH_ETH_CRV_POOL.exchange(1, 0, _stethAmountIn, _minAmountOut); IWETH(address(distributionToken)).deposit{value: address(this).balance}(); return; } if (_asset == yvUSDC) { TransferHelper.safeApprove(_asset, yvUSDC, _amountIn); _amountIn = IYVUSDC(yvUSDC).withdraw(_amountIn); } TransferHelper.safeApprove( _asset != yvUSDC ? _asset : USDC, address(UNIV3_SWAP_ROUTER), _amountIn ); ISwapRouter.ExactInputParams memory params = ISwapRouter.ExactInputParams({ path: intermediaryPath[_asset], recipient: address(this), amountIn: _amountIn, amountOutMinimum: _minAmountOut }); // Executes the swap. UNIV3_SWAP_ROUTER.exactInput(params); } /** * @notice * add asset * @dev Can be called by admin * @param _asset new asset * @param _oracle ASSET/USD ORACLE. * @param _intermediaryPath path for univ3 swap. * @param _poolFees fees for asset / distributionToken. * If intermediary path then pool fee between both pairs * (ex: AAVE / ETH , ETH / USDC) * NOTE: if intermediaryPath empty then single hop swap * NOTE: MUST BE ASSET / USD ORACLE * NOTE: 3000 = 0.3% fee for pool fees */ function setAsset( address _asset, address _oracle, address[] calldata _intermediaryPath, uint24[] calldata _poolFees ) external onlyOwner { require(_asset != address(0), "!_asset"); uint256 _pathLen = _intermediaryPath.length; uint256 _swapFeeLen = _poolFees.length; // We must be setting new valid oracle, or want to keep as is if one exists require(IChainlink(_oracle).decimals() == 8, "!ASSET/USD"); require(_pathLen < 2, "invalid intermediary path"); require(_swapFeeLen == _pathLen + 1, "invalid pool fees array length"); // If not set asset if (oracles[_asset] == address(0)) { assets.push(_asset); } // Set oracle for asset oracles[_asset] = _oracle; // Multiple pool swaps are encoded through bytes called a `path`. // A path is a sequence of token addresses and poolFees that define the pools used in the swaps. // The format for pool encoding is (tokenIn, fee, tokenOut/tokenIn, fee, tokenOut) // where tokenIn/tokenOut parameter is the shared token across the pools. if (_pathLen > 0) { intermediaryPath[_asset] = abi.encodePacked( _asset != yvUSDC ? _asset : USDC, _poolFees[0], _intermediaryPath[0], _poolFees[1], address(distributionToken) ); } else { intermediaryPath[_asset] = abi.encodePacked( _asset != yvUSDC ? _asset : USDC, _poolFees[0], address(distributionToken) ); } emit NewAsset(_asset, intermediaryPath[_asset]); } /** * @notice * recover all assets * @dev Can be called by admin */ function recoverAllAssets() external onlyOwner { // For all added assets, send to protocol revenue recipient uint256 len = assets.length; for (uint256 i = 0; i < len; i++) { _recoverAsset(assets[i]); } } /** * @notice * recover specific asset * @dev Can be called by admin * @param _asset asset to recover */ function recoverAsset(address _asset) external onlyOwner { require(_asset != address(0), "!asset"); _recoverAsset(_asset); } /** * @notice * recovers asset logic * @param _asset asset to recover */ function _recoverAsset(address _asset) internal { IERC20 asset = IERC20(_asset); uint256 bal = asset.balanceOf(address(this)); if (bal > 0) { asset.safeTransfer(protocolRevenueRecipient, bal); emit RecoveredAsset(_asset); } // Recover ETH as well if (_asset == WETH) { uint256 ethBal = address(this).balance; if (ethBal > 0) { payable(protocolRevenueRecipient).transfer(ethBal); } } } /** * @notice * set fee distributor * @dev Can be called by admin * @param _feeDistributor new fee distributor */ function setFeeDistributor(address _feeDistributor) external onlyOwner { require(_feeDistributor != address(0), "!_feeDistributor"); feeDistributor = IFeeDistributor(_feeDistributor); emit NewFeeDistributor(_feeDistributor); } /** * @notice * set yvusdc * @dev Can be called by admin * @param _yvUSDC new yvusdc address for new version */ function setYVUSDC(address _yvUSDC) external onlyOwner { require(_yvUSDC != address(0), "!_yvUSDC"); yvUSDC = _yvUSDC; emit NewYVUSDC(_yvUSDC); } /** * @notice * set rbn locker allocation pct * @dev Can be called by admin * @param _pctAllocationForRBNLockers new allocation for rbn lockers */ function setRBNLockerAllocPCT(uint256 _pctAllocationForRBNLockers) external onlyOwner { require( _pctAllocationForRBNLockers <= TOTAL_PCT, "!_pctAllocationForRBNLockers" ); pctAllocationForRBNLockers = _pctAllocationForRBNLockers; emit NewRBNLockerAllocation(_pctAllocationForRBNLockers); } /** * @notice * set new distribution asset * @dev Can be called by admin * @param _distributionToken new distribution token */ function setDistributionToken(address _distributionToken) external onlyOwner { require(_distributionToken != address(0), "!_distributionToken"); distributionToken = IERC20(_distributionToken); emit NewDistributionToken(_distributionToken); } /** * @notice * set protocol revenue recipient * @dev Can be called by admin * @param _protocolRevenueRecipient new protocol revenue recipient */ function setProtocolRevenueRecipient(address _protocolRevenueRecipient) external onlyOwner { require( _protocolRevenueRecipient != address(0), "!_protocolRevenueRecipient" ); protocolRevenueRecipient = _protocolRevenueRecipient; emit NewProtocolRevenueRecipient(_protocolRevenueRecipient); } /** * @notice * set keeper for weekly distributions * @dev Can be called by admin * @param _keeper new keeper */ function setKeeper(address _keeper) external onlyOwner { require(_keeper != address(0), "!_keeper"); keeper = _keeper; emit NewKeeper(_keeper); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; interface IFeeDistributor{ function burn(address coin, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.2; pragma experimental ABIEncoderV2; interface IChainlink { function decimals() external view returns (uint8); function latestAnswer() external view returns (int256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IWETH { function deposit() external payable; function balanceOf(address account) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IWSTETH { function unwrap(uint256 _amount) external returns (uint256); function getStETHByWstETH(uint256 _wstETHAmount) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ICRV { // https://github.com/curvefi/curve-contract/blob/ // b0bbf77f8f93c9c5f4e415bce9cd71f0cdee960e/contracts/pools/steth/StableSwapSTETH.vy#L431 function exchange( int128 _indexIn, int128 _indexOut, uint256 _amountIn, uint256 _minAmountOut ) external payable returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IYVUSDC { function withdraw(uint256 maxShares) external returns (uint256); function pricePerShare() external view returns (uint256); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V3 interface ISwapRouter { struct ExactInputParams { bytes path; address recipient; uint256 amountIn; uint256 amountOutMinimum; } /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.0; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; library TransferHelper { /// @notice Transfers tokens from the targeted address to the given destination /// @notice Errors with 'STF' if transfer fails /// @param token The contract address of the token to be transferred /// @param from The originating address from which the tokens will be transferred /// @param to The destination address of the transfer /// @param value The amount to be transferred function safeTransferFrom( address token, address from, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF'); } /// @notice Transfers tokens from msg.sender to a recipient /// @dev Errors with ST if transfer fails /// @param token The contract address of the token which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST'); } /// @notice Approves the stipulated contract to spend the given allowance in the given token /// @dev Errors with 'SA' if transfer fails /// @param token The contract address of the token to be approved /// @param to The target of the approval /// @param value The amount of the given token the target will be allowed to spend function safeApprove( address token, address to, uint256 value ) internal { (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA'); } /// @notice Transfers ETH to the recipient address /// @dev Fails with `STE` /// @param to The destination of the transfer /// @param value The value to be transferred function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'STE'); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 9999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
[{"inputs":[{"internalType":"uint256","name":"_pctAllocationForRBNLockers","type":"uint256"},{"internalType":"address","name":"_feeDistributor","type":"address"},{"internalType":"address","name":"_protocolRevenueRecipient","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_keeper","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"bytes","name":"intermediaryPath","type":"bytes"}],"name":"NewAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"distributionToken","type":"address"}],"name":"NewDistributionToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeDistributor","type":"address"}],"name":"NewFeeDistributor","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"keeper","type":"address"}],"name":"NewKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"protocolRevenueRecipient","type":"address"}],"name":"NewProtocolRevenueRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"pctAllocationForRBNLockers","type":"uint256"}],"name":"NewRBNLockerAllocation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"yvUSDC","type":"address"}],"name":"NewYVUSDC","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"asset","type":"address"}],"name":"RecoveredAsset","type":"event"},{"inputs":[],"name":"STETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STETH_ETH_CRV_POOL","outputs":[{"internalType":"contract ICRV","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_PCT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNIV3_SWAP_ROUTER","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WSTETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"assets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"claimableByProtocolOfAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"claimableByRBNLockersOfAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_minAmountOut","type":"uint256[]"}],"name":"distributeProtocolRevenue","outputs":[{"internalType":"uint256","name":"toDistribute","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributionToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeDistributor","outputs":[{"internalType":"contract IFeeDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"intermediaryPath","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"oracles","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pctAllocationForRBNLockers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolRevenueRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recoverAllAssets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"}],"name":"recoverAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address[]","name":"_intermediaryPath","type":"address[]"},{"internalType":"uint24[]","name":"_poolFees","type":"uint24[]"}],"name":"setAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_distributionToken","type":"address"}],"name":"setDistributionToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeDistributor","type":"address"}],"name":"setFeeDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_protocolRevenueRecipient","type":"address"}],"name":"setProtocolRevenueRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pctAllocationForRBNLockers","type":"uint256"}],"name":"setRBNLockerAllocPCT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_yvUSDC","type":"address"}],"name":"setYVUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalClaimableByProtocolInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimableByRBNLockersInUSD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yvUSDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600180546001600160a01b031990811673a354f35829ae975e850e23e9615b11da1b3dc4de179091556002805490911673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc21790553480156200005957600080fd5b5060405162003616380380620036168339810160408190526200007c916200026a565b6200008733620001fd565b6001600160a01b038416620000d65760405162461bcd60e51b815260206004820152601060248201526f10afb332b2a234b9ba3934b13aba37b960811b60448201526064015b60405180910390fd5b6001600160a01b0383166200012e5760405162461bcd60e51b815260206004820152601a60248201527f215f70726f746f636f6c526576656e7565526563697069656e740000000000006044820152606401620000cd565b6001600160a01b038216620001705760405162461bcd60e51b815260206004820152600760248201526610afb0b236b4b760c91b6044820152606401620000cd565b6001600160a01b038116620001b35760405162461bcd60e51b815260206004820152600860248201526710afb5b2b2b832b960c11b6044820152606401620000cd565b60059490945550600480546001600160a01b03199081166001600160a01b0394851617909155600380548216928416929092179091556009805490911691909216179055620002d1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200026557600080fd5b919050565b600080600080600060a086880312156200028357600080fd5b8551945062000295602087016200024d565b9350620002a5604087016200024d565b9250620002b5606087016200024d565b9150620002c5608087016200024d565b90509295509295909350565b61333580620002e16000396000f3fe6080604052600436106102025760003560e01c806389a302711161011d578063ad5c4648116100b0578063ccfc2e8d1161007f578063d9fb643a11610064578063d9fb643a146105fc578063e00bfe5014610624578063f2fde38b1461064c57600080fd5b8063ccfc2e8d146105bc578063cf35bdd0146105dc57600080fd5b8063ad5c464814610528578063addd509914610550578063b8e8513514610586578063c41d2874146105a657600080fd5b80639ce9a544116100ec5780639ce9a544146104a05780639d139062146104c0578063a494a39f146104e0578063aced16611461050857600080fd5b806389a30271146104255780638a196e861461044d5780638da5cb5b146104625780638e08e4d71461048057600080fd5b806337d20fff116101955780634f6e746d116101645780634f6e746d146103b257806361566aff146103da578063715018a6146103f0578063748747e61461040557600080fd5b806337d20fff1461033057806340066d971461035057806344bec2131461036557806345aadbc01461039257600080fd5b80630d9aeb74116101d15780630d9aeb74146102b057806329687dd2146102d057806329dba390146102f0578063353331351461031057600080fd5b80630296b9d11461020e57806307e56395146102415780630c335dc7146102635780630d43e8ad1461027857600080fd5b3661020957005b600080fd5b34801561021a57600080fd5b5061022e610229366004612c5e565b61066c565b6040519081526020015b60405180910390f35b34801561024d57600080fd5b5061026161025c366004612c5e565b61072c565b005b34801561026f57600080fd5b5061022e61084e565b34801561028457600080fd5b50600454610298906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102bc57600080fd5b5061022e6102cb366004612cc5565b610863565b3480156102dc57600080fd5b5061022e6102eb366004612c5e565b610bf8565b3480156102fc57600080fd5b5061026161030b366004612c5e565b610c63565b34801561031c57600080fd5b5061026161032b366004612d07565b610d79565b34801561033c57600080fd5b5061026161034b366004612c5e565b610e5a565b34801561035c57600080fd5b5061022e610f16565b34801561037157600080fd5b50610385610380366004612c5e565b610f34565b6040516102389190612d96565b34801561039e57600080fd5b50600154610298906001600160a01b031681565b3480156103be57600080fd5b5061029873dc24316b9ae028f1497c275eb9192a3ea0f6702281565b3480156103e657600080fd5b5061022e60055481565b3480156103fc57600080fd5b50610261610fce565b34801561041157600080fd5b50610261610420366004612c5e565b611034565b34801561043157600080fd5b5061029873a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b34801561045957600080fd5b5061026161114a565b34801561046e57600080fd5b506000546001600160a01b0316610298565b34801561048c57600080fd5b5061026161049b366004612da9565b6111f8565b3480156104ac57600080fd5b50600354610298906001600160a01b031681565b3480156104cc57600080fd5b50600254610298906001600160a01b031681565b3480156104ec57600080fd5b506102987368b3465833fb72a70ecdf485e0e4c7bd8665fc4581565b34801561051457600080fd5b50600954610298906001600160a01b031681565b34801561053457600080fd5b5061029873c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561055c57600080fd5b5061029861056b366004612c5e565b6007602052600090815260409020546001600160a01b031681565b34801561059257600080fd5b506102616105a1366004612c5e565b6117ff565b3480156105b257600080fd5b5061022e61271081565b3480156105c857600080fd5b506102616105d7366004612c5e565b611915565b3480156105e857600080fd5b506102986105f7366004612d07565b611a2b565b34801561060857600080fd5b50610298737f39c581f595b53c5cb19bd0b3f8da6c935e2ca081565b34801561063057600080fd5b5061029873ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b34801561065857600080fd5b50610261610667366004612c5e565b611a55565b600554600090816001600160a01b03841615610709576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a08231906024015b602060405180830381865afa1580156106e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107049190612e3a565b61070b565b475b905061271061071a8383612e82565b6107249190612ebf565b949350505050565b6000546001600160a01b0316331461078b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381166107e15760405162461bcd60e51b815260206004820152601a60248201527f215f70726f746f636f6c526576656e7565526563697069656e740000000000006044820152606401610782565b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f3d47dbcdacad44d207d56d2a7970b180937a639777c330d01e64edd6174f83e8906020015b60405180910390a150565b60055460009061085d81611b34565b91505090565b6009546000906001600160a01b031633146108c05760405162461bcd60e51b815260206004820152600760248201527f216b6565706572000000000000000000000000000000000000000000000000006044820152606401610782565b6002546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2141561095157600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b15801561093757600080fd5b505af115801561094b573d6000803e3d6000fd5b50505050505b60085460005b81811015610ab65760006008828154811061097457610974612efa565b60009182526020822001546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa1580156109e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a049190612e3a565b905080610a12575050610aa4565b6000612710600554612710610a279190612f29565b610a319084612e82565b610a3b9190612ebf565b6002549091506001600160a01b03848116911614610a86576000610a5f8284612f29565b9050610a8484828b8b89818110610a7857610a78612efa565b90506020020135611fbe565b505b600354610aa0906001600160a01b0385811691168361241e565b5050505b80610aae81612f40565b915050610957565b506002546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3c9190612e3a565b600454600254919350610b5c916001600160a01b039081169116846124ea565b600480546002546040517f9dc29fac0000000000000000000000000000000000000000000000000000000081526001600160a01b0391821693810193909352602483018590521690639dc29fac906044016020604051808303816000875af1158015610bcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf09190612f79565b505092915050565b600080600554612710610c0b9190612f29565b905060006001600160a01b03841615610709576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a08231906024016106c3565b6000546001600160a01b03163314610cbd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b038116610d135760405162461bcd60e51b815260206004820152601360248201527f215f646973747269627574696f6e546f6b656e000000000000000000000000006044820152606401610782565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fde880ddf56000cd5b733e9681b7126b537a4c166a168e0976e1f5f9ebb788fe290602001610843565b6000546001600160a01b03163314610dd35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b612710811115610e255760405162461bcd60e51b815260206004820152601c60248201527f215f706374416c6c6f636174696f6e466f7252424e4c6f636b657273000000006044820152606401610782565b60058190556040518181527fc548191a740509e5336a4278fa23e8990ca297e75806c54c1e454217d2570cf290602001610843565b6000546001600160a01b03163314610eb45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b038116610f0a5760405162461bcd60e51b815260206004820152600660248201527f21617373657400000000000000000000000000000000000000000000000000006044820152606401610782565b610f1381612638565b50565b600080600554612710610f299190612f29565b905061085d81611b34565b60066020526000908152604090208054610f4d90612f9b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7990612f9b565b8015610fc65780601f10610f9b57610100808354040283529160200191610fc6565b820191906000526020600020905b815481529060010190602001808311610fa957829003601f168201915b505050505081565b6000546001600160a01b031633146110285760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6110326000612789565b565b6000546001600160a01b0316331461108e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0381166110e45760405162461bcd60e51b815260206004820152600860248201527f215f6b65657065720000000000000000000000000000000000000000000000006044820152606401610782565b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f8b67cf08b3b4a582cdf414f29895fde3e3f03a3bf26373a22a8b9bd89e75748890602001610843565b6000546001600160a01b031633146111a45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b60085460005b818110156111f4576111e2600882815481106111c8576111c8612efa565b6000918252602090912001546001600160a01b0316612638565b806111ec81612f40565b9150506111aa565b5050565b6000546001600160a01b031633146112525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0386166112a85760405162461bcd60e51b815260206004820152600760248201527f215f6173736574000000000000000000000000000000000000000000000000006044820152606401610782565b604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849183916001600160a01b0389169163313ce5679160048083019260209291908290030181865afa15801561130a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132e9190612fef565b60ff166008146113805760405162461bcd60e51b815260206004820152600a60248201527f2141535345542f555344000000000000000000000000000000000000000000006044820152606401610782565b600282106113d05760405162461bcd60e51b815260206004820152601960248201527f696e76616c696420696e7465726d6564696172792070617468000000000000006044820152606401610782565b6113db826001613012565b81146114295760405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420706f6f6c2066656573206172726179206c656e67746800006044820152606401610782565b6001600160a01b03888116600090815260076020526040902054166114ac57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038a161790555b6001600160a01b03888116600090815260076020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169189169190911790558115611683576001546001600160a01b03898116911614156115285773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4861152a565b875b8484600081811061153d5761153d612efa565b9050602002016020810190611552919061302a565b8787600081811061156557611565612efa565b905060200201602081019061157a9190612c5e565b8686600181811061158d5761158d612efa565b90506020020160208101906115a2919061302a565b6002546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606096871b811660208301527fffffff000000000000000000000000000000000000000000000000000000000060e896871b8116603484015294871b811660378301529290941b909216604b840152921b909116604e820152606201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526001600160a01b038a16600090815260066020908152919020825161167d93919290910190612ba9565b506117a3565b6001546001600160a01b03898116911614156116b35773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486116b5565b875b848460008181106116c8576116c8612efa565b90506020020160208101906116dd919061302a565b600254604051606093841b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116602083015260e89390931b7fffffff0000000000000000000000000000000000000000000000000000000000166034820152921b166037820152604b01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526001600160a01b038a1660009081526006602090815291902082516117a193919290910190612ba9565b505b6001600160a01b0388166000908152600660205260409081902090517f6a118707108586e9f71308f090999646ac19ba11725e911ad95087db797b623c916117ed918b919061304f565b60405180910390a15050505050505050565b6000546001600160a01b031633146118595760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0381166118af5760405162461bcd60e51b815260206004820152600860248201527f215f7976555344430000000000000000000000000000000000000000000000006044820152606401610782565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fb2e6feb35c27578590c9acc6cf563e6c07d5b80a506f3ed779496351dae5f08c90602001610843565b6000546001600160a01b0316331461196f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0381166119c55760405162461bcd60e51b815260206004820152601060248201527f215f6665654469737472696275746f72000000000000000000000000000000006044820152606401610782565b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f0b2f38d4d51572dddd42a52a5a9e4e4e9b7ee83f48cbbd90b2fd209dd58c9abb90602001610843565b60088181548110611a3b57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314611aaf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b038116611b2b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610782565b610f1381612789565b600854600090815b81811015611fb75760006007600060088481548110611b5d57611b5d612efa565b60009182526020808320909101546001600160a01b0390811684529083019390935260409091018120546008805491909316935090919084908110611ba457611ba4612efa565b60009182526020822001546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015611c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c349190612e3a565b9050737f39c581f595b53c5cb19bd0b3f8da6c935e2ca06001600160a01b031660088581548110611c6757611c67612efa565b6000918252602090912001546001600160a01b03161415611d2b5760088481548110611c9557611c95612efa565b6000918252602090912001546040517fbb2952fc000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063bb2952fc90602401602060405180830381865afa158015611d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d249190612e3a565b9050611e22565b600154600880546001600160a01b039092169186908110611d4e57611d4e612efa565b6000918252602090912001546001600160a01b03161415611e2257620f424060088581548110611d8057611d80612efa565b60009182526020918290200154604080517f99530b0600000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216926399530b06926004808401938290030181865afa158015611de7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0b9190612e3a565b611e159083612e82565b611e1f9190612ebf565b90505b6000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e869190612fef565b611e91906012613140565b611e9c90600a613285565b611ea69083612e82565b905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031660088681548110611ed957611ed9612efa565b6000918252602090912001546001600160a01b03161415611f0157611efe4782613012565b90505b6127106305f5e10089866001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6c9190612e3a565b611f769085612e82565b611f809190612e82565b611f8a9190612ebf565b611f949190612ebf565b611f9e9088613012565b9650505050508080611faf90612f40565b915050611b3c565b5050919050565b6001600160a01b038316737f39c581f595b53c5cb19bd0b3f8da6c935e2ca014156121b3576040517fde0e9a3e000000000000000000000000000000000000000000000000000000008152600481018390526000906001600160a01b0385169063de0e9a3e906024016020604051808303816000875af1158015612046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206a9190612e3a565b905061209f73ae7ab96520de3a18e5e111b5eaab095312d7fe8473dc24316b9ae028f1497c275eb9192a3ea0f67022836127f1565b6040517f3df021240000000000000000000000000000000000000000000000000000000081526001600482015260006024820152604481018290526064810183905273dc24316b9ae028f1497c275eb9192a3ea0f6702290633df02124906084016020604051808303816000875af115801561211f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121439190612e3a565b50600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b15801561219457600080fd5b505af11580156121a8573d6000803e3d6000fd5b505050505050505050565b6001546001600160a01b038481169116141561226c576001546121e19084906001600160a01b0316846127f1565b6001546040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b0390911690632e1a7d4d906024016020604051808303816000875af1158015612245573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122699190612e3a565b91505b6001546122bd906001600160a01b03858116911614156122a05773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486122a2565b835b7368b3465833fb72a70ecdf485e0e4c7bd8665fc45846127f1565b604080516080810182526001600160a01b0385166000908152600660205291822080548291906122ec90612f9b565b80601f016020809104026020016040519081016040528092919081815260200182805461231890612f9b565b80156123655780601f1061233a57610100808354040283529160200191612365565b820191906000526020600020905b81548152906001019060200180831161234857829003601f168201915b505050918352505030602082015260408082018690526060909101849052517fb858183f0000000000000000000000000000000000000000000000000000000081529091507368b3465833fb72a70ecdf485e0e4c7bd8665fc459063b858183f906123d4908490600401613294565b6020604051808303816000875af11580156123f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124179190612e3a565b5050505050565b6040516001600160a01b0383166024820152604481018290526124e59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612933565b505050565b80158061257d57506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612557573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257b9190612e3a565b155b6125ef5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610782565b6040516001600160a01b0383166024820152604481018290526124e59084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401612463565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561269a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126be9190612e3a565b9050801561271d576003546126e0906001600160a01b0384811691168361241e565b6040516001600160a01b03841681527ffffe9c6062d03a43f0677eeda8831f7a9fa483cb69f28d2cdb465e84449a21409060200160405180910390a15b6001600160a01b03831673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156124e557478015612783576003546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015612417573d6000803e3d6000fd5b50505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052915160009283929087169161287b91906132e3565b6000604051808303816000865af19150503d80600081146128b8576040519150601f19603f3d011682016040523d82523d6000602084013e6128bd565b606091505b50915091508180156128e75750805115806128e75750808060200190518101906128e79190612f79565b6124175760405162461bcd60e51b815260206004820152600260248201527f53410000000000000000000000000000000000000000000000000000000000006044820152606401610782565b6000612988826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a189092919063ffffffff16565b8051909150156124e557808060200190518101906129a69190612f79565b6124e55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610782565b6060612a278484600085612a31565b90505b9392505050565b606082471015612aa95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610782565b843b612af75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610782565b600080866001600160a01b03168587604051612b1391906132e3565b60006040518083038185875af1925050503d8060008114612b50576040519150601f19603f3d011682016040523d82523d6000602084013e612b55565b606091505b5091509150612b65828286612b70565b979650505050505050565b60608315612b7f575081612a2a565b825115612b8f5782518084602001fd5b8160405162461bcd60e51b81526004016107829190612d96565b828054612bb590612f9b565b90600052602060002090601f016020900481019282612bd75760008555612c1d565b82601f10612bf057805160ff1916838001178555612c1d565b82800160010185558215612c1d579182015b82811115612c1d578251825591602001919060010190612c02565b50612c29929150612c2d565b5090565b5b80821115612c295760008155600101612c2e565b80356001600160a01b0381168114612c5957600080fd5b919050565b600060208284031215612c7057600080fd5b612a2a82612c42565b60008083601f840112612c8b57600080fd5b50813567ffffffffffffffff811115612ca357600080fd5b6020830191508360208260051b8501011115612cbe57600080fd5b9250929050565b60008060208385031215612cd857600080fd5b823567ffffffffffffffff811115612cef57600080fd5b612cfb85828601612c79565b90969095509350505050565b600060208284031215612d1957600080fd5b5035919050565b60005b83811015612d3b578181015183820152602001612d23565b838111156127835750506000910152565b60008151808452612d64816020860160208601612d20565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a2a6020830184612d4c565b60008060008060008060808789031215612dc257600080fd5b612dcb87612c42565b9550612dd960208801612c42565b9450604087013567ffffffffffffffff80821115612df657600080fd5b612e028a838b01612c79565b90965094506060890135915080821115612e1b57600080fd5b50612e2889828a01612c79565b979a9699509497509295939492505050565b600060208284031215612e4c57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612eba57612eba612e53565b500290565b600082612ef5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082821015612f3b57612f3b612e53565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612f7257612f72612e53565b5060010190565b600060208284031215612f8b57600080fd5b81518015158114612a2a57600080fd5b600181811c90821680612faf57607f821691505b60208210811415612fe9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60006020828403121561300157600080fd5b815160ff81168114612a2a57600080fd5b6000821982111561302557613025612e53565b500190565b60006020828403121561303c57600080fd5b813562ffffff81168114612a2a57600080fd5b6001600160a01b0383168152600060206040818401526000845481600182811c91508083168061308057607f831692505b8583108114156130b7577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b60408801839052606088018180156130d6576001811461310557613130565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861682528782019650613130565b60008b81526020902060005b8681101561312a57815484820152908501908901613111565b83019750505b50949a9950505050505050505050565b600060ff821660ff84168082101561315a5761315a612e53565b90039392505050565b600181815b808511156131bc57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156131a2576131a2612e53565b808516156131af57918102915b93841c9390800290613168565b509250929050565b6000826131d35750600161327f565b816131e05750600061327f565b81600181146131f657600281146132005761321c565b600191505061327f565b60ff84111561321157613211612e53565b50506001821b61327f565b5060208310610133831016604e8410600b841016171561323f575081810a61327f565b6132498383613163565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561327b5761327b612e53565b0290505b92915050565b6000612a2a60ff8416836131c4565b6020815260008251608060208401526132b060a0840182612d4c565b90506001600160a01b03602085015116604084015260408401516060840152606084015160808401528091505092915050565b600082516132f5818460208701612d20565b919091019291505056fea26469706673582212207ff05967964a9c8b178c9186483ac92026105d18529181137c418c11012be2f864736f6c634300080b00330000000000000000000000000000000000000000000000000000000000001388000000000000000000000000d086c9356a5683192b10d93d4d92d8fcba705692000000000000000000000000daeada3d210d2f45874724beea03c7d4bbd4167400000000000000000000000077da011d5314d80be59e939c2f7ec2f702e1dcc4000000000000000000000000a4290c9eae274c7a8fbc57a1e68adc3e95e7c67eDeployed Bytecode
0x6080604052600436106102025760003560e01c806389a302711161011d578063ad5c4648116100b0578063ccfc2e8d1161007f578063d9fb643a11610064578063d9fb643a146105fc578063e00bfe5014610624578063f2fde38b1461064c57600080fd5b8063ccfc2e8d146105bc578063cf35bdd0146105dc57600080fd5b8063ad5c464814610528578063addd509914610550578063b8e8513514610586578063c41d2874146105a657600080fd5b80639ce9a544116100ec5780639ce9a544146104a05780639d139062146104c0578063a494a39f146104e0578063aced16611461050857600080fd5b806389a30271146104255780638a196e861461044d5780638da5cb5b146104625780638e08e4d71461048057600080fd5b806337d20fff116101955780634f6e746d116101645780634f6e746d146103b257806361566aff146103da578063715018a6146103f0578063748747e61461040557600080fd5b806337d20fff1461033057806340066d971461035057806344bec2131461036557806345aadbc01461039257600080fd5b80630d9aeb74116101d15780630d9aeb74146102b057806329687dd2146102d057806329dba390146102f0578063353331351461031057600080fd5b80630296b9d11461020e57806307e56395146102415780630c335dc7146102635780630d43e8ad1461027857600080fd5b3661020957005b600080fd5b34801561021a57600080fd5b5061022e610229366004612c5e565b61066c565b6040519081526020015b60405180910390f35b34801561024d57600080fd5b5061026161025c366004612c5e565b61072c565b005b34801561026f57600080fd5b5061022e61084e565b34801561028457600080fd5b50600454610298906001600160a01b031681565b6040516001600160a01b039091168152602001610238565b3480156102bc57600080fd5b5061022e6102cb366004612cc5565b610863565b3480156102dc57600080fd5b5061022e6102eb366004612c5e565b610bf8565b3480156102fc57600080fd5b5061026161030b366004612c5e565b610c63565b34801561031c57600080fd5b5061026161032b366004612d07565b610d79565b34801561033c57600080fd5b5061026161034b366004612c5e565b610e5a565b34801561035c57600080fd5b5061022e610f16565b34801561037157600080fd5b50610385610380366004612c5e565b610f34565b6040516102389190612d96565b34801561039e57600080fd5b50600154610298906001600160a01b031681565b3480156103be57600080fd5b5061029873dc24316b9ae028f1497c275eb9192a3ea0f6702281565b3480156103e657600080fd5b5061022e60055481565b3480156103fc57600080fd5b50610261610fce565b34801561041157600080fd5b50610261610420366004612c5e565b611034565b34801561043157600080fd5b5061029873a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b34801561045957600080fd5b5061026161114a565b34801561046e57600080fd5b506000546001600160a01b0316610298565b34801561048c57600080fd5b5061026161049b366004612da9565b6111f8565b3480156104ac57600080fd5b50600354610298906001600160a01b031681565b3480156104cc57600080fd5b50600254610298906001600160a01b031681565b3480156104ec57600080fd5b506102987368b3465833fb72a70ecdf485e0e4c7bd8665fc4581565b34801561051457600080fd5b50600954610298906001600160a01b031681565b34801561053457600080fd5b5061029873c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561055c57600080fd5b5061029861056b366004612c5e565b6007602052600090815260409020546001600160a01b031681565b34801561059257600080fd5b506102616105a1366004612c5e565b6117ff565b3480156105b257600080fd5b5061022e61271081565b3480156105c857600080fd5b506102616105d7366004612c5e565b611915565b3480156105e857600080fd5b506102986105f7366004612d07565b611a2b565b34801561060857600080fd5b50610298737f39c581f595b53c5cb19bd0b3f8da6c935e2ca081565b34801561063057600080fd5b5061029873ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b34801561065857600080fd5b50610261610667366004612c5e565b611a55565b600554600090816001600160a01b03841615610709576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a08231906024015b602060405180830381865afa1580156106e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107049190612e3a565b61070b565b475b905061271061071a8383612e82565b6107249190612ebf565b949350505050565b6000546001600160a01b0316331461078b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381166107e15760405162461bcd60e51b815260206004820152601a60248201527f215f70726f746f636f6c526576656e7565526563697069656e740000000000006044820152606401610782565b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f3d47dbcdacad44d207d56d2a7970b180937a639777c330d01e64edd6174f83e8906020015b60405180910390a150565b60055460009061085d81611b34565b91505090565b6009546000906001600160a01b031633146108c05760405162461bcd60e51b815260206004820152600760248201527f216b6565706572000000000000000000000000000000000000000000000000006044820152606401610782565b6002546001600160a01b031673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2141561095157600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b15801561093757600080fd5b505af115801561094b573d6000803e3d6000fd5b50505050505b60085460005b81811015610ab65760006008828154811061097457610974612efa565b60009182526020822001546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa1580156109e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a049190612e3a565b905080610a12575050610aa4565b6000612710600554612710610a279190612f29565b610a319084612e82565b610a3b9190612ebf565b6002549091506001600160a01b03848116911614610a86576000610a5f8284612f29565b9050610a8484828b8b89818110610a7857610a78612efa565b90506020020135611fbe565b505b600354610aa0906001600160a01b0385811691168361241e565b5050505b80610aae81612f40565b915050610957565b506002546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3c9190612e3a565b600454600254919350610b5c916001600160a01b039081169116846124ea565b600480546002546040517f9dc29fac0000000000000000000000000000000000000000000000000000000081526001600160a01b0391821693810193909352602483018590521690639dc29fac906044016020604051808303816000875af1158015610bcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf09190612f79565b505092915050565b600080600554612710610c0b9190612f29565b905060006001600160a01b03841615610709576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a08231906024016106c3565b6000546001600160a01b03163314610cbd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b038116610d135760405162461bcd60e51b815260206004820152601360248201527f215f646973747269627574696f6e546f6b656e000000000000000000000000006044820152606401610782565b600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fde880ddf56000cd5b733e9681b7126b537a4c166a168e0976e1f5f9ebb788fe290602001610843565b6000546001600160a01b03163314610dd35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b612710811115610e255760405162461bcd60e51b815260206004820152601c60248201527f215f706374416c6c6f636174696f6e466f7252424e4c6f636b657273000000006044820152606401610782565b60058190556040518181527fc548191a740509e5336a4278fa23e8990ca297e75806c54c1e454217d2570cf290602001610843565b6000546001600160a01b03163314610eb45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b038116610f0a5760405162461bcd60e51b815260206004820152600660248201527f21617373657400000000000000000000000000000000000000000000000000006044820152606401610782565b610f1381612638565b50565b600080600554612710610f299190612f29565b905061085d81611b34565b60066020526000908152604090208054610f4d90612f9b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7990612f9b565b8015610fc65780601f10610f9b57610100808354040283529160200191610fc6565b820191906000526020600020905b815481529060010190602001808311610fa957829003601f168201915b505050505081565b6000546001600160a01b031633146110285760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6110326000612789565b565b6000546001600160a01b0316331461108e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0381166110e45760405162461bcd60e51b815260206004820152600860248201527f215f6b65657065720000000000000000000000000000000000000000000000006044820152606401610782565b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f8b67cf08b3b4a582cdf414f29895fde3e3f03a3bf26373a22a8b9bd89e75748890602001610843565b6000546001600160a01b031633146111a45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b60085460005b818110156111f4576111e2600882815481106111c8576111c8612efa565b6000918252602090912001546001600160a01b0316612638565b806111ec81612f40565b9150506111aa565b5050565b6000546001600160a01b031633146112525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0386166112a85760405162461bcd60e51b815260206004820152600760248201527f215f6173736574000000000000000000000000000000000000000000000000006044820152606401610782565b604080517f313ce5670000000000000000000000000000000000000000000000000000000081529051849183916001600160a01b0389169163313ce5679160048083019260209291908290030181865afa15801561130a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132e9190612fef565b60ff166008146113805760405162461bcd60e51b815260206004820152600a60248201527f2141535345542f555344000000000000000000000000000000000000000000006044820152606401610782565b600282106113d05760405162461bcd60e51b815260206004820152601960248201527f696e76616c696420696e7465726d6564696172792070617468000000000000006044820152606401610782565b6113db826001613012565b81146114295760405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420706f6f6c2066656573206172726179206c656e67746800006044820152606401610782565b6001600160a01b03888116600090815260076020526040902054166114ac57600880546001810182556000919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038a161790555b6001600160a01b03888116600090815260076020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169189169190911790558115611683576001546001600160a01b03898116911614156115285773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4861152a565b875b8484600081811061153d5761153d612efa565b9050602002016020810190611552919061302a565b8787600081811061156557611565612efa565b905060200201602081019061157a9190612c5e565b8686600181811061158d5761158d612efa565b90506020020160208101906115a2919061302a565b6002546040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606096871b811660208301527fffffff000000000000000000000000000000000000000000000000000000000060e896871b8116603484015294871b811660378301529290941b909216604b840152921b909116604e820152606201604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526001600160a01b038a16600090815260066020908152919020825161167d93919290910190612ba9565b506117a3565b6001546001600160a01b03898116911614156116b35773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486116b5565b875b848460008181106116c8576116c8612efa565b90506020020160208101906116dd919061302a565b600254604051606093841b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000908116602083015260e89390931b7fffffff0000000000000000000000000000000000000000000000000000000000166034820152921b166037820152604b01604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526001600160a01b038a1660009081526006602090815291902082516117a193919290910190612ba9565b505b6001600160a01b0388166000908152600660205260409081902090517f6a118707108586e9f71308f090999646ac19ba11725e911ad95087db797b623c916117ed918b919061304f565b60405180910390a15050505050505050565b6000546001600160a01b031633146118595760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0381166118af5760405162461bcd60e51b815260206004820152600860248201527f215f7976555344430000000000000000000000000000000000000000000000006044820152606401610782565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fb2e6feb35c27578590c9acc6cf563e6c07d5b80a506f3ed779496351dae5f08c90602001610843565b6000546001600160a01b0316331461196f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b0381166119c55760405162461bcd60e51b815260206004820152601060248201527f215f6665654469737472696275746f72000000000000000000000000000000006044820152606401610782565b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f0b2f38d4d51572dddd42a52a5a9e4e4e9b7ee83f48cbbd90b2fd209dd58c9abb90602001610843565b60088181548110611a3b57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314611aaf5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610782565b6001600160a01b038116611b2b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610782565b610f1381612789565b600854600090815b81811015611fb75760006007600060088481548110611b5d57611b5d612efa565b60009182526020808320909101546001600160a01b0390811684529083019390935260409091018120546008805491909316935090919084908110611ba457611ba4612efa565b60009182526020822001546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015611c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c349190612e3a565b9050737f39c581f595b53c5cb19bd0b3f8da6c935e2ca06001600160a01b031660088581548110611c6757611c67612efa565b6000918252602090912001546001600160a01b03161415611d2b5760088481548110611c9557611c95612efa565b6000918252602090912001546040517fbb2952fc000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063bb2952fc90602401602060405180830381865afa158015611d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d249190612e3a565b9050611e22565b600154600880546001600160a01b039092169186908110611d4e57611d4e612efa565b6000918252602090912001546001600160a01b03161415611e2257620f424060088581548110611d8057611d80612efa565b60009182526020918290200154604080517f99530b0600000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216926399530b06926004808401938290030181865afa158015611de7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0b9190612e3a565b611e159083612e82565b611e1f9190612ebf565b90505b6000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611e62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e869190612fef565b611e91906012613140565b611e9c90600a613285565b611ea69083612e82565b905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031660088681548110611ed957611ed9612efa565b6000918252602090912001546001600160a01b03161415611f0157611efe4782613012565b90505b6127106305f5e10089866001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6c9190612e3a565b611f769085612e82565b611f809190612e82565b611f8a9190612ebf565b611f949190612ebf565b611f9e9088613012565b9650505050508080611faf90612f40565b915050611b3c565b5050919050565b6001600160a01b038316737f39c581f595b53c5cb19bd0b3f8da6c935e2ca014156121b3576040517fde0e9a3e000000000000000000000000000000000000000000000000000000008152600481018390526000906001600160a01b0385169063de0e9a3e906024016020604051808303816000875af1158015612046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061206a9190612e3a565b905061209f73ae7ab96520de3a18e5e111b5eaab095312d7fe8473dc24316b9ae028f1497c275eb9192a3ea0f67022836127f1565b6040517f3df021240000000000000000000000000000000000000000000000000000000081526001600482015260006024820152604481018290526064810183905273dc24316b9ae028f1497c275eb9192a3ea0f6702290633df02124906084016020604051808303816000875af115801561211f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121439190612e3a565b50600260009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b15801561219457600080fd5b505af11580156121a8573d6000803e3d6000fd5b505050505050505050565b6001546001600160a01b038481169116141561226c576001546121e19084906001600160a01b0316846127f1565b6001546040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b0390911690632e1a7d4d906024016020604051808303816000875af1158015612245573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122699190612e3a565b91505b6001546122bd906001600160a01b03858116911614156122a05773a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486122a2565b835b7368b3465833fb72a70ecdf485e0e4c7bd8665fc45846127f1565b604080516080810182526001600160a01b0385166000908152600660205291822080548291906122ec90612f9b565b80601f016020809104026020016040519081016040528092919081815260200182805461231890612f9b565b80156123655780601f1061233a57610100808354040283529160200191612365565b820191906000526020600020905b81548152906001019060200180831161234857829003601f168201915b505050918352505030602082015260408082018690526060909101849052517fb858183f0000000000000000000000000000000000000000000000000000000081529091507368b3465833fb72a70ecdf485e0e4c7bd8665fc459063b858183f906123d4908490600401613294565b6020604051808303816000875af11580156123f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124179190612e3a565b5050505050565b6040516001600160a01b0383166024820152604481018290526124e59084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612933565b505050565b80158061257d57506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612557573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257b9190612e3a565b155b6125ef5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610782565b6040516001600160a01b0383166024820152604481018290526124e59084907f095ea7b30000000000000000000000000000000000000000000000000000000090606401612463565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561269a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126be9190612e3a565b9050801561271d576003546126e0906001600160a01b0384811691168361241e565b6040516001600160a01b03841681527ffffe9c6062d03a43f0677eeda8831f7a9fa483cb69f28d2cdb465e84449a21409060200160405180910390a15b6001600160a01b03831673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc214156124e557478015612783576003546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015612417573d6000803e3d6000fd5b50505050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b300000000000000000000000000000000000000000000000000000000179052915160009283929087169161287b91906132e3565b6000604051808303816000865af19150503d80600081146128b8576040519150601f19603f3d011682016040523d82523d6000602084013e6128bd565b606091505b50915091508180156128e75750805115806128e75750808060200190518101906128e79190612f79565b6124175760405162461bcd60e51b815260206004820152600260248201527f53410000000000000000000000000000000000000000000000000000000000006044820152606401610782565b6000612988826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a189092919063ffffffff16565b8051909150156124e557808060200190518101906129a69190612f79565b6124e55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610782565b6060612a278484600085612a31565b90505b9392505050565b606082471015612aa95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610782565b843b612af75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610782565b600080866001600160a01b03168587604051612b1391906132e3565b60006040518083038185875af1925050503d8060008114612b50576040519150601f19603f3d011682016040523d82523d6000602084013e612b55565b606091505b5091509150612b65828286612b70565b979650505050505050565b60608315612b7f575081612a2a565b825115612b8f5782518084602001fd5b8160405162461bcd60e51b81526004016107829190612d96565b828054612bb590612f9b565b90600052602060002090601f016020900481019282612bd75760008555612c1d565b82601f10612bf057805160ff1916838001178555612c1d565b82800160010185558215612c1d579182015b82811115612c1d578251825591602001919060010190612c02565b50612c29929150612c2d565b5090565b5b80821115612c295760008155600101612c2e565b80356001600160a01b0381168114612c5957600080fd5b919050565b600060208284031215612c7057600080fd5b612a2a82612c42565b60008083601f840112612c8b57600080fd5b50813567ffffffffffffffff811115612ca357600080fd5b6020830191508360208260051b8501011115612cbe57600080fd5b9250929050565b60008060208385031215612cd857600080fd5b823567ffffffffffffffff811115612cef57600080fd5b612cfb85828601612c79565b90969095509350505050565b600060208284031215612d1957600080fd5b5035919050565b60005b83811015612d3b578181015183820152602001612d23565b838111156127835750506000910152565b60008151808452612d64816020860160208601612d20565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a2a6020830184612d4c565b60008060008060008060808789031215612dc257600080fd5b612dcb87612c42565b9550612dd960208801612c42565b9450604087013567ffffffffffffffff80821115612df657600080fd5b612e028a838b01612c79565b90965094506060890135915080821115612e1b57600080fd5b50612e2889828a01612c79565b979a9699509497509295939492505050565b600060208284031215612e4c57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612eba57612eba612e53565b500290565b600082612ef5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082821015612f3b57612f3b612e53565b500390565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612f7257612f72612e53565b5060010190565b600060208284031215612f8b57600080fd5b81518015158114612a2a57600080fd5b600181811c90821680612faf57607f821691505b60208210811415612fe9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60006020828403121561300157600080fd5b815160ff81168114612a2a57600080fd5b6000821982111561302557613025612e53565b500190565b60006020828403121561303c57600080fd5b813562ffffff81168114612a2a57600080fd5b6001600160a01b0383168152600060206040818401526000845481600182811c91508083168061308057607f831692505b8583108114156130b7577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b60408801839052606088018180156130d6576001811461310557613130565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861682528782019650613130565b60008b81526020902060005b8681101561312a57815484820152908501908901613111565b83019750505b50949a9950505050505050505050565b600060ff821660ff84168082101561315a5761315a612e53565b90039392505050565b600181815b808511156131bc57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156131a2576131a2612e53565b808516156131af57918102915b93841c9390800290613168565b509250929050565b6000826131d35750600161327f565b816131e05750600061327f565b81600181146131f657600281146132005761321c565b600191505061327f565b60ff84111561321157613211612e53565b50506001821b61327f565b5060208310610133831016604e8410600b841016171561323f575081810a61327f565b6132498383613163565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561327b5761327b612e53565b0290505b92915050565b6000612a2a60ff8416836131c4565b6020815260008251608060208401526132b060a0840182612d4c565b90506001600160a01b03602085015116604084015260408401516060840152606084015160808401528091505092915050565b600082516132f5818460208701612d20565b919091019291505056fea26469706673582212207ff05967964a9c8b178c9186483ac92026105d18529181137c418c11012be2f864736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000001388000000000000000000000000d086c9356a5683192b10d93d4d92d8fcba705692000000000000000000000000daeada3d210d2f45874724beea03c7d4bbd4167400000000000000000000000077da011d5314d80be59e939c2f7ec2f702e1dcc4000000000000000000000000a4290c9eae274c7a8fbc57a1e68adc3e95e7c67e
-----Decoded View---------------
Arg [0] : _pctAllocationForRBNLockers (uint256): 5000
Arg [1] : _feeDistributor (address): 0xd086C9356A5683192B10d93d4d92D8fCBa705692
Arg [2] : _protocolRevenueRecipient (address): 0xDAEada3d210D2f45874724BeEa03C7d4BBD41674
Arg [3] : _admin (address): 0x77DA011d5314D80BE59e939c2f7EC2F702E1DCC4
Arg [4] : _keeper (address): 0xA4290C9EAe274c7A8FbC57A1E68AdC3E95E7C67e
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [1] : 000000000000000000000000d086c9356a5683192b10d93d4d92d8fcba705692
Arg [2] : 000000000000000000000000daeada3d210d2f45874724beea03c7d4bbd41674
Arg [3] : 00000000000000000000000077da011d5314d80be59e939c2f7ec2f702e1dcc4
Arg [4] : 000000000000000000000000a4290c9eae274c7a8fbc57a1e68adc3e95e7c67eLoading...LoadingLoading...Loading
Loading...Loading
Loading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...LoadingLoading...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.
Address QR Code
My Address - Private Name Tag or Note
My Name Tag:
Private Name Tags (up to 35 characters) can be used for easy identification of addressesPrivate Note:
A private note (up to 500 characters) can be attached to this address.
Please DO NOT store any passwords or private keys here.Compiler specific version warnings:
The compiled contract might be susceptible to VerbatimInvalidDeduplication (low-severity), FullInlinerNonExpressionSplitArgumentEvaluationOrder (low-severity), MissingSideEffectsOnSelectorAccess (low-severity), AbiReencodingHeadOverflowWithStaticArrayCleanup (medium-severity), DirtyBytesArrayToStorage (low-severity), DataLocationChangeInInternalOverride (very low-severity), NestedCalldataArrayAbiReencodingSizeValidation (very low-severity), AbiEncodeCallLiteralAsFixedBytesBug (very low-severity) Solidity Compiler Bugs.
Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.Connect a Wallet
Connecting wallet for read function is optional, useful if you want to call certain functions or simply use your wallet's node.SignIn
Address Cards
To use this feature, please login to your Etherscan account and return to this page.Before You Copy
Transaction Private Note
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.