Source Code
Latest 25 from a total of 85 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Harvest | 15431826 | 366 days ago | IN | 0 FRAX | 0.00000061 | ||||
| Harvest | 14004142 | 399 days ago | IN | 0 FRAX | 0.00000155 | ||||
| Harvest | 13784394 | 404 days ago | IN | 0 FRAX | 0.00000299 | ||||
| Harvest | 13447268 | 412 days ago | IN | 0 FRAX | 0.00000286 | ||||
| Harvest | 13260824 | 417 days ago | IN | 0 FRAX | 0.00000418 | ||||
| Harvest | 11897336 | 448 days ago | IN | 0 FRAX | 0.00000131 | ||||
| Harvest | 11856288 | 449 days ago | IN | 0 FRAX | 0.00000128 | ||||
| Harvest | 11725256 | 452 days ago | IN | 0 FRAX | 0.00000189 | ||||
| Harvest | 11597519 | 455 days ago | IN | 0 FRAX | 0.00000129 | ||||
| Harvest | 11415264 | 459 days ago | IN | 0 FRAX | 0.00000145 | ||||
| Harvest | 11244968 | 463 days ago | IN | 0 FRAX | 0.00000187 | ||||
| Harvest | 11167910 | 465 days ago | IN | 0 FRAX | 0.00000193 | ||||
| Harvest | 10939735 | 470 days ago | IN | 0 FRAX | 0.00000179 | ||||
| Harvest | 10904337 | 471 days ago | IN | 0 FRAX | 0.00000247 | ||||
| Harvest | 10687549 | 476 days ago | IN | 0 FRAX | 0.00000131 | ||||
| Harvest | 10519127 | 480 days ago | IN | 0 FRAX | 0.00000153 | ||||
| Harvest | 10426806 | 482 days ago | IN | 0 FRAX | 0.00000202 | ||||
| Harvest | 10203697 | 487 days ago | IN | 0 FRAX | 0.00000222 | ||||
| Harvest | 9996352 | 492 days ago | IN | 0 FRAX | 0.0000015 | ||||
| Harvest | 9515802 | 503 days ago | IN | 0 FRAX | 0.00000116 | ||||
| Harvest | 9255745 | 509 days ago | IN | 0 FRAX | 0.00000115 | ||||
| Harvest | 9222347 | 510 days ago | IN | 0 FRAX | 0.0000011 | ||||
| Harvest | 9131571 | 512 days ago | IN | 0 FRAX | 0.00000112 | ||||
| Harvest | 9038970 | 514 days ago | IN | 0 FRAX | 0.00000114 | ||||
| Harvest | 8907561 | 517 days ago | IN | 0 FRAX | 0.00000113 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ConvexTriFxsStrategy
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;
// SPDX-License-Identifier: UNLICENSED
/*
* @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 GSN 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 payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
/**
* @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);
}
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}
/**
* @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 guidelines: functions revert instead
* of 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 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual 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 {_setupDecimals} is
* called.
*
* 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 returns (uint8) {
return _decimals;
}
/**
* @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);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
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].add(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) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is 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);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(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:
*
* - `to` 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 = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(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);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(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 Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal virtual {
_decimals = decimals_;
}
/**
* @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 to 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 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;
// solhint-disable-next-line no-inline-assembly
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");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(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");
// solhint-disable-next-line avoid-low-level-calls
(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");
// solhint-disable-next-line avoid-low-level-calls
(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");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
/**
* @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 SafeMath for uint256;
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'
// solhint-disable-next-line max-line-length
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).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_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
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
/**
* @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 () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), 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 {
emit OwnershipTransferred(_owner, address(0));
_owner = 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");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
/**
* @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 () internal {
_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 make 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;
}
}
interface IStrategy {
//Returns the token sent to the fee dist contract, which is used to calculate the amount of ADDY to mint when claiming rewards
function getFeeDistToken() external view returns (address);
//Returns the harvested token, which is not guaranteed to be the fee dist token
function getHarvestedToken() external view returns (address);
function lastHarvestTime() external view returns (uint256);
function rewards() external view returns (address);
function want() external view returns (address);
function deposit() external;
function withdrawForSwap(uint256) external returns (uint256);
function withdraw(uint256) external;
function balanceOf() external view returns (uint256);
function getHarvestable() external view returns (uint256);
function harvest() external;
function setJar(address _jar) external;
}
//A Jar is a contract that users deposit funds into.
//Jar contracts are paired with a strategy contract that interacts with the pool being farmed.
interface IJar {
function token() external view returns (IERC20);
function getRatio() external view returns (uint256);
function balance() external view returns (uint256);
function balanceOf(address _user) external view returns (uint256);
function depositAll() external;
function deposit(uint256) external;
//function depositFor(address user, uint256 amount) external;
function withdrawAll() external;
//function withdraw(uint256) external;
//function earn() external;
function strategy() external view returns (address);
//function decimals() external view returns (uint8);
//function getLastTimeRestaked(address _address) external view returns (uint256);
//function notifyReward(address _reward, uint256 _amount) external;
//function getPendingReward(address _user) external view returns (uint256);
}
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
interface IUniswapRouterV2 {
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (
uint256 amountA,
uint256 amountB,
uint256 liquidity
);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
}
abstract contract BaseStrategy is IStrategy, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
uint256 public override lastHarvestTime = 0;
// Tokens
address public override want; //The token being staked.
address internal harvestedToken; //The token we harvest. If the reward pool emits multiple tokens, they should be converted to a single token.
// Contracts
address public override rewards; //The staking rewards/MasterChef contract
address public strategist; //The address the performance fee is sent to
address public multiHarvest; //0x3355743Db830Ed30FF4089DB8b18DEeb683F8546; //The multi harvest contract
address public jar; //The vault/jar contract
// Dex
address public currentRouter; //0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff; //Quickswap router
constructor(
address _want,
address _strategist,
address _harvestedToken,
address _currentRouter,
address _rewards
) public {
require(_want != address(0));
require(_strategist != address(0));
require(_harvestedToken != address(0));
require(_currentRouter != address(0));
require(_rewards != address(0));
want = _want;
strategist = _strategist;
harvestedToken = _harvestedToken;
currentRouter = _currentRouter;
rewards = _rewards;
}
// **** Modifiers **** //
//prevent unauthorized smart contracts from calling harvest()
modifier onlyHumanOrWhitelisted {
require(msg.sender == tx.origin || msg.sender == owner() || msg.sender == multiHarvest || msg.sender == jar, "not authorized");
_;
}
// **** Views **** //
function balanceOfWant() public view returns (uint256) {
return IERC20(want).balanceOf(address(this));
}
function balanceOfPool() public virtual view returns (uint256);
function balanceOf() public override view returns (uint256) {
return balanceOfWant().add(balanceOfPool());
}
function getHarvestedToken() public override view returns (address) {
return harvestedToken;
}
// **** Setters **** //
function setJar(address _jar) external override onlyOwner {
require(jar == address(0), "jar already set");
require(IJar(_jar).strategy() == address(this), "incorrect jar");
jar = _jar;
emit SetJar(_jar);
}
function setMultiHarvest(address _address) external onlyOwner {
require(_address != address(0));
multiHarvest = _address;
}
// **** State mutations **** //
function deposit() public override virtual;
// Withdraw partial funds, normally used with a jar withdrawal
function withdraw(uint256 _amount) external override {
require(msg.sender == jar, "!jar");
uint256 _balance = IERC20(want).balanceOf(address(this));
if (_balance < _amount) {
_amount = _withdrawSome(_amount.sub(_balance));
_amount = _amount.add(_balance);
}
IERC20(want).safeTransfer(jar, _amount);
}
// Withdraw funds, used to swap between strategies
// Not utilized right now, but could be used for i.e. multi stablecoin strategies
function withdrawForSwap(uint256 _amount)
external override
returns (uint256 balance)
{
require(msg.sender == jar, "!jar");
_withdrawSome(_amount);
balance = IERC20(want).balanceOf(address(this));
IERC20(want).safeTransfer(jar, balance);
}
function _withdrawSome(uint256 _amount) internal virtual returns (uint256);
function harvest() public override virtual;
// **** Internal functions ****
//Performs a swap through the current router, assuming infinite approval for the token was already given
function _swapUniswapWithPathPreapproved(
address[] memory path,
uint256 _amount,
address _router
) internal {
require(path[1] != address(0));
IUniswapRouterV2(_router).swapExactTokensForTokens(
_amount,
0,
path,
address(this),
now.add(60)
);
}
function _swapUniswapWithPathPreapproved(
address[] memory path,
uint256 _amount
) internal {
_swapUniswapWithPathPreapproved(path, _amount, currentRouter);
}
//Legacy swap functions left in to not break compatibility with older strategy contracts
function _swapUniswapWithPath(
address[] memory path,
uint256 _amount,
address _router
) internal {
require(path[1] != address(0));
// Swap with uniswap
IERC20(path[0]).safeApprove(_router, 0);
IERC20(path[0]).safeApprove(_router, _amount);
IUniswapRouterV2(_router).swapExactTokensForTokens(
_amount,
0,
path,
address(this),
now.add(60)
);
}
function _swapUniswapWithPath(
address[] memory path,
uint256 _amount
) internal {
_swapUniswapWithPath(path, _amount, currentRouter);
}
function _swapUniswapWithPathForFeeOnTransferTokens(
address[] memory path,
uint256 _amount,
address _router
) internal {
require(path[1] != address(0));
// Swap with uniswap
IERC20(path[0]).safeApprove(_router, 0);
IERC20(path[0]).safeApprove(_router, _amount);
IUniswapRouterV2(_router).swapExactTokensForTokensSupportingFeeOnTransferTokens(
_amount,
0,
path,
address(this),
now.add(60)
);
}
function _swapUniswapWithPathForFeeOnTransferTokens(
address[] memory path,
uint256 _amount
) internal {
_swapUniswapWithPathForFeeOnTransferTokens(path, _amount, currentRouter);
}
function _distributePerformanceFeesAndDeposit() internal {
uint256 _want = IERC20(want).balanceOf(address(this));
if (_want > 0) {
deposit();
}
lastHarvestTime = now;
}
// **** Events **** //
event SetJar(address indexed jar);
}
interface IConvexRewardPool {
function rewardLength() external view returns (uint256);
function rewards(uint256) external view returns (address reward_token, uint256 reward_integral, uint256 reward_remaining);
function curveGauge() external view returns (address);
//claim reward for given account (unguarded)
function getReward(address _account) external;
//withdraw balance and unwrap to the underlying lp token
function withdraw(uint256 _amount, bool _claim) external returns (bool);
//withdraw balance and unwrap to the underlying lp token
//but avoid checkpointing. will lose non-checkpointed rewards but can withdraw
function emergencyWithdraw(uint256 _amount) external returns (bool);
}
interface IConvexBooster {
//list of convex pools, index(pid) -> pool
function poolInfo(uint256) external view returns (
address lptoken, //the curve lp token
address gauge, //the curve gauge
address rewards, //the main reward/staking contract
bool shutdown, //is this pool shutdown?
address factory //a reference to the curve factory used to create this pool (needed for minting crv)
);
//deposit lp tokens and stake
function deposit(uint256 _pid, uint256 _amount) external returns(bool);
}
interface IERCFund {
function feeShareEnabled() external view returns (bool);
function depositToFeeDistributor(address token, uint256 amount) external;
function notifyFeeDistribution(address token) external;
function getFee() external view returns (uint256);
function recover(address token) external;
}
//Vaults are jars that emit ADDY rewards.
interface IVault is IJar {
function getBoost(address _user) external view returns (uint256);
function getPendingReward(address _user) external view returns (uint256);
function getLastDepositTime(address _user) external view returns (uint256);
function getTokensStaked(address _user) external view returns (uint256);
function totalShares() external view returns (uint256);
function getRewardMultiplier() external view returns (uint256);
function rewardAllocation() external view returns (uint256);
function totalPendingReward() external view returns (uint256);
function withdrawPenaltyTime() external view returns (uint256);
function withdrawPenalty() external view returns (uint256);
function increaseRewardAllocation(uint256 _newReward) external;
function setWithdrawPenaltyTime(uint256 _withdrawPenaltyTime) external;
function setWithdrawPenalty(uint256 _withdrawPenalty) external;
function setRewardMultiplier(uint256 _rewardMultiplier) external;
}
//A normal vault is a vault where the strategy contract notifies the vault contract about the profit it generated when harvesting.
interface IGenericVault is IVault {
//Strategy calls notifyReward to let the vault know that it earned a certain amount of profit (the performance fee) for gov token stakers
function notifyReward(address _reward, uint256 _amount) external;
}
interface __ICurveTricryptoOptimized is IERC20 {
/// @notice Deposit coins into the pool
/// @param _amounts List of amounts of coins to deposit
/// @param _min_mint_amount Minimum amount of LP tokens to mint from the deposit
function add_liquidity(uint256[3] calldata _amounts, uint256 _min_mint_amount) external;
/// `nonReentrant`
/// @notice Exchange using wrapped native token by default
/// @param i Index value for the input coin
/// @param j Index value for the output coin
/// @param dx Amount of input coin being swapped in
/// @param min_dy Minimum amount of output coin to receive
/// @return uint256 Amount of tokens at index j received by the `receiver
function exchange(uint256 i, uint256 j, uint256 dx, uint256 min_dy) external returns (uint256);
function coins(uint256 index) external view returns (address);
}
contract ConvexTriFxsStrategy is BaseStrategy {
uint256 public constant FEE_DENOMINATOR = 10000;
address private constant FXS = 0xFc00000000000000000000000000000000000002;
address private constant CRV = 0x331B9182088e2A7d6D3Fe4742AbA1fB231aEcc56;
address private constant frxETH = 0xFC00000000000000000000000000000000000006;
address private constant TRICRV_POOL = 0xF593aE314749d0c92B450F0a13E7e1791f352bB7;
address private constant CONVEX_BOOSTER = 0xd3327cb05a8E0095A543D582b5B3Ce3e19270389; //Convex's booster contract that stakes tokens
uint256 public pid = 10;
constructor()
public
BaseStrategy(
0xa0D3911349e701A1F49C1Ba2dDA34b4ce9636569, //triFXS pool
0x8b36504F2c52f59a57EE6c84d6f1b82e7698EcF0, //Fraxtal ERCFund
FXS,
0xa0D3911349e701A1F49C1Ba2dDA34b4ce9636569, //triFXS pool
0xE0DFbD7e26323F8A76633aeC52f1f51974Af6bBD //triFXS Convex Deposit
)
{
IERC20(want).safeApprove(CONVEX_BOOSTER, uint256(-1));
IERC20(CRV).safeApprove(TRICRV_POOL, uint256(-1));
//tokens being added as liquidity to pool
IERC20(FXS).safeApprove(want, uint256(-1));
IERC20(frxETH).safeApprove(want, uint256(-1));
}
// **** Views ****
function balanceOfPool() public override view returns (uint256) {
return IERC20(rewards).balanceOf(address(this));
}
//Calling claimable_reward via a transaction = claim available reward tokens
function getHarvestable() external override view returns (uint256) {
return 0;
}
function getFeeDistToken() public override view returns (address) {
return FXS;
}
/* **** Mutative functions **** */
function harvest() public override onlyHumanOrWhitelisted nonReentrant {
_getReward();
//distribute fee
uint256 _amountHarvested = IERC20(harvestedToken).balanceOf(address(this));
if (_amountHarvested > 0) {
uint256 _feeAmount = _amountHarvested.mul(IERCFund(strategist).getFee()).div(FEE_DENOMINATOR);
IERC20(harvestedToken).safeTransfer(strategist, _feeAmount);
}
uint256 _amountHarvestedCrv = IERC20(CRV).balanceOf(address(this));
if (_amountHarvestedCrv > 0) {
uint256 _feeAmount = _amountHarvestedCrv.mul(IERCFund(strategist).getFee()).div(FEE_DENOMINATOR);
uint256 _remainingCrv = _amountHarvestedCrv.sub(_feeAmount);
IERC20(CRV).safeTransfer(strategist, _feeAmount);
//swap CRV for frxETH
__ICurveTricryptoOptimized(TRICRV_POOL).exchange(2, 1, _remainingCrv, 1);
}
uint256 _ethBalance = IERC20(frxETH).balanceOf(address(this));
uint256 _fxsBalance = IERC20(harvestedToken).balanceOf(address(this));
if (_fxsBalance > 0 || _ethBalance > 0) {
__ICurveTricryptoOptimized(want).add_liquidity([0, _ethBalance, _fxsBalance], 0);
_distributePerformanceFeesAndDeposit();
}
}
function deposit() public override {
uint256 _want = IERC20(want).balanceOf(address(this));
if (_want > 0) {
IConvexBooster(CONVEX_BOOSTER).deposit(pid, _want);
}
}
function _withdrawSome(uint256 _amount)
internal
override
returns (uint256)
{
IConvexRewardPool(rewards).withdraw(_amount, true);
return _amount;
}
function _getReward() internal {
IConvexRewardPool(rewards).getReward(address(this));
}
// **** Admin functions ****
// Added to support recovering LP Rewards from other systems to be distributed to holders
function salvage(address recipient, address token, uint256 amount) public onlyOwner {
// Admin cannot withdraw the staking or harvested token from the contract
require(token != want, "cannot salvage want");
require(token != harvestedToken, "cannot salvage harvestedToken");
require(token != rewards, "cannot salvage gauge token");
IERC20(token).safeTransfer(recipient, amount);
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"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":true,"internalType":"address","name":"jar","type":"address"}],"name":"SetJar","type":"event"},{"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfWant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getFeeDistToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHarvestable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHarvestedToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"jar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHarvestTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiHarvest","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":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"salvage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_jar","type":"address"}],"name":"setJar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setMultiHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawForSwap","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040526000600255600a80553480156200001a57600080fd5b5073a0d3911349e701a1f49c1ba2dda34b4ce9636569738b36504f2c52f59a57ee6c84d6f1b82e7698ecf073fc000000000000000000000000000000000000028273e0dfbd7e26323f8a76633aec52f1f51974af6bbd60006200007c6200027d565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180556001600160a01b038516620000de57600080fd5b6001600160a01b038416620000f257600080fd5b6001600160a01b0383166200010657600080fd5b6001600160a01b0382166200011a57600080fd5b6001600160a01b0381166200012e57600080fd5b600380546001600160a01b03199081166001600160a01b0397881617918290556006805482169688169690961790955560048054861694871694909417909355600980548516928616929092179091556005805490931690841617909155620001bc911673d3327cb05a8e0095a543d582b5b3ce3e1927038960001962000281602090811b6200104317901c565b620001ff73331b9182088e2a7d6d3fe4742aba1fb231aecc5673f593ae314749d0c92b450f0a13e7e1791f352bb760001962000281602090811b6200104317901c565b6003546200023b9073fc00000000000000000000000000000000000002906001600160a01b031660001962000281602090811b6200104317901c565b600354620002779073fc00000000000000000000000000000000000006906001600160a01b031660001962000281602090811b6200104317901c565b6200077b565b3390565b801580620003105750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90620002ba9030908690600401620005bc565b60206040518083038186803b158015620002d357600080fd5b505afa158015620002e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200030e919062000585565b155b620003385760405162461bcd60e51b81526004016200032f90620006eb565b60405180910390fd5b620003938363095ea7b360e01b84846040516024016200035a929190620005d6565b60408051808303601f190181529190526020810180516001600160e01b0319939093166001600160e01b03938416179052906200039816565b505050565b6060620003f4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200043460201b6200113d179092919060201c565b80519091501562000393578080602001905181019062000415919062000563565b620003935760405162461bcd60e51b81526004016200032f90620006a1565b60606200044584846000856200044f565b90505b9392505050565b606082471015620004745760405162461bcd60e51b81526004016200032f9062000624565b6200047f856200051f565b6200049e5760405162461bcd60e51b81526004016200032f906200066a565b60006060866001600160a01b03168587604051620004bd91906200059e565b60006040518083038185875af1925050503d8060008114620004fc576040519150601f19603f3d011682016040523d82523d6000602084013e62000501565b606091505b5090925090506200051482828662000525565b979650505050505050565b3b151590565b606083156200053657508162000448565b825115620005475782518084602001fd5b8160405162461bcd60e51b81526004016200032f9190620005ef565b60006020828403121562000575578081fd5b8151801515811462000448578182fd5b60006020828403121562000597578081fd5b5051919050565b60008251620005b281846020870162000748565b9190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b60006020825282518060208401526200061081604085016020870162000748565b601f01601f19169190910160400192915050565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b60005b83811015620007655781810151838201526020016200074b565b8381111562000775576000848401525b50505050565b611b84806200078b6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c8063722713f7116100de578063c6223e2611610097578063d73792a911610071578063d73792a914610271578063f106845414610279578063f2fde38b14610281578063f6f482aa1461029457610173565b8063c6223e261461024e578063ceb0f62614610261578063d0e30db01461026957610173565b8063722713f7146102135780638da5cb5b1461021b5780639d27ab70146102235780639ec5a89414610236578063be38a4fe1461023e578063c1a3d44c1461024657610173565b80631fe4a686116101305780631fe4a686146101d85780632e1a7d4d146101e05780634641257d146101f3578063506508f1146101fb57806367367d2314610203578063715018a61461020b57610173565b80630547104d146101785780631113ef521461019657806311588086146101ab578063122fea3b146101b35780631836edca146101c85780631f1fcd51146101d0575b600080fd5b6101806102a7565b60405161018d9190611ae6565b60405180910390f35b6101a96101a4366004611587565b6102ac565b005b610180610397565b6101bb61041d565b60405161018d9190611633565b6101bb61042c565b6101bb610437565b6101bb610446565b6101a96101ee3660046115e7565b610455565b6101a961054c565b6101bb610a95565b6101bb610aa4565b6101a9610ab3565b610180610b3c565b6101bb610b57565b6101a961023136600461154f565b610b66565b6101bb610bda565b6101bb610be9565b610180610bf8565b61018061025c3660046115e7565b610c29565b610180610d05565b6101a9610d0b565b610180610e24565b610180610e2a565b6101a961028f36600461154f565b610e30565b6101a96102a236600461154f565b610ef0565b600090565b6102b4611156565b6001600160a01b03166102c5610b57565b6001600160a01b0316146102f45760405162461bcd60e51b81526004016102eb90611927565b60405180910390fd5b6003546001600160a01b03838116911614156103225760405162461bcd60e51b81526004016102eb90611746565b6004546001600160a01b03838116911614156103505760405162461bcd60e51b81526004016102eb906117aa565b6005546001600160a01b038381169116141561037e5760405162461bcd60e51b81526004016102eb9061197a565b6103926001600160a01b038316848361115a565b505050565b6005546040516370a0823160e01b81526000916001600160a01b0316906370a08231906103c8903090600401611633565b60206040518083038186803b1580156103e057600080fd5b505afa1580156103f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041891906115ff565b905090565b6009546001600160a01b031681565b6002603f609a1b0190565b6003546001600160a01b031681565b6006546001600160a01b031681565b6008546001600160a01b0316331461047f5760405162461bcd60e51b81526004016102eb9061195c565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a08231906104b0903090600401611633565b60206040518083038186803b1580156104c857600080fd5b505afa1580156104dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050091906115ff565b90508181101561052b5761051c6105178383611179565b6111a6565b91506105288282611233565b91505b600854600354610548916001600160a01b0391821691168461115a565b5050565b33321480610572575061055d610b57565b6001600160a01b0316336001600160a01b0316145b8061058757506007546001600160a01b031633145b8061059c57506008546001600160a01b031633145b6105b85760405162461bcd60e51b81526004016102eb906118be565b600260015414156105db5760405162461bcd60e51b81526004016102eb90611a59565b60026001556105e8611258565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161061a91309101611633565b60206040518083038186803b15801561063257600080fd5b505afa158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a91906115ff565b9050801561073257600061071061271061070a600660009054906101000a90046001600160a01b03166001600160a01b031663ced72f876040518163ffffffff1660e01b815260040160206040518083038186803b1580156106cb57600080fd5b505afa1580156106df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070391906115ff565b85906112bc565b906112f6565b600654600454919250610730916001600160a01b0390811691168361115a565b505b6040516370a0823160e01b815260009073331b9182088e2a7d6d3fe4742aba1fb231aecc56906370a082319061076c903090600401611633565b60206040518083038186803b15801561078457600080fd5b505afa158015610798573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bc91906115ff565b905080156108ef57600061081d61271061070a600660009054906101000a90046001600160a01b03166001600160a01b031663ced72f876040518163ffffffff1660e01b815260040160206040518083038186803b1580156106cb57600080fd5b9050600061082b8383611179565b60065490915061085a9073331b9182088e2a7d6d3fe4742aba1fb231aecc56906001600160a01b03168461115a565b604051630b68372160e31b815273f593ae314749d0c92b450f0a13e7e1791f352bb790635b41b9089061089990600290600190869082906004016116b2565b602060405180830381600087803b1580156108b357600080fd5b505af11580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb91906115ff565b5050505b6040516370a0823160e01b81526000906006603f609a1b01906370a082319061091c903090600401611633565b60206040518083038186803b15801561093457600080fd5b505afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c91906115ff565b600480546040516370a0823160e01b81529293506000926001600160a01b03909116916370a08231916109a191309101611633565b60206040518083038186803b1580156109b957600080fd5b505afa1580156109cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f191906115ff565b90506000811180610a025750600082115b15610a8b57600354604080516060810182526000808252602082018690528183018590529151634515cef360e01b81526001600160a01b0390931692634515cef392610a51929160040161167a565b600060405180830381600087803b158015610a6b57600080fd5b505af1158015610a7f573d6000803e3d6000fd5b50505050610a8b611328565b5050600180555050565b6007546001600160a01b031681565b6004546001600160a01b031690565b610abb611156565b6001600160a01b0316610acc610b57565b6001600160a01b031614610af25760405162461bcd60e51b81526004016102eb90611927565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610418610b49610397565b610b51610bf8565b90611233565b6000546001600160a01b031690565b610b6e611156565b6001600160a01b0316610b7f610b57565b6001600160a01b031614610ba55760405162461bcd60e51b81526004016102eb90611927565b6001600160a01b038116610bb857600080fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031681565b6008546001600160a01b031681565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a08231906103c8903090600401611633565b6008546000906001600160a01b03163314610c565760405162461bcd60e51b81526004016102eb9061195c565b610c5f826111a6565b506003546040516370a0823160e01b81526001600160a01b03909116906370a0823190610c90903090600401611633565b60206040518083038186803b158015610ca857600080fd5b505afa158015610cbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce091906115ff565b600854600354919250610d00916001600160a01b0390811691168361115a565b919050565b60025481565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610d3c903090600401611633565b60206040518083038186803b158015610d5457600080fd5b505afa158015610d68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8c91906115ff565b90508015610e2157600a54604051631c57762b60e31b815273d3327cb05a8e0095a543d582b5b3ce3e192703899163e2bbb15891610dcf91908590600401611aff565b602060405180830381600087803b158015610de957600080fd5b505af1158015610dfd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054891906115c7565b50565b61271081565b600a5481565b610e38611156565b6001600160a01b0316610e49610b57565b6001600160a01b031614610e6f5760405162461bcd60e51b81526004016102eb90611927565b6001600160a01b038116610e955760405162461bcd60e51b81526004016102eb90611700565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610ef8611156565b6001600160a01b0316610f09610b57565b6001600160a01b031614610f2f5760405162461bcd60e51b81526004016102eb90611927565b6008546001600160a01b031615610f585760405162461bcd60e51b81526004016102eb90611818565b306001600160a01b0316816001600160a01b031663a8c62e766040518163ffffffff1660e01b815260040160206040518083038186803b158015610f9b57600080fd5b505afa158015610faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd3919061156b565b6001600160a01b031614610ff95760405162461bcd60e51b81526004016102eb906119b1565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f55c9c1522358ac20ccd3c4887fe1886c26bd0f045ab7fd11acd78680bb77956990600090a250565b8015806110cb5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906110799030908690600401611647565b60206040518083038186803b15801561109157600080fd5b505afa1580156110a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c991906115ff565b155b6110e75760405162461bcd60e51b81526004016102eb90611a90565b6103928363095ea7b360e01b8484604051602401611106929190611661565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526113c0565b606061114c848460008561144f565b90505b9392505050565b3390565b6103928363a9059cbb60e01b8484604051602401611106929190611661565b60008282111561119b5760405162461bcd60e51b81526004016102eb906117e1565b508082035b92915050565b600554604051631c683a1b60e11b81526000916001600160a01b0316906338d07436906111da908590600190600401611aef565b602060405180830381600087803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122c91906115c7565b5090919050565b60008282018381101561114f5760405162461bcd60e51b81526004016102eb90611773565b600554604051630c00007b60e41b81526001600160a01b039091169063c00007b090611288903090600401611633565b600060405180830381600087803b1580156112a257600080fd5b505af11580156112b6573d6000803e3d6000fd5b50505050565b6000826112cb575060006111a0565b828202828482816112d857fe5b041461114f5760405162461bcd60e51b81526004016102eb906118e6565b60008082116113175760405162461bcd60e51b81526004016102eb90611887565b81838161132057fe5b049392505050565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611359903090600401611633565b60206040518083038186803b15801561137157600080fd5b505afa158015611385573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a991906115ff565b905080156113b9576113b9610d0b565b5042600255565b6060611415826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661113d9092919063ffffffff16565b805190915015610392578080602001905181019061143391906115c7565b6103925760405162461bcd60e51b81526004016102eb90611a0f565b6060824710156114715760405162461bcd60e51b81526004016102eb90611841565b61147a85611510565b6114965760405162461bcd60e51b81526004016102eb906119d8565b60006060866001600160a01b031685876040516114b39190611617565b60006040518083038185875af1925050503d80600081146114f0576040519150601f19603f3d011682016040523d82523d6000602084013e6114f5565b606091505b5091509150611505828286611516565b979650505050505050565b3b151590565b6060831561152557508161114f565b8251156115355782518084602001fd5b8160405162461bcd60e51b81526004016102eb91906116cd565b600060208284031215611560578081fd5b813561114f81611b39565b60006020828403121561157c578081fd5b815161114f81611b39565b60008060006060848603121561159b578182fd5b83356115a681611b39565b925060208401356115b681611b39565b929592945050506040919091013590565b6000602082840312156115d8578081fd5b8151801515811461114f578182fd5b6000602082840312156115f8578081fd5b5035919050565b600060208284031215611610578081fd5b5051919050565b60008251611629818460208701611b0d565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b60808101818460005b60038110156116a2578151835260209283019290910190600101611683565b5050508260608301529392505050565b93845260208401929092526040830152606082015260800190565b60006020825282518060208401526116ec816040850160208701611b0d565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526013908201527218d85b9b9bdd081cd85b1d9859d9481dd85b9d606a1b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601d908201527f63616e6e6f742073616c7661676520686172766573746564546f6b656e000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600f908201526e1a985c88185b1c9958591e481cd95d608a1b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252600e908201526d1b9bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526004908201526310b530b960e11b604082015260600190565b6020808252601a908201527f63616e6e6f742073616c7661676520676175676520746f6b656e000000000000604082015260600190565b6020808252600d908201526c34b731b7b93932b1ba103530b960991b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b60005b83811015611b28578181015183820152602001611b10565b838111156112b65750506000910152565b6001600160a01b0381168114610e2157600080fdfea2646970667358221220329808ee04755e7abe448e6be0f8e7d7c859b1c186d36e0dbd6f36f60dd1b06c64736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c8063722713f7116100de578063c6223e2611610097578063d73792a911610071578063d73792a914610271578063f106845414610279578063f2fde38b14610281578063f6f482aa1461029457610173565b8063c6223e261461024e578063ceb0f62614610261578063d0e30db01461026957610173565b8063722713f7146102135780638da5cb5b1461021b5780639d27ab70146102235780639ec5a89414610236578063be38a4fe1461023e578063c1a3d44c1461024657610173565b80631fe4a686116101305780631fe4a686146101d85780632e1a7d4d146101e05780634641257d146101f3578063506508f1146101fb57806367367d2314610203578063715018a61461020b57610173565b80630547104d146101785780631113ef521461019657806311588086146101ab578063122fea3b146101b35780631836edca146101c85780631f1fcd51146101d0575b600080fd5b6101806102a7565b60405161018d9190611ae6565b60405180910390f35b6101a96101a4366004611587565b6102ac565b005b610180610397565b6101bb61041d565b60405161018d9190611633565b6101bb61042c565b6101bb610437565b6101bb610446565b6101a96101ee3660046115e7565b610455565b6101a961054c565b6101bb610a95565b6101bb610aa4565b6101a9610ab3565b610180610b3c565b6101bb610b57565b6101a961023136600461154f565b610b66565b6101bb610bda565b6101bb610be9565b610180610bf8565b61018061025c3660046115e7565b610c29565b610180610d05565b6101a9610d0b565b610180610e24565b610180610e2a565b6101a961028f36600461154f565b610e30565b6101a96102a236600461154f565b610ef0565b600090565b6102b4611156565b6001600160a01b03166102c5610b57565b6001600160a01b0316146102f45760405162461bcd60e51b81526004016102eb90611927565b60405180910390fd5b6003546001600160a01b03838116911614156103225760405162461bcd60e51b81526004016102eb90611746565b6004546001600160a01b03838116911614156103505760405162461bcd60e51b81526004016102eb906117aa565b6005546001600160a01b038381169116141561037e5760405162461bcd60e51b81526004016102eb9061197a565b6103926001600160a01b038316848361115a565b505050565b6005546040516370a0823160e01b81526000916001600160a01b0316906370a08231906103c8903090600401611633565b60206040518083038186803b1580156103e057600080fd5b505afa1580156103f4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041891906115ff565b905090565b6009546001600160a01b031681565b6002603f609a1b0190565b6003546001600160a01b031681565b6006546001600160a01b031681565b6008546001600160a01b0316331461047f5760405162461bcd60e51b81526004016102eb9061195c565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a08231906104b0903090600401611633565b60206040518083038186803b1580156104c857600080fd5b505afa1580156104dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050091906115ff565b90508181101561052b5761051c6105178383611179565b6111a6565b91506105288282611233565b91505b600854600354610548916001600160a01b0391821691168461115a565b5050565b33321480610572575061055d610b57565b6001600160a01b0316336001600160a01b0316145b8061058757506007546001600160a01b031633145b8061059c57506008546001600160a01b031633145b6105b85760405162461bcd60e51b81526004016102eb906118be565b600260015414156105db5760405162461bcd60e51b81526004016102eb90611a59565b60026001556105e8611258565b600480546040516370a0823160e01b81526000926001600160a01b03909216916370a082319161061a91309101611633565b60206040518083038186803b15801561063257600080fd5b505afa158015610646573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066a91906115ff565b9050801561073257600061071061271061070a600660009054906101000a90046001600160a01b03166001600160a01b031663ced72f876040518163ffffffff1660e01b815260040160206040518083038186803b1580156106cb57600080fd5b505afa1580156106df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070391906115ff565b85906112bc565b906112f6565b600654600454919250610730916001600160a01b0390811691168361115a565b505b6040516370a0823160e01b815260009073331b9182088e2a7d6d3fe4742aba1fb231aecc56906370a082319061076c903090600401611633565b60206040518083038186803b15801561078457600080fd5b505afa158015610798573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107bc91906115ff565b905080156108ef57600061081d61271061070a600660009054906101000a90046001600160a01b03166001600160a01b031663ced72f876040518163ffffffff1660e01b815260040160206040518083038186803b1580156106cb57600080fd5b9050600061082b8383611179565b60065490915061085a9073331b9182088e2a7d6d3fe4742aba1fb231aecc56906001600160a01b03168461115a565b604051630b68372160e31b815273f593ae314749d0c92b450f0a13e7e1791f352bb790635b41b9089061089990600290600190869082906004016116b2565b602060405180830381600087803b1580156108b357600080fd5b505af11580156108c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108eb91906115ff565b5050505b6040516370a0823160e01b81526000906006603f609a1b01906370a082319061091c903090600401611633565b60206040518083038186803b15801561093457600080fd5b505afa158015610948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096c91906115ff565b600480546040516370a0823160e01b81529293506000926001600160a01b03909116916370a08231916109a191309101611633565b60206040518083038186803b1580156109b957600080fd5b505afa1580156109cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f191906115ff565b90506000811180610a025750600082115b15610a8b57600354604080516060810182526000808252602082018690528183018590529151634515cef360e01b81526001600160a01b0390931692634515cef392610a51929160040161167a565b600060405180830381600087803b158015610a6b57600080fd5b505af1158015610a7f573d6000803e3d6000fd5b50505050610a8b611328565b5050600180555050565b6007546001600160a01b031681565b6004546001600160a01b031690565b610abb611156565b6001600160a01b0316610acc610b57565b6001600160a01b031614610af25760405162461bcd60e51b81526004016102eb90611927565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610418610b49610397565b610b51610bf8565b90611233565b6000546001600160a01b031690565b610b6e611156565b6001600160a01b0316610b7f610b57565b6001600160a01b031614610ba55760405162461bcd60e51b81526004016102eb90611927565b6001600160a01b038116610bb857600080fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b031681565b6008546001600160a01b031681565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a08231906103c8903090600401611633565b6008546000906001600160a01b03163314610c565760405162461bcd60e51b81526004016102eb9061195c565b610c5f826111a6565b506003546040516370a0823160e01b81526001600160a01b03909116906370a0823190610c90903090600401611633565b60206040518083038186803b158015610ca857600080fd5b505afa158015610cbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce091906115ff565b600854600354919250610d00916001600160a01b0390811691168361115a565b919050565b60025481565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610d3c903090600401611633565b60206040518083038186803b158015610d5457600080fd5b505afa158015610d68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d8c91906115ff565b90508015610e2157600a54604051631c57762b60e31b815273d3327cb05a8e0095a543d582b5b3ce3e192703899163e2bbb15891610dcf91908590600401611aff565b602060405180830381600087803b158015610de957600080fd5b505af1158015610dfd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054891906115c7565b50565b61271081565b600a5481565b610e38611156565b6001600160a01b0316610e49610b57565b6001600160a01b031614610e6f5760405162461bcd60e51b81526004016102eb90611927565b6001600160a01b038116610e955760405162461bcd60e51b81526004016102eb90611700565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610ef8611156565b6001600160a01b0316610f09610b57565b6001600160a01b031614610f2f5760405162461bcd60e51b81526004016102eb90611927565b6008546001600160a01b031615610f585760405162461bcd60e51b81526004016102eb90611818565b306001600160a01b0316816001600160a01b031663a8c62e766040518163ffffffff1660e01b815260040160206040518083038186803b158015610f9b57600080fd5b505afa158015610faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd3919061156b565b6001600160a01b031614610ff95760405162461bcd60e51b81526004016102eb906119b1565b600880546001600160a01b0319166001600160a01b0383169081179091556040517f55c9c1522358ac20ccd3c4887fe1886c26bd0f045ab7fd11acd78680bb77956990600090a250565b8015806110cb5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e906110799030908690600401611647565b60206040518083038186803b15801561109157600080fd5b505afa1580156110a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c991906115ff565b155b6110e75760405162461bcd60e51b81526004016102eb90611a90565b6103928363095ea7b360e01b8484604051602401611106929190611661565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526113c0565b606061114c848460008561144f565b90505b9392505050565b3390565b6103928363a9059cbb60e01b8484604051602401611106929190611661565b60008282111561119b5760405162461bcd60e51b81526004016102eb906117e1565b508082035b92915050565b600554604051631c683a1b60e11b81526000916001600160a01b0316906338d07436906111da908590600190600401611aef565b602060405180830381600087803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122c91906115c7565b5090919050565b60008282018381101561114f5760405162461bcd60e51b81526004016102eb90611773565b600554604051630c00007b60e41b81526001600160a01b039091169063c00007b090611288903090600401611633565b600060405180830381600087803b1580156112a257600080fd5b505af11580156112b6573d6000803e3d6000fd5b50505050565b6000826112cb575060006111a0565b828202828482816112d857fe5b041461114f5760405162461bcd60e51b81526004016102eb906118e6565b60008082116113175760405162461bcd60e51b81526004016102eb90611887565b81838161132057fe5b049392505050565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611359903090600401611633565b60206040518083038186803b15801561137157600080fd5b505afa158015611385573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a991906115ff565b905080156113b9576113b9610d0b565b5042600255565b6060611415826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661113d9092919063ffffffff16565b805190915015610392578080602001905181019061143391906115c7565b6103925760405162461bcd60e51b81526004016102eb90611a0f565b6060824710156114715760405162461bcd60e51b81526004016102eb90611841565b61147a85611510565b6114965760405162461bcd60e51b81526004016102eb906119d8565b60006060866001600160a01b031685876040516114b39190611617565b60006040518083038185875af1925050503d80600081146114f0576040519150601f19603f3d011682016040523d82523d6000602084013e6114f5565b606091505b5091509150611505828286611516565b979650505050505050565b3b151590565b6060831561152557508161114f565b8251156115355782518084602001fd5b8160405162461bcd60e51b81526004016102eb91906116cd565b600060208284031215611560578081fd5b813561114f81611b39565b60006020828403121561157c578081fd5b815161114f81611b39565b60008060006060848603121561159b578182fd5b83356115a681611b39565b925060208401356115b681611b39565b929592945050506040919091013590565b6000602082840312156115d8578081fd5b8151801515811461114f578182fd5b6000602082840312156115f8578081fd5b5035919050565b600060208284031215611610578081fd5b5051919050565b60008251611629818460208701611b0d565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b60808101818460005b60038110156116a2578151835260209283019290910190600101611683565b5050508260608301529392505050565b93845260208401929092526040830152606082015260800190565b60006020825282518060208401526116ec816040850160208701611b0d565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526013908201527218d85b9b9bdd081cd85b1d9859d9481dd85b9d606a1b604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601d908201527f63616e6e6f742073616c7661676520686172766573746564546f6b656e000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252600f908201526e1a985c88185b1c9958591e481cd95d608a1b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252600e908201526d1b9bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526004908201526310b530b960e11b604082015260600190565b6020808252601a908201527f63616e6e6f742073616c7661676520676175676520746f6b656e000000000000604082015260600190565b6020808252600d908201526c34b731b7b93932b1ba103530b960991b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b606082015260800190565b90815260200190565b9182521515602082015260400190565b918252602082015260400190565b60005b83811015611b28578181015183820152602001611b10565b838111156112b65750506000910152565b6001600160a01b0381168114610e2157600080fdfea2646970667358221220329808ee04755e7abe448e6be0f8e7d7c859b1c186d36e0dbd6f36f60dd1b06c64736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.