Source Code
Latest 25 from a total of 816 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Deposit Usdm | 24023461 | 7 days ago | IN | 0 ETH | 0.00003871 | ||||
| Deposit Usdm | 24023452 | 7 days ago | IN | 0 ETH | 0.00006099 | ||||
| Withdraw Usdm | 23959883 | 15 days ago | IN | 0 ETH | 0.00017019 | ||||
| Get Reward | 23955596 | 16 days ago | IN | 0 ETH | 0.00000201 | ||||
| Get Reward | 23941068 | 18 days ago | IN | 0 ETH | 0.00019043 | ||||
| Deposit Usdm | 23923661 | 21 days ago | IN | 0 ETH | 0.00018629 | ||||
| Withdraw Usdm | 23923630 | 21 days ago | IN | 0 ETH | 0.00016533 | ||||
| Deposit Usdm | 23918432 | 21 days ago | IN | 0 ETH | 0.00022314 | ||||
| Withdraw Usdm | 23918404 | 21 days ago | IN | 0 ETH | 0.00016592 | ||||
| Get Reward | 23896114 | 24 days ago | IN | 0 ETH | 0.00010365 | ||||
| Deposit Usdm | 23824228 | 35 days ago | IN | 0 ETH | 0.00016176 | ||||
| Deposit Usdm | 23824114 | 35 days ago | IN | 0 ETH | 0.00015407 | ||||
| Get Reward | 23824023 | 35 days ago | IN | 0 ETH | 0.00020263 | ||||
| Get Reward | 23818372 | 35 days ago | IN | 0 ETH | 0.00019178 | ||||
| Get Reward | 23803008 | 38 days ago | IN | 0 ETH | 0.00001496 | ||||
| Withdraw Usdm | 23787171 | 40 days ago | IN | 0 ETH | 0.00000587 | ||||
| Get Reward | 23779569 | 41 days ago | IN | 0 ETH | 0.00018453 | ||||
| Deposit Usdm | 23779563 | 41 days ago | IN | 0 ETH | 0.00016101 | ||||
| Deposit Usdm | 23779543 | 41 days ago | IN | 0 ETH | 0.00020918 | ||||
| Get Reward | 23769567 | 42 days ago | IN | 0 ETH | 0.00015665 | ||||
| Get Reward | 23695199 | 53 days ago | IN | 0 ETH | 0.00010452 | ||||
| Withdraw Usdm | 23695197 | 53 days ago | IN | 0 ETH | 0.00010118 | ||||
| Get Reward | 23695009 | 53 days ago | IN | 0 ETH | 0.0002058 | ||||
| Deposit Usdm | 23673044 | 56 days ago | IN | 0 ETH | 0.00022815 | ||||
| Get Reward | 23644666 | 60 days ago | IN | 0 ETH | 0.0000737 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PegRecoveryModule
Compiler Version
v0.8.15+commit.e14f2714
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.13;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { ICurveMetaPool, ICurvePool } from "../external/CurveInterfaces.sol";
import { IVotiumMerkleStash } from "../external/VotiumInterfaces.sol";
import { RewardPool } from "./RewardPool.sol";
// usdm3crv 0x5B3b5DF2BF2B6543f78e053bD91C4Bdd820929f1
// 3crv 0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7
// zap tx https://etherscan.io/tx/0x4a1c6582675b2582849b3947c63f53e209f320225aa501d0347bb8bae278d365
//BASE_COINS: constant(address[3]) = [
// 0x6B175474E89094C44Da98b954EedeAC495271d0F, # DAI
// 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, # USDC
// 0xdAC17F958D2ee523a2206206994597C13D831ec7, # USDT
//]
contract PegRecoveryModule is RewardPool{
using SafeERC20 for IERC20;
struct BaseCoins {
uint256 dai;
uint256 usdc;
uint256 usdt;
}
// token addresses
IERC20 public immutable usdm; // 0x31d4Eb09a216e181eC8a43ce79226A487D6F0BA9
IERC20 public immutable crv3; // 0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490
IERC20 public immutable dai; // 0x6B175474E89094C44Da98b954EedeAC495271d0F
IERC20 public immutable usdc; // 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
IERC20 public immutable usdt; // 0xdAC17F958D2ee523a2206206994597C13D831ec7
// curve addresses
ICurveMetaPool public immutable usdm3crv; // 0x5B3b5DF2BF2B6543f78e053bD91C4Bdd820929f1
ICurvePool public immutable crv3pool; // 0xbebc44782c7db0a1a60cb6fe97d0b483032ff1c7
// usdm deposit info
uint256 public totalUsdm;
uint256 public usdmProvided;
mapping(address => uint256) public usdmShare;
// 3crv deposit info
uint256 public totalCrv3;
uint256 public crv3Provided;
mapping(address => uint256) public crv3Share;
// reward info
constructor(
IERC20 _usdm,
IERC20 _crv3,
IERC20 _dai,
IERC20 _usdc,
IERC20 _usdt,
ICurveMetaPool _usdm3crv,
ICurvePool _crv3pool,
IERC20 _gcrv,
address _operator
) RewardPool(_operator, _gcrv){
usdm = _usdm;
crv3 = _crv3;
dai = _dai;
usdc = _usdc;
usdt = _usdt;
usdm3crv = _usdm3crv;
crv3pool = _crv3pool;
}
// 3crv section
function deposit3Crv(
uint256 _deposit
) external updateReward(msg.sender) {
totalCrv3 += _deposit;
crv3Share[msg.sender] += _deposit;
crv3.transferFrom(msg.sender, address(this), _deposit);
}
function withdraw3Crv(
uint256 _withdraw
) external updateReward(msg.sender) {
totalCrv3 -= _withdraw;
crv3Share[msg.sender] -= _withdraw;
crv3.transfer(msg.sender, _withdraw);
}
function depositStable(
uint256[3] calldata _deposit,
uint256 _min3crv
) external updateReward(msg.sender){
// convert deposit to 3crv
if(_deposit[0] > 0) {
dai.safeTransferFrom(msg.sender, address(this), _deposit[0]);
dai.safeApprove(address(crv3pool), _deposit[0]);
}
if(_deposit[1] > 0) {
usdc.safeTransferFrom(msg.sender, address(this), _deposit[1]);
usdc.safeApprove(address(crv3pool), _deposit[1]);
}
if(_deposit[2] > 0) {
usdt.safeTransferFrom(msg.sender, address(this), _deposit[2]);
usdt.safeApprove(address(crv3pool), _deposit[2]);
}
// add liquidity to 3pool right away and hold as 3crv
uint256 balance = crv3.balanceOf(address(this));
crv3pool.add_liquidity(
_deposit,
_min3crv
);
// **vague name to use only 1 variable
balance = crv3.balanceOf(address(this)) - balance;
// update storage variables
totalCrv3 += balance;
crv3Share[msg.sender] += balance;
}
function withdrawStable(
uint256[3] calldata _withdraw,
uint256 _3crv_max
) external updateReward(msg.sender) {
// update storage variables
uint256 balance = crv3.balanceOf(address(this));
crv3pool.remove_liquidity_imbalance(
_withdraw,
_3crv_max
);
balance = balance - crv3.balanceOf(address(this));
totalCrv3 -= balance;
crv3Share[msg.sender] -= balance;
if(_withdraw[0] > 0){
dai.safeTransfer(msg.sender, _withdraw[0]);
}
if(_withdraw[1] > 0){
usdc.safeTransfer(msg.sender, _withdraw[1]);
}
if(_withdraw[2] > 0){
usdt.safeTransfer(msg.sender, _withdraw[2]);
}
}
// usdm section
function depositUsdm(
uint256 _usdm
) external updateReward(msg.sender) {
usdmShare[msg.sender] += _usdm;
totalUsdm += _usdm;
usdm.transferFrom(msg.sender, address(this), _usdm);
}
function withdrawUsdm(
uint256 _usdm
) external updateReward(msg.sender){
usdmShare[msg.sender] -= _usdm;
totalUsdm -= _usdm;
usdm.transfer(msg.sender, _usdm);
}
// peg recovery section
function pairLiquidity(uint256 _amount, uint256 _min_liquidity) external onlyOwner {
uint256[2] memory amounts = [_amount, _amount];
usdm.safeApprove(address(usdm3crv), _amount);
crv3.safeApprove(address(usdm3crv), _amount);
usdmProvided += _amount;
crv3Provided += _amount;
usdm3crv.add_liquidity(amounts, _min_liquidity);
}
function removeLiquidity(uint256 _amount, uint256 _max_burn) external onlyOwner {
uint256[2] memory amounts = [_amount, _amount];
usdmProvided -= _amount;
crv3Provided -= _amount;
usdm3crv.remove_liquidity_imbalance(amounts, _max_burn);
}
function sweepTokens() external onlyOwner {
uint256 usdmLeftover = usdm.balanceOf(address(this)) - (totalUsdm - usdmProvided);
usdm.transfer(msg.sender, usdmLeftover);
uint256 crv3Leftover = crv3.balanceOf(address(this)) - (totalCrv3 - crv3Provided);
crv3.transfer(msg.sender, crv3Leftover);
}
// --- votium virtual functions ---
function balanceOf(address _user) public view override returns(uint256) {
return usdmShare[_user] + crv3Share[_user];
}
function totalSupply() public view override returns(uint256) {
return totalUsdm + totalCrv3;
}
function notRecoverableToken(address _token) public view override returns(bool) {
return address(crv3) == _token || address(usdm) == _token || address(rewardsToken) == _token || address(usdm3crv) == _token;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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.1 (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;
}
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.11;
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface ICurveMetaPool is IERC20{
function coins(uint256 index) external view returns(address);
function add_liquidity(uint256[2] calldata _amounts, uint256 _min_mint_amount) external;
function remove_liquidity(uint256 _burning_amount, uint256[2] calldata _min_amounts) external;
function remove_liquidity_imbalance(uint256[2] calldata _amounts, uint256 _maxBurningAmount) external;
}
interface ICurvePool {
function add_liquidity(uint256[3] calldata _amounts, uint256 _min_mint_amount) external;
function remove_liquidity(uint256 _burning_amount, uint256[3] calldata _min_amounts) external;
function remove_liquidity_imbalance(uint256[3] calldata _amounts, uint256 _maxBurningAmount) external;
function remove_liquidity_one_coin(uint256 _3crv_token_amount, int128 i, uint256 _min_amount) external;
function calc_token_amount(uint256[3] calldata _amounts, bool _deposit) external view returns(uint256);
function calc_withdraw_one_coin(uint256 _token_amount, int128 _i) external view returns(uint256);
}
interface ICurveZap {
function remove_liquidity(
address _pool,
uint256 _burn_amount,
uint256[4] calldata _min_amounts,
address _receiver
) external returns(uint256[4] memory);
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.13;
interface IVotiumMerkleStash {
function claim(
address token,
uint256 index,
address account,
uint256 amount,
bytes32[] calldata merkleProof
) external;
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
abstract contract RewardPool is Ownable, ReentrancyGuard, Pausable {
using SafeERC20 for IERC20;
/* ========== STATE VARIABLES ========== */
IERC20 public immutable rewardsToken;
uint256 public periodFinish = 0;
uint256 public rewardRate = 0;
uint256 public rewardsDuration = 14 days;
uint256 public lastUpdateTime;
uint256 public rewardPerTokenStored;
address public rewardsDistribution;
mapping(address => uint256) public userRewardPerTokenPaid;
mapping(address => uint256) public rewards;
/* ========== CONSTRUCTOR ========== */
constructor(
address _operator,
IERC20 _rewardsToken
) {
require(
_operator != address(0),
"invalid reward distribution"
);
require(address(_rewardsToken) != address(0), "invalid reward token");
transferOwnership(_operator);
rewardsToken = _rewardsToken;
rewardsDistribution = _operator;
}
/* ========== VIEWS ========== */
function totalSupply() public view virtual returns (uint256);
function balanceOf(address account) public view virtual returns(uint256);
function notRecoverableToken(address token) public view virtual returns(bool);
function lastTimeRewardApplicable() public view returns (uint256) {
return block.timestamp < periodFinish ? block.timestamp : periodFinish;
}
function rewardPerToken() public view returns (uint256) {
if (totalSupply() == 0) {
return rewardPerTokenStored;
}
return
rewardPerTokenStored +
(((lastTimeRewardApplicable() - lastUpdateTime) *
rewardRate *
1e18) / totalSupply());
}
function earned(address account) public view returns (uint256) {
return
(balanceOf(account) *
(rewardPerToken() - userRewardPerTokenPaid[account])) /
1e18 +
rewards[account];
}
function getRewardForDuration() external view returns (uint256) {
return rewardRate * rewardsDuration;
}
/* ========== MUTATIVE FUNCTIONS ========== */
function getReward() public nonReentrant updateReward(msg.sender) {
uint256 reward = rewards[msg.sender];
if (reward > 0) {
rewards[msg.sender] = 0;
rewardsToken.safeTransfer(msg.sender, reward);
emit RewardPaid(msg.sender, reward);
}
}
/* ========== RESTRICTED FUNCTIONS ========== */
function notifyRewardAmount(uint256 reward)
external
updateReward(address(0))
{
require(msg.sender == rewardsDistribution, "Not rewardsDistribution");
rewardsToken.safeTransferFrom(msg.sender, address(this), reward);
if (block.timestamp >= periodFinish) {
rewardRate = reward / rewardsDuration;
} else {
uint256 remaining = periodFinish - block.timestamp;
uint256 leftover = remaining * rewardRate;
rewardRate = (reward + leftover) / rewardsDuration;
}
lastUpdateTime = block.timestamp;
periodFinish = block.timestamp + rewardsDuration;
emit RewardAdded(reward);
}
// Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
function recoverERC20(address tokenAddress, uint256 tokenAmount)
external
onlyOwner
{
require(!notRecoverableToken(tokenAddress), "cannot withdraw staking token");
IERC20(tokenAddress).safeTransfer(msg.sender, tokenAmount);
emit Recovered(tokenAddress, tokenAmount);
}
function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner {
require(
block.timestamp > periodFinish,
"Previous rewards period must be complete before changing the duration for the new period"
);
rewardsDuration = _rewardsDuration;
emit RewardsDurationUpdated(rewardsDuration);
}
function setRewardsDistribution(address _rewardsDistribution)
external
onlyOwner
{
require(
_rewardsDistribution != address(0),
"invalid reward distribution"
);
rewardsDistribution = _rewardsDistribution;
emit RewardsDistributionUpdated(_rewardsDistribution);
}
/* ========== MODIFIERS ========== */
modifier updateReward(address account) {
rewardPerTokenStored = rewardPerToken();
lastUpdateTime = lastTimeRewardApplicable();
if (account != address(0)) {
rewards[account] = earned(account);
userRewardPerTokenPaid[account] = rewardPerTokenStored;
}
_;
}
/* ========== EVENTS ========== */
event RewardAdded(uint256 reward);
event RewardPaid(address indexed user, uint256 reward);
event RewardsDurationUpdated(uint256 newDuration);
event RewardsDistributionUpdated(address indexed rewardsDistribution);
event Recovered(address token, uint256 amount);
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "none",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"_usdm","type":"address"},{"internalType":"contract IERC20","name":"_crv3","type":"address"},{"internalType":"contract IERC20","name":"_dai","type":"address"},{"internalType":"contract IERC20","name":"_usdc","type":"address"},{"internalType":"contract IERC20","name":"_usdt","type":"address"},{"internalType":"contract ICurveMetaPool","name":"_usdm3crv","type":"address"},{"internalType":"contract ICurvePool","name":"_crv3pool","type":"address"},{"internalType":"contract IERC20","name":"_gcrv","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rewardsDistribution","type":"address"}],"name":"RewardsDistributionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crv3","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crv3Provided","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"crv3Share","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crv3pool","outputs":[{"internalType":"contract ICurvePool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dai","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_deposit","type":"uint256"}],"name":"deposit3Crv","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_deposit","type":"uint256[3]"},{"internalType":"uint256","name":"_min3crv","type":"uint256"}],"name":"depositStable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_usdm","type":"uint256"}],"name":"depositUsdm","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"notRecoverableToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_min_liquidity","type":"uint256"}],"name":"pairLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_max_burn","type":"uint256"}],"name":"removeLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"}],"name":"setRewardsDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardsDuration","type":"uint256"}],"name":"setRewardsDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sweepTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalCrv3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUsdm","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":"usdc","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdm","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdm3crv","outputs":[{"internalType":"contract ICurveMetaPool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdmProvided","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usdmShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdt","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_withdraw","type":"uint256"}],"name":"withdraw3Crv","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_withdraw","type":"uint256[3]"},{"internalType":"uint256","name":"_3crv_max","type":"uint256"}],"name":"withdrawStable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_usdm","type":"uint256"}],"name":"withdrawUsdm","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
61018060405260006003556000600455621275006005553480156200002357600080fd5b5060405162002a9338038062002a938339810160408190526200004691620002af565b8082620000533362000178565b600180556002805460ff191690556001600160a01b038216620000bd5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c69642072657761726420646973747269627574696f6e000000000060448201526064015b60405180910390fd5b6001600160a01b038116620001155760405162461bcd60e51b815260206004820152601460248201527f696e76616c69642072657761726420746f6b656e0000000000000000000000006044820152606401620000b4565b6200012082620001c8565b6001600160a01b03908116608052600880546001600160a01b0319169282169290921790915598891660a052505094861660c05292851660e05290841661010052831661012052821661014052166101605262000386565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b03163314620002245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620000b4565b6001600160a01b0381166200028b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620000b4565b620002968162000178565b50565b6001600160a01b03811681146200029657600080fd5b60008060008060008060008060006101208a8c031215620002cf57600080fd5b8951620002dc8162000299565b60208b0151909950620002ef8162000299565b60408b0151909850620003028162000299565b60608b0151909750620003158162000299565b60808b0151909650620003288162000299565b60a08b01519095506200033b8162000299565b60c08b01519094506200034e8162000299565b60e08b0151909350620003618162000299565b6101008b0151909250620003758162000299565b809150509295985092959850929598565b60805160a05160c05160e0516101005161012051610140516101605161259d620004f66000396000818161044701528181610a0d01528181611534015281816115cc01528181611667015261173501526000818161058f015281816118ff01528181611a2501528181611d2001528181611d740152611de001526000818161035b01528181610bda0152818161160c01526116450152600081816103e301528181610b980152818161157101526115aa01526000818161064f01528181610b59015281816114dc015261151201526000818161046e015281816108920152818161098001528181610a8901528181611106015281816112c701528181611363015281816116a8015281816117b40152818161197b0152611d5201526000818161061501528181610fa20152818161118e0152818161122a015281816119b601528181611c7c0152611cfe0152600081816105b601528181610cce01528181610e8101526119f2015261259d6000f3fe608060405234801561001057600080fd5b50600436106102935760003560e01c80637b0a47ee11610167578063cc1a378f116100ce578063df136d6511610087578063df136d65146105eb578063e85809a6146105f4578063ebe2b12b14610607578063ee138d0f14610610578063f2fde38b14610637578063f4b9fa751461064a57600080fd5b8063cc1a378f14610566578063cca99dea14610579578063cd3daf9d14610582578063d05a236d1461058a578063d1af0c7d146105b1578063da977ec9146105d857600080fd5b80638da5cb5b116101205780638da5cb5b1461050a5780638ea1e9a41461051b5780639d7de6b31461052e578063b3cf99ef14610541578063c2ba40051461054a578063c8f33c911461055d57600080fd5b80637b0a47ee146104ab57806380faa57d146104b4578063874fde0d146104bc5780638925dbcc146104cf5780638980f11f146104d75780638b876347146104ea57600080fd5b8063386a95251161020b57806356ba3feb116101c457806356ba3feb146104185780635c975abb1461042b5780636b21d905146104425780636dca5abe1461046957806370a0823114610490578063715018a6146104a357600080fd5b8063386a9525146103b15780633c6b16ab146103ba5780633d18b912146103cd5780633e399530146103d55780633e413bee146103de5780633fc6df6e1461040557600080fd5b8063197621431161025d57806319762143146103265780631c1f78eb1461033b57806324a636f2146103435780632f48ab7d1461035657806331779c0214610395578063327127881461039e57600080fd5b80628cc26214610298578062f0434c146102be5780630700037d146102de57806315b1f7a5146102fe57806318160ddd1461031e575b600080fd5b6102ab6102a6366004612323565b610671565b6040519081526020015b60405180910390f35b6102ab6102cc366004612323565b60106020526000908152604090205481565b6102ab6102ec366004612323565b600a6020526000908152604090205481565b6102ab61030c366004612323565b600d6020526000908152604090205481565b6102ab6106de565b610339610334366004612323565b6106f5565b005b6102ab6107c8565b61033961035136600461233e565b6107da565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016102b5565b6102ab600f5481565b6103396103ac366004612357565b61090d565b6102ab60055481565b6103396103c836600461233e565b610c0b565b610339610da3565b6102ab600e5481565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b60085461037d906001600160a01b031681565b61033961042636600461233e565b610eee565b60025460ff165b60405190151581526020016102b5565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b6102ab61049e366004612323565b610fd9565b610339611007565b6102ab60045481565b6102ab61103d565b6103396104ca36600461233e565b611054565b61033961113d565b6103396104e5366004612385565b61139a565b6102ab6104f8366004612323565b60096020526000908152604090205481565b6000546001600160a01b031661037d565b610339610529366004612357565b61146d565b61033961053c3660046123af565b611875565b6102ab600c5481565b610432610558366004612323565b61196d565b6102ab60065481565b61033961057436600461233e565b611a55565b6102ab600b5481565b6102ab611b57565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b6103396105e636600461233e565b611bc2565b6102ab60075481565b6103396106023660046123af565b611cb3565b6102ab60035481565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b610339610645366004612323565b611e17565b61037d7f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b0381166000908152600a60209081526040808320546009909252822054670de0b6b3a7640000906106a7611b57565b6106b191906123e7565b6106ba85610fd9565b6106c491906123fe565b6106ce919061241d565b6106d8919061243f565b92915050565b6000600e54600b546106f0919061243f565b905090565b6000546001600160a01b031633146107285760405162461bcd60e51b815260040161071f90612457565b60405180910390fd5b6001600160a01b03811661077e5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c69642072657761726420646973747269627574696f6e0000000000604482015260640161071f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f1c794a043683a294127c95bc365bae91b63b651eb9884a2c9120afee2bb690b490600090a250565b60006005546004546106f091906123fe565b336107e3611b57565b6007556107ee61103d565b6006556001600160a01b038116156108355761080981610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b81600e6000828254610847919061243f565b9091555050336000908152601060205260408120805484929061086b90849061243f565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064015b6020604051808303816000875af11580156108e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610908919061248c565b505050565b33610916611b57565b60075561092161103d565b6006556001600160a01b038116156109685761093c81610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156109cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f391906124ae565b6040516327f6ba8360e21b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639fdaea0c90610a4490879087906004016124c7565b600060405180830381600087803b158015610a5e57600080fd5b505af1158015610a72573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031692506370a082319150602401602060405180830381865afa158015610ada573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afe91906124ae565b610b0890826123e7565b905080600e6000828254610b1c91906123e7565b90915550503360009081526010602052604081208054839290610b409084906123e7565b9091555050833515610b8157610b816001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016338635611eb2565b602084013515610bc357610bc36001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336020870135611eb2565b604084013515610c0557610c056001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016336040870135611eb2565b50505050565b6000610c15611b57565b600755610c2061103d565b6006556001600160a01b03811615610c6757610c3b81610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b6008546001600160a01b03163314610cc15760405162461bcd60e51b815260206004820152601760248201527f4e6f742072657761726473446973747269627574696f6e000000000000000000604482015260640161071f565b610cf66001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085611f15565b6003544210610d1457600554610d0c908361241d565b600455610d56565b600042600354610d2491906123e7565b9050600060045482610d3691906123fe565b600554909150610d46828661243f565b610d50919061241d565b60045550505b426006819055600554610d689161243f565b6003556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020015b60405180910390a15050565b600260015403610df55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161071f565b600260015533610e03611b57565b600755610e0e61103d565b6006556001600160a01b03811615610e5557610e2981610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b336000908152600a60205260409020548015610ee657336000818152600a6020526040812055610eb0907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083611eb2565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b505060018055565b33610ef7611b57565b600755610f0261103d565b6006556001600160a01b03811615610f4957610f1d81610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b336000908152600d602052604081208054849290610f689084906123e7565b9250508190555081600b6000828254610f8191906123e7565b909155505060405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016108c5565b6001600160a01b038116600090815260106020908152604080832054600d9092528220546106d8919061243f565b6000546001600160a01b031633146110315760405162461bcd60e51b815260040161071f90612457565b61103b6000611f4d565b565b6000600354421061104f575060035490565b504290565b3361105d611b57565b60075561106861103d565b6006556001600160a01b038116156110af5761108381610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b81600e60008282546110c191906123e7565b909155505033600090815260106020526040812080548492906110e59084906123e7565b909155505060405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016108c5565b6000546001600160a01b031633146111675760405162461bcd60e51b815260040161071f90612457565b6000600c54600b5461117991906123e7565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156111dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120191906124ae565b61120b91906123e7565b60405163a9059cbb60e01b8152336004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561127b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129f919061248c565b506000600f54600e546112b291906123e7565b6040516370a0823160e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133a91906124ae565b61134491906123e7565b60405163a9059cbb60e01b8152336004820152602481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016108c5565b6000546001600160a01b031633146113c45760405162461bcd60e51b815260040161071f90612457565b6113cd8261196d565b1561141a5760405162461bcd60e51b815260206004820152601d60248201527f63616e6e6f74207769746864726177207374616b696e6720746f6b656e000000604482015260640161071f565b61142e6001600160a01b0383163383611eb2565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa289101610d97565b33611476611b57565b60075561148161103d565b6006556001600160a01b038116156114c85761149c81610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b82351561155a576115056001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308635611f15565b61155a6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000008535611f9d565b6020830135156115f55761159d6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306020870135611f15565b6115f56001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006020860135611f9d565b604083013515611690576116386001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633306040870135611f15565b6116906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000006040860135611f9d565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156116f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171b91906124ae565b604051634515cef360e01b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690634515cef39061176c90879087906004016124c7565b600060405180830381600087803b15801561178657600080fd5b505af115801561179a573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201528392507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a0823190602401602060405180830381865afa158015611804573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182891906124ae565b61183291906123e7565b905080600e6000828254611846919061243f565b9091555050336000908152601060205260408120805483929061186a90849061243f565b909155505050505050565b6000546001600160a01b0316331461189f5760405162461bcd60e51b815260040161071f90612457565b6000604051806040016040528084815260200184815250905082600c60008282546118ca91906123e7565b9250508190555082600f60008282546118e391906123e7565b909155505060405163e310327360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e31032739061193690849086906004016124dd565b600060405180830381600087803b15801561195057600080fd5b505af1158015611964573d6000803e3d6000fd5b50505050505050565b6000816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614806119e05750816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316145b80611a1c5750816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316145b806106d85750507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0390811691161490565b6000546001600160a01b03163314611a7f5760405162461bcd60e51b815260040161071f90612457565b6003544211611b1c5760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e67207468652064757260648201527f6174696f6e20666f7220746865206e657720706572696f640000000000000000608482015260a40161071f565b60058190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39060200160405180910390a150565b6000611b616106de565b600003611b6f575060075490565b611b776106de565b600454600654611b8561103d565b611b8f91906123e7565b611b9991906123fe565b611bab90670de0b6b3a76400006123fe565b611bb5919061241d565b6007546106f0919061243f565b33611bcb611b57565b600755611bd661103d565b6006556001600160a01b03811615611c1d57611bf181610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b336000908152600d602052604081208054849290611c3c90849061243f565b9250508190555081600b6000828254611c55919061243f565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016108c5565b6000546001600160a01b03163314611cdd5760405162461bcd60e51b815260040161071f90612457565b6040805180820190915282815260208101839052611d456001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000085611f9d565b611d996001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000085611f9d565b82600c6000828254611dab919061243f565b9250508190555082600f6000828254611dc4919061243f565b9091555050604051630b4c7e4d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690630b4c7e4d9061193690849086906004016124dd565b6000546001600160a01b03163314611e415760405162461bcd60e51b815260040161071f90612457565b6001600160a01b038116611ea65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161071f565b611eaf81611f4d565b50565b6040516001600160a01b03831660248201526044810182905261090890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526120b2565b6040516001600160a01b0380851660248301528316604482015260648101829052610c059085906323b872dd60e01b90608401611ede565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8015806120175750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611ff1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201591906124ae565b155b6120825760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161071f565b6040516001600160a01b03831660248201526044810182905261090890849063095ea7b360e01b90606401611ede565b6000612107826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121849092919063ffffffff16565b8051909150156109085780806020019051810190612125919061248c565b6109085760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161071f565b6060612193848460008561219d565b90505b9392505050565b6060824710156121fe5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161071f565b6001600160a01b0385163b6122555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161071f565b600080866001600160a01b031685876040516122719190612541565b60006040518083038185875af1925050503d80600081146122ae576040519150601f19603f3d011682016040523d82523d6000602084013e6122b3565b606091505b50915091506122c38282866122ce565b979650505050505050565b606083156122dd575081612196565b8251156122ed5782518084602001fd5b8160405162461bcd60e51b815260040161071f919061255d565b80356001600160a01b038116811461231e57600080fd5b919050565b60006020828403121561233557600080fd5b61219682612307565b60006020828403121561235057600080fd5b5035919050565b6000806080838503121561236a57600080fd5b606083018481111561237b57600080fd5b9294923593505050565b6000806040838503121561239857600080fd5b6123a183612307565b946020939093013593505050565b600080604083850312156123c257600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b6000828210156123f9576123f96123d1565b500390565b6000816000190483118215151615612418576124186123d1565b500290565b60008261243a57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612452576124526123d1565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561249e57600080fd5b8151801515811461219657600080fd5b6000602082840312156124c057600080fd5b5051919050565b6080810160608483378260608301529392505050565b60608101818460005b60028110156125055781518352602092830192909101906001016124e6565b5050508260408301529392505050565b60005b83811015612530578181015183820152602001612518565b83811115610c055750506000910152565b60008251612553818460208701612515565b9190910192915050565b602081526000825180602084015261257c816040850160208701612515565b601f01601f1916919091016040019291505056fea164736f6c634300080f000a00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba90000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4900000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f1000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c700000000000000000000000006f05a658b88d6d324d84a5da13d549ea06c9ad6000000000000000000000000597f540bb63381ffa267027d2d479984825057a8
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102935760003560e01c80637b0a47ee11610167578063cc1a378f116100ce578063df136d6511610087578063df136d65146105eb578063e85809a6146105f4578063ebe2b12b14610607578063ee138d0f14610610578063f2fde38b14610637578063f4b9fa751461064a57600080fd5b8063cc1a378f14610566578063cca99dea14610579578063cd3daf9d14610582578063d05a236d1461058a578063d1af0c7d146105b1578063da977ec9146105d857600080fd5b80638da5cb5b116101205780638da5cb5b1461050a5780638ea1e9a41461051b5780639d7de6b31461052e578063b3cf99ef14610541578063c2ba40051461054a578063c8f33c911461055d57600080fd5b80637b0a47ee146104ab57806380faa57d146104b4578063874fde0d146104bc5780638925dbcc146104cf5780638980f11f146104d75780638b876347146104ea57600080fd5b8063386a95251161020b57806356ba3feb116101c457806356ba3feb146104185780635c975abb1461042b5780636b21d905146104425780636dca5abe1461046957806370a0823114610490578063715018a6146104a357600080fd5b8063386a9525146103b15780633c6b16ab146103ba5780633d18b912146103cd5780633e399530146103d55780633e413bee146103de5780633fc6df6e1461040557600080fd5b8063197621431161025d57806319762143146103265780631c1f78eb1461033b57806324a636f2146103435780632f48ab7d1461035657806331779c0214610395578063327127881461039e57600080fd5b80628cc26214610298578062f0434c146102be5780630700037d146102de57806315b1f7a5146102fe57806318160ddd1461031e575b600080fd5b6102ab6102a6366004612323565b610671565b6040519081526020015b60405180910390f35b6102ab6102cc366004612323565b60106020526000908152604090205481565b6102ab6102ec366004612323565b600a6020526000908152604090205481565b6102ab61030c366004612323565b600d6020526000908152604090205481565b6102ab6106de565b610339610334366004612323565b6106f5565b005b6102ab6107c8565b61033961035136600461233e565b6107da565b61037d7f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781565b6040516001600160a01b0390911681526020016102b5565b6102ab600f5481565b6103396103ac366004612357565b61090d565b6102ab60055481565b6103396103c836600461233e565b610c0b565b610339610da3565b6102ab600e5481565b61037d7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b60085461037d906001600160a01b031681565b61033961042636600461233e565b610eee565b60025460ff165b60405190151581526020016102b5565b61037d7f000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c781565b61037d7f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e49081565b6102ab61049e366004612323565b610fd9565b610339611007565b6102ab60045481565b6102ab61103d565b6103396104ca36600461233e565b611054565b61033961113d565b6103396104e5366004612385565b61139a565b6102ab6104f8366004612323565b60096020526000908152604090205481565b6000546001600160a01b031661037d565b610339610529366004612357565b61146d565b61033961053c3660046123af565b611875565b6102ab600c5481565b610432610558366004612323565b61196d565b6102ab60065481565b61033961057436600461233e565b611a55565b6102ab600b5481565b6102ab611b57565b61037d7f0000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f181565b61037d7f00000000000000000000000006f05a658b88d6d324d84a5da13d549ea06c9ad681565b6103396105e636600461233e565b611bc2565b6102ab60075481565b6103396106023660046123af565b611cb3565b6102ab60035481565b61037d7f00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba981565b610339610645366004612323565b611e17565b61037d7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b6001600160a01b0381166000908152600a60209081526040808320546009909252822054670de0b6b3a7640000906106a7611b57565b6106b191906123e7565b6106ba85610fd9565b6106c491906123fe565b6106ce919061241d565b6106d8919061243f565b92915050565b6000600e54600b546106f0919061243f565b905090565b6000546001600160a01b031633146107285760405162461bcd60e51b815260040161071f90612457565b60405180910390fd5b6001600160a01b03811661077e5760405162461bcd60e51b815260206004820152601b60248201527f696e76616c69642072657761726420646973747269627574696f6e0000000000604482015260640161071f565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f1c794a043683a294127c95bc365bae91b63b651eb9884a2c9120afee2bb690b490600090a250565b60006005546004546106f091906123fe565b336107e3611b57565b6007556107ee61103d565b6006556001600160a01b038116156108355761080981610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b81600e6000828254610847919061243f565b9091555050336000908152601060205260408120805484929061086b90849061243f565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b0316906323b872dd906064015b6020604051808303816000875af11580156108e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610908919061248c565b505050565b33610916611b57565b60075561092161103d565b6006556001600160a01b038116156109685761093c81610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b6040516370a0823160e01b81523060048201526000907f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b0316906370a0823190602401602060405180830381865afa1580156109cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f391906124ae565b6040516327f6ba8360e21b81529091506001600160a01b037f000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c71690639fdaea0c90610a4490879087906004016124c7565b600060405180830381600087803b158015610a5e57600080fd5b505af1158015610a72573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201527f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b031692506370a082319150602401602060405180830381865afa158015610ada573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afe91906124ae565b610b0890826123e7565b905080600e6000828254610b1c91906123e7565b90915550503360009081526010602052604081208054839290610b409084906123e7565b9091555050833515610b8157610b816001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16338635611eb2565b602084013515610bc357610bc36001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816336020870135611eb2565b604084013515610c0557610c056001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec716336040870135611eb2565b50505050565b6000610c15611b57565b600755610c2061103d565b6006556001600160a01b03811615610c6757610c3b81610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b6008546001600160a01b03163314610cc15760405162461bcd60e51b815260206004820152601760248201527f4e6f742072657761726473446973747269627574696f6e000000000000000000604482015260640161071f565b610cf66001600160a01b037f00000000000000000000000006f05a658b88d6d324d84a5da13d549ea06c9ad616333085611f15565b6003544210610d1457600554610d0c908361241d565b600455610d56565b600042600354610d2491906123e7565b9050600060045482610d3691906123fe565b600554909150610d46828661243f565b610d50919061241d565b60045550505b426006819055600554610d689161243f565b6003556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d906020015b60405180910390a15050565b600260015403610df55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161071f565b600260015533610e03611b57565b600755610e0e61103d565b6006556001600160a01b03811615610e5557610e2981610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b336000908152600a60205260409020548015610ee657336000818152600a6020526040812055610eb0907f00000000000000000000000006f05a658b88d6d324d84a5da13d549ea06c9ad66001600160a01b03169083611eb2565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b505060018055565b33610ef7611b57565b600755610f0261103d565b6006556001600160a01b03811615610f4957610f1d81610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b336000908152600d602052604081208054849290610f689084906123e7565b9250508190555081600b6000828254610f8191906123e7565b909155505060405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba96001600160a01b03169063a9059cbb906044016108c5565b6001600160a01b038116600090815260106020908152604080832054600d9092528220546106d8919061243f565b6000546001600160a01b031633146110315760405162461bcd60e51b815260040161071f90612457565b61103b6000611f4d565b565b6000600354421061104f575060035490565b504290565b3361105d611b57565b60075561106861103d565b6006556001600160a01b038116156110af5761108381610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b81600e60008282546110c191906123e7565b909155505033600090815260106020526040812080548492906110e59084906123e7565b909155505060405163a9059cbb60e01b8152336004820152602481018390527f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b03169063a9059cbb906044016108c5565b6000546001600160a01b031633146111675760405162461bcd60e51b815260040161071f90612457565b6000600c54600b5461117991906123e7565b6040516370a0823160e01b81523060048201527f00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba96001600160a01b0316906370a0823190602401602060405180830381865afa1580156111dd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120191906124ae565b61120b91906123e7565b60405163a9059cbb60e01b8152336004820152602481018290529091507f00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba96001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561127b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129f919061248c565b506000600f54600e546112b291906123e7565b6040516370a0823160e01b81523060048201527f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b0316906370a0823190602401602060405180830381865afa158015611316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133a91906124ae565b61134491906123e7565b60405163a9059cbb60e01b8152336004820152602481018290529091507f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b03169063a9059cbb906044016108c5565b6000546001600160a01b031633146113c45760405162461bcd60e51b815260040161071f90612457565b6113cd8261196d565b1561141a5760405162461bcd60e51b815260206004820152601d60248201527f63616e6e6f74207769746864726177207374616b696e6720746f6b656e000000604482015260640161071f565b61142e6001600160a01b0383163383611eb2565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa289101610d97565b33611476611b57565b60075561148161103d565b6006556001600160a01b038116156114c85761149c81610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b82351561155a576115056001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f1633308635611f15565b61155a6001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f167f000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c78535611f9d565b6020830135156115f55761159d6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481633306020870135611f15565b6115f56001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48167f000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c76020860135611f9d565b604083013515611690576116386001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec71633306040870135611f15565b6116906001600160a01b037f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7167f000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c76040860135611f9d565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b0316906370a0823190602401602060405180830381865afa1580156116f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171b91906124ae565b604051634515cef360e01b81529091506001600160a01b037f000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c71690634515cef39061176c90879087906004016124c7565b600060405180830381600087803b15801561178657600080fd5b505af115801561179a573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201528392507f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b031691506370a0823190602401602060405180830381865afa158015611804573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182891906124ae565b61183291906123e7565b905080600e6000828254611846919061243f565b9091555050336000908152601060205260408120805483929061186a90849061243f565b909155505050505050565b6000546001600160a01b0316331461189f5760405162461bcd60e51b815260040161071f90612457565b6000604051806040016040528084815260200184815250905082600c60008282546118ca91906123e7565b9250508190555082600f60008282546118e391906123e7565b909155505060405163e310327360e01b81526001600160a01b037f0000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f1169063e31032739061193690849086906004016124dd565b600060405180830381600087803b15801561195057600080fd5b505af1158015611964573d6000803e3d6000fd5b50505050505050565b6000816001600160a01b03167f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4906001600160a01b031614806119e05750816001600160a01b03167f00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba96001600160a01b0316145b80611a1c5750816001600160a01b03167f00000000000000000000000006f05a658b88d6d324d84a5da13d549ea06c9ad66001600160a01b0316145b806106d85750507f0000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f16001600160a01b0390811691161490565b6000546001600160a01b03163314611a7f5760405162461bcd60e51b815260040161071f90612457565b6003544211611b1c5760405162461bcd60e51b815260206004820152605860248201527f50726576696f7573207265776172647320706572696f64206d7573742062652060448201527f636f6d706c657465206265666f7265206368616e67696e67207468652064757260648201527f6174696f6e20666f7220746865206e657720706572696f640000000000000000608482015260a40161071f565b60058190556040518181527ffb46ca5a5e06d4540d6387b930a7c978bce0db5f449ec6b3f5d07c6e1d44f2d39060200160405180910390a150565b6000611b616106de565b600003611b6f575060075490565b611b776106de565b600454600654611b8561103d565b611b8f91906123e7565b611b9991906123fe565b611bab90670de0b6b3a76400006123fe565b611bb5919061241d565b6007546106f0919061243f565b33611bcb611b57565b600755611bd661103d565b6006556001600160a01b03811615611c1d57611bf181610671565b6001600160a01b0382166000908152600a60209081526040808320939093556007546009909152919020555b336000908152600d602052604081208054849290611c3c90849061243f565b9250508190555081600b6000828254611c55919061243f565b90915550506040516323b872dd60e01b8152336004820152306024820152604481018390527f00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba96001600160a01b0316906323b872dd906064016108c5565b6000546001600160a01b03163314611cdd5760405162461bcd60e51b815260040161071f90612457565b6040805180820190915282815260208101839052611d456001600160a01b037f00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba9167f0000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f185611f9d565b611d996001600160a01b037f0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e490167f0000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f185611f9d565b82600c6000828254611dab919061243f565b9250508190555082600f6000828254611dc4919061243f565b9091555050604051630b4c7e4d60e01b81526001600160a01b037f0000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f11690630b4c7e4d9061193690849086906004016124dd565b6000546001600160a01b03163314611e415760405162461bcd60e51b815260040161071f90612457565b6001600160a01b038116611ea65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161071f565b611eaf81611f4d565b50565b6040516001600160a01b03831660248201526044810182905261090890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526120b2565b6040516001600160a01b0380851660248301528316604482015260648101829052610c059085906323b872dd60e01b90608401611ede565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8015806120175750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611ff1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201591906124ae565b155b6120825760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606482015260840161071f565b6040516001600160a01b03831660248201526044810182905261090890849063095ea7b360e01b90606401611ede565b6000612107826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121849092919063ffffffff16565b8051909150156109085780806020019051810190612125919061248c565b6109085760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161071f565b6060612193848460008561219d565b90505b9392505050565b6060824710156121fe5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161071f565b6001600160a01b0385163b6122555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161071f565b600080866001600160a01b031685876040516122719190612541565b60006040518083038185875af1925050503d80600081146122ae576040519150601f19603f3d011682016040523d82523d6000602084013e6122b3565b606091505b50915091506122c38282866122ce565b979650505050505050565b606083156122dd575081612196565b8251156122ed5782518084602001fd5b8160405162461bcd60e51b815260040161071f919061255d565b80356001600160a01b038116811461231e57600080fd5b919050565b60006020828403121561233557600080fd5b61219682612307565b60006020828403121561235057600080fd5b5035919050565b6000806080838503121561236a57600080fd5b606083018481111561237b57600080fd5b9294923593505050565b6000806040838503121561239857600080fd5b6123a183612307565b946020939093013593505050565b600080604083850312156123c257600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b6000828210156123f9576123f96123d1565b500390565b6000816000190483118215151615612418576124186123d1565b500290565b60008261243a57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612452576124526123d1565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561249e57600080fd5b8151801515811461219657600080fd5b6000602082840312156124c057600080fd5b5051919050565b6080810160608483378260608301529392505050565b60608101818460005b60028110156125055781518352602092830192909101906001016124e6565b5050508260408301529392505050565b60005b83811015612530578181015183820152602001612518565b83811115610c055750506000910152565b60008251612553818460208701612515565b9190910192915050565b602081526000825180602084015261257c816040850160208701612515565b601f01601f1916919091016040019291505056fea164736f6c634300080f000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba90000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e4900000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f1000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c700000000000000000000000006f05a658b88d6d324d84a5da13d549ea06c9ad6000000000000000000000000597f540bb63381ffa267027d2d479984825057a8
-----Decoded View---------------
Arg [0] : _usdm (address): 0x31d4Eb09a216e181eC8a43ce79226A487D6F0BA9
Arg [1] : _crv3 (address): 0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490
Arg [2] : _dai (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F
Arg [3] : _usdc (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [4] : _usdt (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [5] : _usdm3crv (address): 0x5B3b5DF2BF2B6543f78e053bD91C4Bdd820929f1
Arg [6] : _crv3pool (address): 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7
Arg [7] : _gcrv (address): 0x06f05a658b88D6d324d84A5DA13D549eA06c9Ad6
Arg [8] : _operator (address): 0x597F540bB63381FfA267027D2D479984825057A8
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000031d4eb09a216e181ec8a43ce79226a487d6f0ba9
Arg [1] : 0000000000000000000000006c3f90f043a72fa612cbac8115ee7e52bde6e490
Arg [2] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Arg [3] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [4] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [5] : 0000000000000000000000005b3b5df2bf2b6543f78e053bd91c4bdd820929f1
Arg [6] : 000000000000000000000000bebc44782c7db0a1a60cb6fe97d0b483032ff1c7
Arg [7] : 00000000000000000000000006f05a658b88d6d324d84a5da13d549ea06c9ad6
Arg [8] : 000000000000000000000000597f540bb63381ffa267027d2d479984825057a8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $1.04 | 10 | $10.4 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.