Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 265 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Remove_liquidity | 11375345 | 1923 days ago | IN | 0 ETH | 0.0005569 | ||||
| Remove_liquidity | 11375308 | 1923 days ago | IN | 0 ETH | 0.0005999 | ||||
| Remove_liquidity | 11375305 | 1923 days ago | IN | 0 ETH | 0.00057352 | ||||
| Erc_sweep | 11375002 | 1923 days ago | IN | 0 ETH | 0.00328084 | ||||
| Erc_sweep | 11374997 | 1923 days ago | IN | 0 ETH | 0.00350819 | ||||
| Set_base_asset_a... | 11374991 | 1923 days ago | IN | 0 ETH | 0.00234129 | ||||
| Remove_liquidity | 11370819 | 1924 days ago | IN | 0 ETH | 0.00151468 | ||||
| Remove_liquidity | 11370816 | 1924 days ago | IN | 0 ETH | 0.001369 | ||||
| Remove_liquidity | 11362231 | 1925 days ago | IN | 0 ETH | 0.0011422 | ||||
| Remove_liquidity | 11360735 | 1926 days ago | IN | 0 ETH | 0.00428685 | ||||
| Remove_liquidity | 11359246 | 1926 days ago | IN | 0 ETH | 0.00117075 | ||||
| Remove_liquidity | 11358670 | 1926 days ago | IN | 0 ETH | 0.00048465 | ||||
| Remove_liquidity | 11355367 | 1926 days ago | IN | 0 ETH | 0.00034304 | ||||
| Remove_liquidity | 11355239 | 1926 days ago | IN | 0 ETH | 0.00057134 | ||||
| Erc_sweep | 11355224 | 1926 days ago | IN | 0 ETH | 0.0003159 | ||||
| Remove_liquidity | 11355193 | 1926 days ago | IN | 0 ETH | 0.00065102 | ||||
| Remove_liquidity | 11354780 | 1926 days ago | IN | 0 ETH | 0.0011422 | ||||
| Remove_liquidity | 11354616 | 1927 days ago | IN | 0 ETH | 0.0003421 | ||||
| Remove_liquidity | 11354614 | 1927 days ago | IN | 0 ETH | 0.00042832 | ||||
| Remove_liquidity | 11354608 | 1927 days ago | IN | 0 ETH | 0.0003847 | ||||
| Remove_liquidity | 11354608 | 1927 days ago | IN | 0 ETH | 0.00038565 | ||||
| Remove_liquidity | 11354603 | 1927 days ago | IN | 0 ETH | 0.00053989 | ||||
| Remove_liquidity | 11354580 | 1927 days ago | IN | 0 ETH | 0.00079825 | ||||
| Remove_liquidity | 11354416 | 1927 days ago | IN | 0 ETH | 0.00128119 | ||||
| Remove_liquidity | 11354229 | 1927 days ago | IN | 0 ETH | 0.00039912 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
SaffronUniswapLPPool
Compiler Version
v0.7.4+commit.3f05b770
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2020-11-15
*/
// File: contracts/interfaces/ISaffronBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;
interface ISaffronBase {
enum Tranche {S, AA, A}
enum LPTokenType {dsec, principal}
// Store values (balances, dsec, vdsec) with TrancheUint256
struct TrancheUint256 {
uint256 S;
uint256 AA;
uint256 A;
}
struct epoch_params {
uint256 start_date; // Time when the platform launched
uint256 duration; // Duration of epoch
}
}
// File: contracts/interfaces/ISaffronPool.sol
pragma solidity ^0.7.1;
interface ISaffronPool is ISaffronBase {
function add_liquidity(uint256 amount, Tranche tranche) external;
function remove_liquidity(address v1_dsec_token_address, uint256 dsec_amount, address v1_principal_token_address, uint256 principal_amount) external;
function get_base_asset_address() external view returns(address);
function hourly_strategy(address adapter_address) external;
function wind_down_epoch(uint256 epoch, uint256 amount_sfi) external;
function set_governance(address to) external;
function get_epoch_cycle_params() external view returns (uint256, uint256);
function shutdown() external;
}
// File: contracts/lib/SafeMath.sol
pragma solidity ^0.7.1;
/**
* @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, 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) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* 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);
uint256 c = a - b;
return c;
}
/**
* @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) {
// 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 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts 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) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
// File: contracts/lib/IERC20.sol
pragma solidity ^0.7.1;
/**
* @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);
}
// File: contracts/lib/Context.sol
pragma solidity ^0.7.1;
/*
* @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;
}
}
// File: contracts/lib/Address.sol
pragma solidity ^0.7.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
* ====
*/
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.3._
*/
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.3._
*/
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);
}
}
}
}
// File: contracts/lib/ERC20.sol
pragma solidity ^0.7.1;
/**
* @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;
using Address for address;
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_) {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view 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 returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view 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 is 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 {
_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 { }
}
// File: contracts/lib/SafeERC20.sol
pragma solidity ^0.7.1;
/**
* @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");
}
}
}
// File: contracts/SFI.sol
pragma solidity ^0.7.1;
contract SFI is ERC20 {
using SafeERC20 for IERC20;
address public governance;
address public SFI_minter;
uint256 public MAX_TOKENS = 100000 ether;
constructor (string memory name, string memory symbol) ERC20(name, symbol) {
// Initial governance is Saffron Deployer
governance = msg.sender;
}
function mint_SFI(address to, uint256 amount) public {
require(msg.sender == SFI_minter, "must be SFI_minter");
require(this.totalSupply() + amount < MAX_TOKENS, "cannot mint more than MAX_TOKENS");
_mint(to, amount);
}
function set_minter(address to) external {
require(msg.sender == governance, "must be governance");
SFI_minter = to;
}
function set_governance(address to) external {
require(msg.sender == governance, "must be governance");
governance = to;
}
event ErcSwept(address who, address to, address token, uint256 amount);
function erc_sweep(address _token, address _to) public {
require(msg.sender == governance, "must be governance");
IERC20 tkn = IERC20(_token);
uint256 tBal = tkn.balanceOf(address(this));
tkn.safeTransfer(_to, tBal);
emit ErcSwept(msg.sender, _to, _token, tBal);
}
}
// File: contracts/SaffronLPBalanceToken.sol
pragma solidity ^0.7.1;
contract SaffronLPBalanceToken is ERC20 {
address public pool_address;
constructor (string memory name, string memory symbol) ERC20(name, symbol) {
// Set pool_address to saffron pool that created token
pool_address = msg.sender;
}
// Allow creating new tranche tokens
function mint(address to, uint256 amount) public {
require(msg.sender == pool_address, "must be pool");
_mint(to, amount);
}
function burn(address account, uint256 amount) public {
require(msg.sender == pool_address, "must be pool");
_burn(account, amount);
}
function set_governance(address to) external {
require(msg.sender == pool_address, "must be pool");
pool_address = to;
}
}
// File: contracts/SaffronUniswapLPPool.sol
pragma solidity ^0.7.1;
contract SaffronUniswapLPPool is ISaffronPool {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public governance; // Governance (v3: add off-chain/on-chain governance)
address public base_asset_address; // Base asset managed by the pool (DAI, USDT, YFI...)
address public SFI_address; // SFI token
uint256 public pool_principal; // Current principal balance (added minus removed)
bool public _shutdown = false; // v0, v1: shutdown the pool after the final capital deploy to prevent burning funds
/**** STRATEGY ****/
address public strategy;
/**** EPOCHS ****/
epoch_params public epoch_cycle = epoch_params({
start_date: 1604239200, // 11/01/2020 @ 2:00pm (UTC)
duration: 14 days // 1210000 seconds
});
mapping(uint256=>bool) public epoch_wound_down; // True if epoch has been wound down already (governance)
/**** EPOCH INDEXED STORAGE ****/
uint256[] public epoch_principal; // Total principal owned by the pool (all tranches)
uint256[] public total_dsec; // Total dsec (tokens + vdsec)
uint256[] public SFI_earned; // Total SFI earned (minted at wind_down_epoch)
address[] public dsec_token_addresses; // Address for each dsec token
address[] public principal_token_addresses; // Address for each principal token
/**** SAFFRON LP TOKENS ****/
// If we just have a token address then we can look up epoch and tranche balance tokens using a mapping(address=>SaffronV1dsecInfo)
// LP tokens are dsec (redeemable for interest+SFI) and principal (redeemable for base asset) tokens
struct SaffronAMMLPTokenInfo {
bool exists;
uint256 epoch;
LPTokenType token_type;
}
mapping(address=>SaffronAMMLPTokenInfo) private saffron_LP_token_info;
constructor(address _strategy, address _base_asset, address _SFI_address) {
governance = msg.sender;
base_asset_address = _base_asset;
SFI_address = _SFI_address;
strategy = _strategy;
}
function new_epoch(uint256 epoch, address saffron_LP_dsec_token_address, address saffron_LP_principal_token_address) public {
require(epoch_principal.length == epoch, "improper new epoch");
epoch_principal.push(0);
total_dsec.push(0);
SFI_earned.push(0);
dsec_token_addresses.push(saffron_LP_dsec_token_address);
principal_token_addresses.push(saffron_LP_principal_token_address);
// Token info for looking up epoch and tranche of dsec tokens by token contract address
saffron_LP_token_info[saffron_LP_dsec_token_address] = SaffronAMMLPTokenInfo({
exists: true,
epoch: epoch,
token_type: LPTokenType.dsec
});
// Token info for looking up epoch and tranche of PRINCIPAL tokens by token contract address
saffron_LP_token_info[saffron_LP_principal_token_address] = SaffronAMMLPTokenInfo({
exists: true,
epoch: epoch,
token_type: LPTokenType.principal
});
}
event DsecGeneration(uint256 time_remaining, uint256 amount, uint256 dsec, address dsec_address, uint256 epoch, uint256 tranche, address user_address, address principal_token_addr);
event AddLiquidity(uint256 new_pool_principal, uint256 new_epoch_principal, uint256 new_total_dsec);
// LP user adds liquidity to the pool
// Pre-requisite (front-end): have user approve transfer on front-end to base asset using our contract address
function add_liquidity(uint256 amount, Tranche tranche) external override {
require(!_shutdown, "pool shutdown");
require(tranche == Tranche.S, "AMM pool has no tranches");
uint256 epoch = get_current_epoch();
require(amount != 0, "can't add 0");
require(epoch == 1, "v1: must be epoch 1 only");
// Calculate the dsec for deposited Uniswap V2 LP tokens
uint256 dsec = amount.mul(get_seconds_until_epoch_end(epoch));
// Update pool principal eternal and epoch state
pool_principal = pool_principal.add(amount); // Add Uniswap V2 LP token amount to pool principal total
epoch_principal[epoch] = epoch_principal[epoch].add(amount); // Add Uniswap V2 LP token amount to principal epoch total
// Update dsec and principal balance state
total_dsec[epoch] = total_dsec[epoch].add(dsec);
// Transfer Uniswap V2 LP tokens from LP to pool
IERC20(base_asset_address).safeTransferFrom(msg.sender, address(this), amount);
// Mint Saffron LP epoch 1 AMM dsec tokens and transfer them to sender
SaffronLPBalanceToken(dsec_token_addresses[epoch]).mint(msg.sender, dsec);
// Mint Saffron LP epoch 1 AMM principal tokens and transfer them to sender
SaffronLPBalanceToken(principal_token_addresses[epoch]).mint(msg.sender, amount);
emit DsecGeneration(get_seconds_until_epoch_end(epoch), amount, dsec, dsec_token_addresses[epoch], epoch, uint256(tranche), msg.sender, principal_token_addresses[epoch]);
emit AddLiquidity(pool_principal, epoch_principal[epoch], total_dsec[epoch]);
}
event WindDownEpochState(uint256 previous_epoch, uint256 SFI_earned, uint256 epoch_dsec);
function wind_down_epoch(uint256 epoch, uint256 amount_sfi) public override {
require(msg.sender == address(strategy), "must be strategy");
require(!epoch_wound_down[epoch], "epoch already wound down");
uint256 current_epoch = get_current_epoch();
require(epoch < current_epoch, "cannot wind down future epoch");
uint256 previous_epoch = current_epoch - 1;
require(block.timestamp >= get_epoch_end(previous_epoch), "can't call before epoch ended");
SFI_earned[epoch] = amount_sfi;
// Total dsec
uint256 epoch_dsec = total_dsec[epoch];
epoch_wound_down[epoch] = true;
emit WindDownEpochState(previous_epoch, SFI_earned[epoch], epoch_dsec);
}
event RemoveLiquidityDsec(uint256 dsec_percent, uint256 SFI_owned);
event RemoveLiquidityPrincipal(uint256 principal);
function remove_liquidity(address dsec_token_address, uint256 dsec_amount, address principal_token_address, uint256 principal_amount) external override {
require(dsec_amount > 0 || principal_amount > 0, "can't remove 0");
uint256 SFI_owned;
uint256 dsec_percent;
// Update state for removal via dsec token
if (dsec_token_address != address(0x0) && dsec_amount > 0) {
// Get info about the v1 dsec token from its address and check that it exists
SaffronAMMLPTokenInfo memory token_info = saffron_LP_token_info[dsec_token_address];
require(token_info.exists, "balance token lookup failed");
SaffronLPBalanceToken sbt = SaffronLPBalanceToken(dsec_token_address);
require(sbt.balanceOf(msg.sender) >= dsec_amount, "insufficient dsec balance");
// Token epoch must be a past epoch
uint256 token_epoch = token_info.epoch;
require(token_info.token_type == LPTokenType.dsec, "bad dsec address");
require(token_epoch == 1, "v1: bal token epoch must be 1");
require(epoch_wound_down[token_epoch], "can't remove from wound up epoch");
// Dsec gives user claim over a tranche's earned SFI and interest
dsec_percent = dsec_amount.mul(1 ether).div(total_dsec[token_epoch]);
SFI_owned = SFI_earned[token_epoch].mul(dsec_percent) / 1 ether;
SFI_earned[token_epoch] = SFI_earned[token_epoch].sub(SFI_owned);
total_dsec[token_epoch] = total_dsec[token_epoch].sub(dsec_amount);
}
// Update state for removal via principal token
if (principal_token_address != address(0x0) && principal_amount > 0) {
// Get info about the v1 dsec token from its address and check that it exists
SaffronAMMLPTokenInfo memory token_info = saffron_LP_token_info[principal_token_address];
require(token_info.exists, "balance token info lookup failed");
SaffronLPBalanceToken sbt = SaffronLPBalanceToken(principal_token_address);
require(sbt.balanceOf(msg.sender) >= principal_amount, "insufficient principal balance");
// Token epoch must be a past epoch
uint256 token_epoch = token_info.epoch;
require(token_info.token_type == LPTokenType.principal, "bad balance token address");
require(token_epoch == 1, "v1: bal token epoch must be 1");
require(epoch_wound_down[token_epoch], "can't remove from wound up epoch");
epoch_principal[token_epoch] = epoch_principal[token_epoch].sub(principal_amount);
pool_principal = pool_principal.sub(principal_amount);
}
// Transfer
if (dsec_token_address != address(0x0) && dsec_amount > 0) {
SaffronLPBalanceToken sbt = SaffronLPBalanceToken(dsec_token_address);
require(sbt.balanceOf(msg.sender) >= dsec_amount, "insufficient dsec balance");
sbt.burn(msg.sender, dsec_amount);
IERC20(SFI_address).safeTransfer(msg.sender, SFI_owned);
emit RemoveLiquidityDsec(dsec_percent, SFI_owned);
}
if (principal_token_address != address(0x0) && principal_amount > 0) {
SaffronLPBalanceToken sbt = SaffronLPBalanceToken(principal_token_address);
require(sbt.balanceOf(msg.sender) >= principal_amount, "insufficient principal balance");
sbt.burn(msg.sender, principal_amount);
IERC20(base_asset_address).safeTransfer(msg.sender, principal_amount);
emit RemoveLiquidityPrincipal(principal_amount);
}
require((dsec_token_address != address(0x0) && dsec_amount > 0) || (principal_token_address != address(0x0) && principal_amount > 0), "no action performed");
}
function hourly_strategy(address) external pure override {
return;
}
function shutdown() external override {
require(msg.sender == strategy, "must be strategy");
require(block.timestamp > get_epoch_end(1) - 1 days, "trying to shutdown too early");
_shutdown = true;
}
/*** GOVERNANCE ***/
function set_governance(address to) external override {
require(msg.sender == governance, "must be governance");
governance = to;
}
function set_base_asset_address(address to) public {
require(msg.sender == governance, "must be governance");
base_asset_address = to;
}
/*** TIME UTILITY FUNCTIONS ***/
function get_epoch_end(uint256 epoch) public view returns (uint256) {
return epoch_cycle.start_date.add(epoch.add(1).mul(epoch_cycle.duration));
}
function get_current_epoch() public view returns (uint256) {
require(block.timestamp > epoch_cycle.start_date, "before epoch 0");
return (block.timestamp - epoch_cycle.start_date) / epoch_cycle.duration;
}
function get_seconds_until_epoch_end(uint256 epoch) public view returns (uint256) {
return epoch_cycle.start_date.add(epoch.add(1).mul(epoch_cycle.duration)).sub(block.timestamp);
}
/*** GETTERS ***/
function get_epoch_cycle_params() external view override returns (uint256, uint256) {
return (epoch_cycle.start_date, epoch_cycle.duration);
}
function get_base_asset_address() external view override returns(address) {
return base_asset_address;
}
event ErcSwept(address who, address to, address token, uint256 amount);
function erc_sweep(address _token, address _to) public {
require(msg.sender == governance, "must be governance");
require(_token != base_asset_address, "cannot sweep pool assets");
IERC20 tkn = IERC20(_token);
uint256 tBal = tkn.balanceOf(address(this));
tkn.safeTransfer(_to, tBal);
emit ErcSwept(msg.sender, _to, _token, tBal);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_strategy","type":"address"},{"internalType":"address","name":"_base_asset","type":"address"},{"internalType":"address","name":"_SFI_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"new_pool_principal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"new_epoch_principal","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"new_total_dsec","type":"uint256"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"time_remaining","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dsec","type":"uint256"},{"indexed":false,"internalType":"address","name":"dsec_address","type":"address"},{"indexed":false,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tranche","type":"uint256"},{"indexed":false,"internalType":"address","name":"user_address","type":"address"},{"indexed":false,"internalType":"address","name":"principal_token_addr","type":"address"}],"name":"DsecGeneration","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"who","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ErcSwept","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"dsec_percent","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"SFI_owned","type":"uint256"}],"name":"RemoveLiquidityDsec","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"principal","type":"uint256"}],"name":"RemoveLiquidityPrincipal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previous_epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"SFI_earned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"epoch_dsec","type":"uint256"}],"name":"WindDownEpochState","type":"event"},{"inputs":[],"name":"SFI_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"SFI_earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_shutdown","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum ISaffronBase.Tranche","name":"tranche","type":"uint8"}],"name":"add_liquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"base_asset_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"dsec_token_addresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epoch_cycle","outputs":[{"internalType":"uint256","name":"start_date","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epoch_principal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epoch_wound_down","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"erc_sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"get_base_asset_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get_current_epoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get_epoch_cycle_params","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"get_epoch_end","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"get_seconds_until_epoch_end","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hourly_strategy","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"address","name":"saffron_LP_dsec_token_address","type":"address"},{"internalType":"address","name":"saffron_LP_principal_token_address","type":"address"}],"name":"new_epoch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pool_principal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"principal_token_addresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dsec_token_address","type":"address"},{"internalType":"uint256","name":"dsec_amount","type":"uint256"},{"internalType":"address","name":"principal_token_address","type":"address"},{"internalType":"uint256","name":"principal_amount","type":"uint256"}],"name":"remove_liquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"set_base_asset_address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"set_governance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shutdown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"total_dsec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"amount_sfi","type":"uint256"}],"name":"wind_down_epoch","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6004805460ff1916905560c0604052635f9ebf6060808190526212750060a081905260059190915560065534801561003657600080fd5b50604051612d6f380380612d6f8339818101604052606081101561005957600080fd5b5080516020820151604090920151600080546001600160a01b03199081163317909155600180546001600160a01b039586169083161790556002805492851692909116919091179055600480549290911661010002610100600160a81b0319909216919091179055612c9f806100d06000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c80637d179904116100f9578063cbc3db5c11610097578063ea8e496e11610071578063ea8e496e146104c3578063ebd485fc146104e0578063f034c18d146104fd578063fc0e74d114610505576101b9565b8063cbc3db5c14610432578063cfbb887114610473578063df4cbfd8146104a6576101b9565b8063a684b599116100d3578063a684b599146103fd578063a72b6c301461041a578063a8c62e7614610422578063c6b483ab1461042a576101b9565b80637d179904146103b557806380e0f15f146103d2578063837a9bc7146103f5576101b9565b80633916fcef1161016657806351d8ef231161014057806351d8ef231461034157806354d0c8a01461035e5780635aa6e675146103665780635b1caa2f1461036e576101b9565b80633916fcef146102d557806348373cc6146102f25780634c1a42591461030e576101b9565b80631816f314116101975780631816f314146102485780632a0ccc88146102695780632b666fcf1461029a576101b9565b8063070313fa146101be5780630efb8dbd146101f35780630f78dac314610222575b600080fd5b6101f1600480360360208110156101d457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661050d565b005b6102106004803603602081101561020957600080fd5b50356105da565b60408051918252519081900360200190f35b6101f16004803603604081101561023857600080fd5b508035906020013560ff16610608565b610250610b33565b6040805192835260208301919091528051918290030190f35b610271610b3c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101f1600480360360408110156102b057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610b58565b610210600480360360208110156102eb57600080fd5b5035610d8b565b6102fa610dac565b604080519115158252519081900360200190f35b6101f16004803603602081101561032457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610db5565b6102106004803603602081101561035757600080fd5b5035610db8565b610271610dc8565b610271610de4565b6101f16004803603608081101561038457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040820135169060600135610e00565b610271600480360360208110156103cb57600080fd5b5035611bb2565b6101f1600480360360408110156103e857600080fd5b5080359060200135611be9565b610210611eda565b6102fa6004803603602081101561041357600080fd5b5035611f62565b610271611f77565b610271611f93565b610210611fb4565b6101f16004803603606081101561044857600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff60208201358116916040013516611fba565b6101f16004803603602081101561048957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612284565b610210600480360360208110156104bc57600080fd5b5035612351565b610271600480360360208110156104d957600080fd5b503561237d565b610210600480360360208110156104f657600080fd5b503561238d565b61025061239d565b6101f16123a7565b60005473ffffffffffffffffffffffffffffffffffffffff16331461059357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6d75737420626520676f7665726e616e63650000000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600654600090610602906105f9906105f38560016124db565b90612556565b600554906124db565b92915050565b60045460ff161561067a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f706f6f6c2073687574646f776e00000000000000000000000000000000000000604482015290519081900360640190fd5b600081600281111561068857fe5b146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f414d4d20706f6f6c20686173206e6f207472616e636865730000000000000000604482015290519081900360640190fd5b60006106fe611eda565b90508261076c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f63616e2774206164642030000000000000000000000000000000000000000000604482015290519081900360640190fd5b806001146107db57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f76313a206d7573742062652065706f63682031206f6e6c790000000000000000604482015290519081900360640190fd5b60006107f06107e983612351565b8590612556565b60035490915061080090856124db565b600381905550610830846008848154811061081757fe5b90600052602060002001546124db90919063ffffffff16565b6008838154811061083d57fe5b906000526020600020018190555061085c816009848154811061081757fe5b6009838154811061086957fe5b60009182526020909120015560015461089a9073ffffffffffffffffffffffffffffffffffffffff163330876125c9565b600b82815481106108a757fe5b6000918252602082200154604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101859052905173ffffffffffffffffffffffffffffffffffffffff909216926340c10f199260448084019382900301818387803b15801561092257600080fd5b505af1158015610936573d6000803e3d6000fd5b50505050600c828154811061094757fe5b6000918252602082200154604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101889052905173ffffffffffffffffffffffffffffffffffffffff909216926340c10f199260448084019382900301818387803b1580156109c257600080fd5b505af11580156109d6573d6000803e3d6000fd5b505050507fc7d2d1a5a726dc6005e76316c12eb5ee642296cc38c1b996651599995a480f3c610a0483612351565b8583600b8681548110610a1357fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1686886002811115610a4257fe5b33600c8a81548110610a5057fe5b6000918252602091829020015460408051998a52918901979097528781019590955273ffffffffffffffffffffffffffffffffffffffff9384166060880152608087019290925260a0860152811660c085015290911660e083015251908190036101000190a17ff75993dbe1645872cbbea6395e1feebee76b435baf0e4d62d7eac269c6f57b2460035460088481548110610ae757fe5b906000526020600020015460098581548110610aff57fe5b906000526020600020015460405180848152602001838152602001828152602001935050505060405180910390a150505050565b60055460065482565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bde57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6d75737420626520676f7665726e616e63650000000000000000000000000000604482015290519081900360640190fd5b60015473ffffffffffffffffffffffffffffffffffffffff83811691161415610c6857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616e6e6f7420737765657020706f6f6c206173736574730000000000000000604482015290519081900360640190fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051839160009173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610cd957600080fd5b505afa158015610ced573d6000803e3d6000fd5b505050506040513d6020811015610d0357600080fd5b50519050610d2873ffffffffffffffffffffffffffffffffffffffff83168483612664565b6040805133815273ffffffffffffffffffffffffffffffffffffffff80861660208301528616818301526060810183905290517f2c4e64c7c0957a81c0076a0a3f3c7d9f0a5d6158292071c794436f829d12cfb79181900360800190a150505050565b600a8181548110610d9b57600080fd5b600091825260209091200154905081565b60045460ff1681565b50565b60098181548110610d9b57600080fd5b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000831180610e0f5750600081115b610e7a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63616e27742072656d6f76652030000000000000000000000000000000000000604482015290519081900360640190fd5b60008073ffffffffffffffffffffffffffffffffffffffff861615801590610ea25750600085115b156112ed57610eaf612bda565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600d60209081526040918290208251606081018452815460ff908116151582526001808401549483019490945260028301549194929392850192911690811115610f1157fe5b6001811115610f1c57fe5b9052508051909150610f8f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f62616c616e636520746f6b656e206c6f6f6b7570206661696c65640000000000604482015290519081900360640190fd5b604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518891889173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610fff57600080fd5b505afa158015611013573d6000803e3d6000fd5b505050506040513d602081101561102957600080fd5b5051101561109857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e73756666696369656e7420647365632062616c616e636500000000000000604482015290519081900360640190fd5b60208201516000836040015160018111156110af57fe5b1461111b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261642064736563206164647265737300000000000000000000000000000000604482015290519081900360640190fd5b8060011461118a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f76313a2062616c20746f6b656e2065706f6368206d7573742062652031000000604482015290519081900360640190fd5b60008181526007602052604090205460ff1661120757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f63616e27742072656d6f76652066726f6d20776f756e642075702065706f6368604482015290519081900360640190fd5b61123b6009828154811061121757fe5b6000918252602090912001546112358a670de0b6b3a7640000612556565b906126f6565b9350670de0b6b3a764000061127085600a848154811061125757fe5b906000526020600020015461255690919063ffffffff16565b8161127757fe5b0494506112a485600a838154811061128b57fe5b906000526020600020015461273890919063ffffffff16565b600a82815481106112b157fe5b90600052602060002001819055506112d0886009838154811061128b57fe5b600982815481106112dd57fe5b6000918252602090912001555050505b73ffffffffffffffffffffffffffffffffffffffff8416158015906113125750600083115b156116b55761131f612bda565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d60209081526040918290208251606081018452815460ff90811615158252600180840154948301949094526002830154919492939285019291169081111561138157fe5b600181111561138c57fe5b90525080519091506113ff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f62616c616e636520746f6b656e20696e666f206c6f6f6b7570206661696c6564604482015290519081900360640190fd5b604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518691869173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b15801561146f57600080fd5b505afa158015611483573d6000803e3d6000fd5b505050506040513d602081101561149957600080fd5b5051101561150857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f696e73756666696369656e74207072696e636970616c2062616c616e63650000604482015290519081900360640190fd5b602082015160018360400151600181111561151f57fe5b1461158b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6261642062616c616e636520746f6b656e206164647265737300000000000000604482015290519081900360640190fd5b806001146115fa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f76313a2062616c20746f6b656e2065706f6368206d7573742062652031000000604482015290519081900360640190fd5b60008181526007602052604090205460ff1661167757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f63616e27742072656d6f76652066726f6d20776f756e642075702065706f6368604482015290519081900360640190fd5b611688866008838154811061128b57fe5b6008828154811061169557fe5b6000918252602090912001556003546116ae9087612738565b6003555050505b73ffffffffffffffffffffffffffffffffffffffff8616158015906116da5750600085115b156118d657604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518791879173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b15801561174f57600080fd5b505afa158015611763573d6000803e3d6000fd5b505050506040513d602081101561177957600080fd5b505110156117e857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e73756666696369656e7420647365632062616c616e636500000000000000604482015290519081900360640190fd5b604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101889052905173ffffffffffffffffffffffffffffffffffffffff831691639dc29fac91604480830192600092919082900301818387803b15801561185c57600080fd5b505af1158015611870573d6000803e3d6000fd5b5050600254611899925073ffffffffffffffffffffffffffffffffffffffff1690503385612664565b604080518381526020810185905281517fb2e2b56b9ff35de42645cc5d65cfda86ee12c931be57378ea82eecaf8a33acc2929181900390910190a1505b73ffffffffffffffffffffffffffffffffffffffff8416158015906118fb5750600083115b15611aef57604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518591859173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b15801561197057600080fd5b505afa158015611984573d6000803e3d6000fd5b505050506040513d602081101561199a57600080fd5b50511015611a0957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f696e73756666696369656e74207072696e636970616c2062616c616e63650000604482015290519081900360640190fd5b604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff831691639dc29fac91604480830192600092919082900301818387803b158015611a7d57600080fd5b505af1158015611a91573d6000803e3d6000fd5b5050600154611aba925073ffffffffffffffffffffffffffffffffffffffff1690503386612664565b6040805185815290517ffbcc912eee8a56d51e3708fe32ba15f4191e6f92b2ccae4f00bbb544dba49f029181900360200190a1505b73ffffffffffffffffffffffffffffffffffffffff861615801590611b145750600085115b80611b3f575073ffffffffffffffffffffffffffffffffffffffff841615801590611b3f5750600083115b611baa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6e6f20616374696f6e20706572666f726d656400000000000000000000000000604482015290519081900360640190fd5b505050505050565b600c8181548110611bc257600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b600454610100900473ffffffffffffffffffffffffffffffffffffffff163314611c7457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d75737420626520737472617465677900000000000000000000000000000000604482015290519081900360640190fd5b60008281526007602052604090205460ff1615611cf257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f65706f636820616c726561647920776f756e6420646f776e0000000000000000604482015290519081900360640190fd5b6000611cfc611eda565b9050808310611d6c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f63616e6e6f742077696e6420646f776e206675747572652065706f6368000000604482015290519081900360640190fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101611d98816105da565b421015611e0657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f63616e27742063616c6c206265666f72652065706f636820656e646564000000604482015290519081900360640190fd5b82600a8581548110611e1457fe5b9060005260206000200181905550600060098581548110611e3157fe5b60009182526020808320909101548783526007909152604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600a80549192507fc220302e61ba656c610229ccf230eeecf82a2f57f432ab9dc62396d90f0527b69184919088908110611eab57fe5b600091825260209182902001546040805193845291830152818101849052519081900360600190a15050505050565b6005546000904211611f4d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6265666f72652065706f63682030000000000000000000000000000000000000604482015290519081900360640190fd5b600654600554420381611f5c57fe5b04905090565b60076020526000908152604090205460ff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b600454610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600854831461202a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696d70726f706572206e65772065706f63680000000000000000000000000000604482015290519081900360640190fd5b60088054600180820190925560007ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3909101819055600980548084019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01819055600a80548084019091557fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801819055600b80548084019091557f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db901805473ffffffffffffffffffffffffffffffffffffffff8681167fffffffffffffffffffffffff00000000000000000000000000000000000000009283168117909355600c80548087019091557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805491871691909216179055604080516060810182528481526020808201898152828401868152948652600d90915291909320835181549015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091821617825591518186015591516002830180549495939491939092919091169083818111156121df57fe5b021790555050604080516060810182526001808252602080830188815283850183815273ffffffffffffffffffffffffffffffffffffffff88166000908152600d90935294909120835181549015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00918216178255915181840155935160028501805494965090939092911690838181111561227857fe5b02179055505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461230a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6d75737420626520676f7665726e616e63650000000000000000000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000610602426123776105f96005600101546105f36001886124db90919063ffffffff16565b90612738565b600b8181548110611bc257600080fd5b60088181548110610d9b57600080fd5b6005546006549091565b600454610100900473ffffffffffffffffffffffffffffffffffffffff16331461243257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d75737420626520737472617465677900000000000000000000000000000000604482015290519081900360640190fd5b6201518061244060016105da565b0342116124ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f747279696e6720746f2073687574646f776e20746f6f206561726c7900000000604482015290519081900360640190fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008282018381101561254f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008261256557506000610602565b8282028284828161257257fe5b041461254f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612c1f6021913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261265e90859061277a565b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526126f190849061277a565b505050565b600061254f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612852565b600061254f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061290e565b60606127dc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166129829092919063ffffffff16565b8051909150156126f1578080602001905160208110156127fb57600080fd5b50516126f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612c40602a913960400191505060405180910390fd5b600081836128f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128bd5781810151838201526020016128a5565b50505050905090810190601f1680156128ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161290457fe5b0495945050505050565b6000818484111561297a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156128bd5781810151838201526020016128a5565b505050900390565b60606129918484600085612999565b949350505050565b6060824710156129f4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612bf96026913960400191505060405180910390fd5b6129fd85612b54565b612a6857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310612ad257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612a95565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612b34576040519150601f19603f3d011682016040523d82523d6000602084013e612b39565b606091505b5091509150612b49828286612b5a565b979650505050505050565b3b151590565b60608315612b6957508161254f565b825115612b795782518084602001fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528451602484015284518593919283926044019190850190808383600083156128bd5781810151838201526020016128a5565b6040805160608101825260008082526020820181905290918201529056fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206497190a5b666667fb50eec3c316949044d824a8a4349aea062ff5bb3a633ed164736f6c63430007040033000000000000000000000000257bbc6241cf0054b2307d01b2b326d235be8fa10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b753428af26e81097e7fd17f40c88aaa3e04902c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101b95760003560e01c80637d179904116100f9578063cbc3db5c11610097578063ea8e496e11610071578063ea8e496e146104c3578063ebd485fc146104e0578063f034c18d146104fd578063fc0e74d114610505576101b9565b8063cbc3db5c14610432578063cfbb887114610473578063df4cbfd8146104a6576101b9565b8063a684b599116100d3578063a684b599146103fd578063a72b6c301461041a578063a8c62e7614610422578063c6b483ab1461042a576101b9565b80637d179904146103b557806380e0f15f146103d2578063837a9bc7146103f5576101b9565b80633916fcef1161016657806351d8ef231161014057806351d8ef231461034157806354d0c8a01461035e5780635aa6e675146103665780635b1caa2f1461036e576101b9565b80633916fcef146102d557806348373cc6146102f25780634c1a42591461030e576101b9565b80631816f314116101975780631816f314146102485780632a0ccc88146102695780632b666fcf1461029a576101b9565b8063070313fa146101be5780630efb8dbd146101f35780630f78dac314610222575b600080fd5b6101f1600480360360208110156101d457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661050d565b005b6102106004803603602081101561020957600080fd5b50356105da565b60408051918252519081900360200190f35b6101f16004803603604081101561023857600080fd5b508035906020013560ff16610608565b610250610b33565b6040805192835260208301919091528051918290030190f35b610271610b3c565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101f1600480360360408110156102b057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610b58565b610210600480360360208110156102eb57600080fd5b5035610d8b565b6102fa610dac565b604080519115158252519081900360200190f35b6101f16004803603602081101561032457600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610db5565b6102106004803603602081101561035757600080fd5b5035610db8565b610271610dc8565b610271610de4565b6101f16004803603608081101561038457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040820135169060600135610e00565b610271600480360360208110156103cb57600080fd5b5035611bb2565b6101f1600480360360408110156103e857600080fd5b5080359060200135611be9565b610210611eda565b6102fa6004803603602081101561041357600080fd5b5035611f62565b610271611f77565b610271611f93565b610210611fb4565b6101f16004803603606081101561044857600080fd5b5080359073ffffffffffffffffffffffffffffffffffffffff60208201358116916040013516611fba565b6101f16004803603602081101561048957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16612284565b610210600480360360208110156104bc57600080fd5b5035612351565b610271600480360360208110156104d957600080fd5b503561237d565b610210600480360360208110156104f657600080fd5b503561238d565b61025061239d565b6101f16123a7565b60005473ffffffffffffffffffffffffffffffffffffffff16331461059357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6d75737420626520676f7665726e616e63650000000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600654600090610602906105f9906105f38560016124db565b90612556565b600554906124db565b92915050565b60045460ff161561067a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f706f6f6c2073687574646f776e00000000000000000000000000000000000000604482015290519081900360640190fd5b600081600281111561068857fe5b146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f414d4d20706f6f6c20686173206e6f207472616e636865730000000000000000604482015290519081900360640190fd5b60006106fe611eda565b90508261076c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f63616e2774206164642030000000000000000000000000000000000000000000604482015290519081900360640190fd5b806001146107db57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f76313a206d7573742062652065706f63682031206f6e6c790000000000000000604482015290519081900360640190fd5b60006107f06107e983612351565b8590612556565b60035490915061080090856124db565b600381905550610830846008848154811061081757fe5b90600052602060002001546124db90919063ffffffff16565b6008838154811061083d57fe5b906000526020600020018190555061085c816009848154811061081757fe5b6009838154811061086957fe5b60009182526020909120015560015461089a9073ffffffffffffffffffffffffffffffffffffffff163330876125c9565b600b82815481106108a757fe5b6000918252602082200154604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101859052905173ffffffffffffffffffffffffffffffffffffffff909216926340c10f199260448084019382900301818387803b15801561092257600080fd5b505af1158015610936573d6000803e3d6000fd5b50505050600c828154811061094757fe5b6000918252602082200154604080517f40c10f1900000000000000000000000000000000000000000000000000000000815233600482015260248101889052905173ffffffffffffffffffffffffffffffffffffffff909216926340c10f199260448084019382900301818387803b1580156109c257600080fd5b505af11580156109d6573d6000803e3d6000fd5b505050507fc7d2d1a5a726dc6005e76316c12eb5ee642296cc38c1b996651599995a480f3c610a0483612351565b8583600b8681548110610a1357fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1686886002811115610a4257fe5b33600c8a81548110610a5057fe5b6000918252602091829020015460408051998a52918901979097528781019590955273ffffffffffffffffffffffffffffffffffffffff9384166060880152608087019290925260a0860152811660c085015290911660e083015251908190036101000190a17ff75993dbe1645872cbbea6395e1feebee76b435baf0e4d62d7eac269c6f57b2460035460088481548110610ae757fe5b906000526020600020015460098581548110610aff57fe5b906000526020600020015460405180848152602001838152602001828152602001935050505060405180910390a150505050565b60055460065482565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bde57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6d75737420626520676f7665726e616e63650000000000000000000000000000604482015290519081900360640190fd5b60015473ffffffffffffffffffffffffffffffffffffffff83811691161415610c6857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f63616e6e6f7420737765657020706f6f6c206173736574730000000000000000604482015290519081900360640190fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051839160009173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610cd957600080fd5b505afa158015610ced573d6000803e3d6000fd5b505050506040513d6020811015610d0357600080fd5b50519050610d2873ffffffffffffffffffffffffffffffffffffffff83168483612664565b6040805133815273ffffffffffffffffffffffffffffffffffffffff80861660208301528616818301526060810183905290517f2c4e64c7c0957a81c0076a0a3f3c7d9f0a5d6158292071c794436f829d12cfb79181900360800190a150505050565b600a8181548110610d9b57600080fd5b600091825260209091200154905081565b60045460ff1681565b50565b60098181548110610d9b57600080fd5b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000831180610e0f5750600081115b610e7a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63616e27742072656d6f76652030000000000000000000000000000000000000604482015290519081900360640190fd5b60008073ffffffffffffffffffffffffffffffffffffffff861615801590610ea25750600085115b156112ed57610eaf612bda565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600d60209081526040918290208251606081018452815460ff908116151582526001808401549483019490945260028301549194929392850192911690811115610f1157fe5b6001811115610f1c57fe5b9052508051909150610f8f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f62616c616e636520746f6b656e206c6f6f6b7570206661696c65640000000000604482015290519081900360640190fd5b604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518891889173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610fff57600080fd5b505afa158015611013573d6000803e3d6000fd5b505050506040513d602081101561102957600080fd5b5051101561109857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e73756666696369656e7420647365632062616c616e636500000000000000604482015290519081900360640190fd5b60208201516000836040015160018111156110af57fe5b1461111b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261642064736563206164647265737300000000000000000000000000000000604482015290519081900360640190fd5b8060011461118a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f76313a2062616c20746f6b656e2065706f6368206d7573742062652031000000604482015290519081900360640190fd5b60008181526007602052604090205460ff1661120757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f63616e27742072656d6f76652066726f6d20776f756e642075702065706f6368604482015290519081900360640190fd5b61123b6009828154811061121757fe5b6000918252602090912001546112358a670de0b6b3a7640000612556565b906126f6565b9350670de0b6b3a764000061127085600a848154811061125757fe5b906000526020600020015461255690919063ffffffff16565b8161127757fe5b0494506112a485600a838154811061128b57fe5b906000526020600020015461273890919063ffffffff16565b600a82815481106112b157fe5b90600052602060002001819055506112d0886009838154811061128b57fe5b600982815481106112dd57fe5b6000918252602090912001555050505b73ffffffffffffffffffffffffffffffffffffffff8416158015906113125750600083115b156116b55761131f612bda565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600d60209081526040918290208251606081018452815460ff90811615158252600180840154948301949094526002830154919492939285019291169081111561138157fe5b600181111561138c57fe5b90525080519091506113ff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f62616c616e636520746f6b656e20696e666f206c6f6f6b7570206661696c6564604482015290519081900360640190fd5b604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518691869173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b15801561146f57600080fd5b505afa158015611483573d6000803e3d6000fd5b505050506040513d602081101561149957600080fd5b5051101561150857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f696e73756666696369656e74207072696e636970616c2062616c616e63650000604482015290519081900360640190fd5b602082015160018360400151600181111561151f57fe5b1461158b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6261642062616c616e636520746f6b656e206164647265737300000000000000604482015290519081900360640190fd5b806001146115fa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f76313a2062616c20746f6b656e2065706f6368206d7573742062652031000000604482015290519081900360640190fd5b60008181526007602052604090205460ff1661167757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f63616e27742072656d6f76652066726f6d20776f756e642075702065706f6368604482015290519081900360640190fd5b611688866008838154811061128b57fe5b6008828154811061169557fe5b6000918252602090912001556003546116ae9087612738565b6003555050505b73ffffffffffffffffffffffffffffffffffffffff8616158015906116da5750600085115b156118d657604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518791879173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b15801561174f57600080fd5b505afa158015611763573d6000803e3d6000fd5b505050506040513d602081101561177957600080fd5b505110156117e857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e73756666696369656e7420647365632062616c616e636500000000000000604482015290519081900360640190fd5b604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101889052905173ffffffffffffffffffffffffffffffffffffffff831691639dc29fac91604480830192600092919082900301818387803b15801561185c57600080fd5b505af1158015611870573d6000803e3d6000fd5b5050600254611899925073ffffffffffffffffffffffffffffffffffffffff1690503385612664565b604080518381526020810185905281517fb2e2b56b9ff35de42645cc5d65cfda86ee12c931be57378ea82eecaf8a33acc2929181900390910190a1505b73ffffffffffffffffffffffffffffffffffffffff8416158015906118fb5750600083115b15611aef57604080517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290518591859173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b15801561197057600080fd5b505afa158015611984573d6000803e3d6000fd5b505050506040513d602081101561199a57600080fd5b50511015611a0957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f696e73756666696369656e74207072696e636970616c2062616c616e63650000604482015290519081900360640190fd5b604080517f9dc29fac00000000000000000000000000000000000000000000000000000000815233600482015260248101869052905173ffffffffffffffffffffffffffffffffffffffff831691639dc29fac91604480830192600092919082900301818387803b158015611a7d57600080fd5b505af1158015611a91573d6000803e3d6000fd5b5050600154611aba925073ffffffffffffffffffffffffffffffffffffffff1690503386612664565b6040805185815290517ffbcc912eee8a56d51e3708fe32ba15f4191e6f92b2ccae4f00bbb544dba49f029181900360200190a1505b73ffffffffffffffffffffffffffffffffffffffff861615801590611b145750600085115b80611b3f575073ffffffffffffffffffffffffffffffffffffffff841615801590611b3f5750600083115b611baa57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6e6f20616374696f6e20706572666f726d656400000000000000000000000000604482015290519081900360640190fd5b505050505050565b600c8181548110611bc257600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b600454610100900473ffffffffffffffffffffffffffffffffffffffff163314611c7457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d75737420626520737472617465677900000000000000000000000000000000604482015290519081900360640190fd5b60008281526007602052604090205460ff1615611cf257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f65706f636820616c726561647920776f756e6420646f776e0000000000000000604482015290519081900360640190fd5b6000611cfc611eda565b9050808310611d6c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f63616e6e6f742077696e6420646f776e206675747572652065706f6368000000604482015290519081900360640190fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101611d98816105da565b421015611e0657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f63616e27742063616c6c206265666f72652065706f636820656e646564000000604482015290519081900360640190fd5b82600a8581548110611e1457fe5b9060005260206000200181905550600060098581548110611e3157fe5b60009182526020808320909101548783526007909152604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600a80549192507fc220302e61ba656c610229ccf230eeecf82a2f57f432ab9dc62396d90f0527b69184919088908110611eab57fe5b600091825260209182902001546040805193845291830152818101849052519081900360600190a15050505050565b6005546000904211611f4d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6265666f72652065706f63682030000000000000000000000000000000000000604482015290519081900360640190fd5b600654600554420381611f5c57fe5b04905090565b60076020526000908152604090205460ff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b600454610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b600854831461202a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696d70726f706572206e65772065706f63680000000000000000000000000000604482015290519081900360640190fd5b60088054600180820190925560007ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3909101819055600980548084019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af01819055600a80548084019091557fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801819055600b80548084019091557f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db901805473ffffffffffffffffffffffffffffffffffffffff8681167fffffffffffffffffffffffff00000000000000000000000000000000000000009283168117909355600c80548087019091557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805491871691909216179055604080516060810182528481526020808201898152828401868152948652600d90915291909320835181549015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091821617825591518186015591516002830180549495939491939092919091169083818111156121df57fe5b021790555050604080516060810182526001808252602080830188815283850183815273ffffffffffffffffffffffffffffffffffffffff88166000908152600d90935294909120835181549015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00918216178255915181840155935160028501805494965090939092911690838181111561227857fe5b02179055505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461230a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6d75737420626520676f7665726e616e63650000000000000000000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000610602426123776105f96005600101546105f36001886124db90919063ffffffff16565b90612738565b600b8181548110611bc257600080fd5b60088181548110610d9b57600080fd5b6005546006549091565b600454610100900473ffffffffffffffffffffffffffffffffffffffff16331461243257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6d75737420626520737472617465677900000000000000000000000000000000604482015290519081900360640190fd5b6201518061244060016105da565b0342116124ae57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f747279696e6720746f2073687574646f776e20746f6f206561726c7900000000604482015290519081900360640190fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008282018381101561254f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008261256557506000610602565b8282028284828161257257fe5b041461254f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612c1f6021913960400191505060405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261265e90859061277a565b50505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526126f190849061277a565b505050565b600061254f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612852565b600061254f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061290e565b60606127dc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166129829092919063ffffffff16565b8051909150156126f1578080602001905160208110156127fb57600080fd5b50516126f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612c40602a913960400191505060405180910390fd5b600081836128f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128bd5781810151838201526020016128a5565b50505050905090810190601f1680156128ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161290457fe5b0495945050505050565b6000818484111561297a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156128bd5781810151838201526020016128a5565b505050900390565b60606129918484600085612999565b949350505050565b6060824710156129f4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612bf96026913960400191505060405180910390fd5b6129fd85612b54565b612a6857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310612ad257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101612a95565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612b34576040519150601f19603f3d011682016040523d82523d6000602084013e612b39565b606091505b5091509150612b49828286612b5a565b979650505050505050565b3b151590565b60608315612b6957508161254f565b825115612b795782518084602001fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528451602484015284518593919283926044019190850190808383600083156128bd5781810151838201526020016128a5565b6040805160608101825260008082526020820181905290918201529056fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206497190a5b666667fb50eec3c316949044d824a8a4349aea062ff5bb3a633ed164736f6c63430007040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000257bbc6241cf0054b2307d01b2b326d235be8fa10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b753428af26e81097e7fd17f40c88aaa3e04902c
-----Decoded View---------------
Arg [0] : _strategy (address): 0x257BBc6241cf0054B2307D01b2b326D235BE8FA1
Arg [1] : _base_asset (address): 0x0000000000000000000000000000000000000000
Arg [2] : _SFI_address (address): 0xb753428af26E81097e7fD17f40c88aaA3E04902c
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000257bbc6241cf0054b2307d01b2b326d235be8fa1
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 000000000000000000000000b753428af26e81097e7fd17f40c88aaa3e04902c
Deployed Bytecode Sourcemap
35073:11628:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45040:144;;;;;;;;;;;;;;;;-1:-1:-1;45040:144:0;;;;:::i;:::-;;45381:154;;;;;;;;;;;;;;;;-1:-1:-1;45381:154:0;;:::i;:::-;;;;;;;;;;;;;;;;38577:1597;;;;;;;;;;;;;;;;-1:-1:-1;38577:1597:0;;;;;;;;;:::i;35725:164::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;35376:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;46330:368;;;;;;;;;;;;;;;;-1:-1:-1;46330:368:0;;;;;;;;;;;:::i;36221:27::-;;;;;;;;;;;;;;;;-1:-1:-1;36221:27:0;;:::i;35522:29::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;44712:76;;;;;;;;;;;;;;;;-1:-1:-1;44712:76:0;;;;:::i;36143:27::-;;;;;;;;;;;;;;;;-1:-1:-1;36143:27:0;;:::i;35282:33::-;;;:::i;35188:25::-;;;:::i;41110:3596::-;;;;;;;;;;;;;;;;-1:-1:-1;41110:3596:0;;;;;;;;;;;;;;;;;;;;;:::i;36394:42::-;;;;;;;;;;;;;;;;-1:-1:-1;36394:42:0;;:::i;40275:704::-;;;;;;;;;;;;;;;;-1:-1:-1;40275:704:0;;;;;;;:::i;45541:218::-;;;:::i;35896:46::-;;;;;;;;;;;;;;;;-1:-1:-1;35896:46:0;;:::i;46137:112::-;;;:::i;35673:23::-;;;:::i;35429:29::-;;;:::i;37161:966::-;;;;;;;;;;;;;;;;-1:-1:-1;37161:966:0;;;;;;;;;;;;;;;;:::i;45190:149::-;;;;;;;;;;;;;;;;-1:-1:-1;45190:149:0;;;;:::i;45765:189::-;;;;;;;;;;;;;;;;-1:-1:-1;45765:189:0;;:::i;36316:37::-;;;;;;;;;;;;;;;;-1:-1:-1;36316:37:0;;:::i;36044:32::-;;;;;;;;;;;;;;;;-1:-1:-1;36044:32:0;;:::i;45981:150::-;;;:::i;44794:216::-;;;:::i;45040:144::-;45123:10;;;;45109;:24;45101:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45163:10;:15;;;;;;;;;;;;;;;45040:144::o;45381:154::-;45507:20;;45440:7;;45463:66;;45490:38;;:12;:5;45507:20;45490:9;:12::i;:::-;:16;;:38::i;:::-;45463:11;:22;;:26;:66::i;:::-;45456:73;45381:154;-1:-1:-1;;45381:154:0:o;38577:1597::-;38667:9;;;;38666:10;38658:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38720:9;38709:7;:20;;;;;;;;;38701:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38765:13;38781:19;:17;:19::i;:::-;38765:35;-1:-1:-1;38815:11:0;38807:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38857:5;38866:1;38857:10;38849:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38967:12;38982:46;38993:34;39021:5;38993:27;:34::i;:::-;38982:6;;:10;:46::i;:::-;39108:14;;38967:61;;-1:-1:-1;39108:26:0;;39127:6;39108:18;:26::i;:::-;39091:14;:43;;;;39241:34;39268:6;39241:15;39257:5;39241:22;;;;;;;;;;;;;;;;:26;;:34;;;;:::i;:::-;39216:15;39232:5;39216:22;;;;;;;;;;;;;;;:59;;;;39411:27;39433:4;39411:10;39422:5;39411:17;;;;;;;:27;39391:10;39402:5;39391:17;;;;;;;;;;;;;;;;;:47;39508:18;;39501:78;;39508:18;;39545:10;39565:4;39572:6;39501:43;:78::i;:::-;39686:20;39707:5;39686:27;;;;;;;;;;;;;;;;;39664:73;;;;;;39720:10;39664:73;;;;;;;;;;;;39686:27;;;;;39664:55;;:73;;;;;;;;;;39686:27;;39664:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39849:25;39875:5;39849:32;;;;;;;;;;;;;;;;;39827:80;;;;;;39888:10;39827:80;;;;;;;;;;;;39849:32;;;;;39827:60;;:80;;;;;;;;;;39849:32;;39827:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39921:164;39936:34;39964:5;39936:27;:34::i;:::-;39972:6;39980:4;39986:20;40007:5;39986:27;;;;;;;;;;;;;;;;;;;;40015:5;40030:7;40022:16;;;;;;;;40040:10;40052:25;40078:5;40052:32;;;;;;;;;;;;;;;;;;;39921:164;;;;;;;;;;;;;;;;;;;;40052:32;39921:164;;;;;;;;;;;;;;;;;;;;;;;;40052:32;;;39921:164;;;;;;;;;40052:32;39921:164;;;40097:71;40110:14;;40126:15;40142:5;40126:22;;;;;;;;;;;;;;;;40150:10;40161:5;40150:17;;;;;;;;;;;;;;;;40097:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38577:1597;;;;:::o;35725:164::-;;;;;;:::o;35376:26::-;;;;;;:::o;46330:368::-;46414:10;;;;46400;:24;46392:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46472:18;;;46462:28;;;46472:18;;46462:28;;46454:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46577:28;;;;;;46599:4;46577:28;;;;;;46548:6;;46528:10;;46577:13;;;;;;:28;;;;;;;;;;;;;;:13;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;46577:28:0;;-1:-1:-1;46612:27:0;:16;;;46629:3;46577:28;46612:16;:27::i;:::-;46653:39;;;46662:10;46653:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46330:368;;;;:::o;36221:27::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36221:27:0;:::o;35522:29::-;;;;;;:::o;44712:76::-;;:::o;36143:27::-;;;;;;;;;;;;35282:33;;;;;;:::o;35188:25::-;;;;;;:::o;41110:3596::-;41291:1;41277:11;:15;:39;;;;41315:1;41296:16;:20;41277:39;41269:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41342:17;;41447:34;;;;;;;:53;;;41499:1;41485:11;:15;41447:53;41443:1168;;;41596:39;;:::i;:::-;41638:41;;;;;;;:21;:41;;;;;;;;;41596:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41638:41;;41596:83;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41696:17:0;;41596:83;;-1:-1:-1;41688:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41840:25;;;;;;41854:10;41840:25;;;;;;41804:18;;41869:11;;41840:13;;;;;;:25;;;;;;;;;;;;;;:13;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;41840:25:0;:40;;41832:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41986:16;;;;41964:19;42019:10;:21;;;:41;;;;;;;;;42011:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42098:11;42113:1;42098:16;42090:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42165:29;;;;:16;:29;;;;;;;;42157:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42330:53;42359:10;42370:11;42359:23;;;;;;;;;;;;;;;;;;42330:24;:11;42346:7;42330:15;:24::i;:::-;:28;;:53::i;:::-;42315:68;;42448:7;42404:41;42432:12;42404:10;42415:11;42404:23;;;;;;;;;;;;;;;;:27;;:41;;;;:::i;:::-;:51;;;;;;42392:63;;42490:38;42518:9;42490:10;42501:11;42490:23;;;;;;;;;;;;;;;;:27;;:38;;;;:::i;:::-;42464:10;42475:11;42464:23;;;;;;;;;;;;;;;:64;;;;42563:40;42591:11;42563:10;42574:11;42563:23;;;;;;;:40;42537:10;42548:11;42537:23;;;;;;;;;;;;;;;;;:66;-1:-1:-1;;;41443:1168:0;42676:39;;;;;;;:63;;;42738:1;42719:16;:20;42676:63;42672:999;;;42835:39;;:::i;:::-;42877:46;;;;;;;:21;:46;;;;;;;;;42835:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;42877:46;;42835:88;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;42940:17:0;;42835:88;;-1:-1:-1;42932:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43094:25;;;;;;43108:10;43094:25;;;;;;43053:23;;43123:16;;43094:13;;;;;;:25;;;;;;;;;;;;;;:13;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43094:25:0;:45;;43086:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43250:16;;;;43308:21;43283:10;:21;;;:46;;;;;;;;;43275:84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43376:11;43391:1;43376:16;43368:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43443:29;;;;:16;:29;;;;;;;;43435:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43551:50;43584:16;43551:15;43567:11;43551:28;;;;;;;:50;43520:15;43536:11;43520:28;;;;;;;;;;;;;;;;;:81;43627:14;;:36;;43646:16;43627:18;:36::i;:::-;43610:14;:53;-1:-1:-1;;;42672:999:0;43700:34;;;;;;;:53;;;43752:1;43738:11;:15;43700:53;43696:396;;;43850:25;;;;;;43864:10;43850:25;;;;;;43814:18;;43879:11;;43850:13;;;;;;:25;;;;;;;;;;;;;;:13;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;43850:25:0;:40;;43842:78;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;43929:33;;;;;;43938:10;43929:33;;;;;;;;;;;;:8;;;;;;:33;;;;;-1:-1:-1;;43929:33:0;;;;;;;-1:-1:-1;43929:8:0;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;43978:11:0;;43971:55;;-1:-1:-1;43978:11:0;;;-1:-1:-1;44004:10:0;44016:9;43971:32;:55::i;:::-;44040:44;;;;;;;;;;;;;;;;;;;;;;;;;43696:396;;44102:39;;;;;;;:63;;;44164:1;44145:16;:20;44102:63;44098:438;;;44267:25;;;;;;44281:10;44267:25;;;;;;44226:23;;44296:16;;44267:13;;;;;;:25;;;;;;;;;;;;;;:13;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;44267:25:0;:45;;44259:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;44356:38;;;;;;44365:10;44356:38;;;;;;;;;;;;:8;;;;;;:38;;;;;-1:-1:-1;;44356:38:0;;;;;;;-1:-1:-1;44356:8:0;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;44410:18:0;;44403:69;;-1:-1:-1;44410:18:0;;;-1:-1:-1;44443:10:0;44455:16;44403:39;:69::i;:::-;44486:42;;;;;;;;;;;;;;;;;44098:438;;44553:34;;;;;;;:53;;;44605:1;44591:11;:15;44553:53;44552:124;;;-1:-1:-1;44612:39:0;;;;;;;:63;;;44674:1;44655:16;:20;44612:63;44544:156;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;41110:3596;;;;;;:::o;36394:42::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36394:42:0;:::o;40275:704::-;40388:8;;;;;;;40366:10;:31;40358:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40434:23;;;;:16;:23;;;;;;;;40433:24;40425:61;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40493:21;40517:19;:17;:19::i;:::-;40493:43;;40559:13;40551:5;:21;40543:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40640:17;;;40691:29;40640:17;40691:13;:29::i;:::-;40672:15;:48;;40664:90;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40783:10;40763;40774:5;40763:17;;;;;;;;;;;;;;;:30;;;;40821:18;40842:10;40853:5;40842:17;;;;;;;;;;;;;;;;;;;;40866:23;;;:16;:23;;;;;;;:30;;;;40892:4;40866:30;;;40943:10;:17;;40842;;-1:-1:-1;40908:65:0;;40927:14;;40943:10;40883:5;;40943:17;;;;;;;;;;;;;;;;;40908:65;;;;;;;;;;;;;;;;;;;;;;;;;40275:704;;;;;:::o;45541:218::-;45633:11;:22;45591:7;;45615:15;:40;45607:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45733:20;;:11;45707:22;45689:15;:40;45733:20;45688:65;;;;;45681:72;;45541:218;:::o;35896:46::-;;;;;;;;;;;;;;;:::o;46137:112::-;46225:18;;;;46137:112;:::o;35673:23::-;;;;;;;;;:::o;35429:29::-;;;;:::o;37161:966::-;37300:15;:22;:31;;37292:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37363:15;:23;;;;;;;;;-1:-1:-1;37363:23:0;;;;;;;37393:10;:18;;;;;;;;;;;;;37418:10;:18;;;;;;;;;;;;;37445:20;:56;;;;;;;;;;;;;;;;;;;;;;;;;37508:25;:66;;;;;;;;;;;;;;;;;;;;;;37731:109;;;;;;;;;;;37363:23;37731:109;;;;;;;;;;;;37676:52;;;:21;:52;;;;;;;:164;;;;;;;;;;;;;;;;;;;;;;;;;;;37731:109;;37676:52;;:164;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;38007:114:0;;;;;;;;38046:4;38007:114;;;;;;;;;;;;;;;;37947:57;;;-1:-1:-1;37947:57:0;;;:21;:57;;;;;;;:174;;;;;;;;;;;;;;;;;;;;;;;;;;;38007:114;;-1:-1:-1;37947:174:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;37161:966:0:o;45190:149::-;45270:10;;;;45256;:24;45248:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45310:18;:23;;;;;;;;;;;;;;;45190:149::o;45765:189::-;45838:7;45861:87;45932:15;45861:66;45888:38;45905:11;:20;;;45888:12;45898:1;45888:5;:9;;:12;;;;:::i;45861:66::-;:70;;:87::i;36316:37::-;;;;;;;;;;;;36044:32;;;;;;;;;;;;45981:150;46080:11;:22;46104:20;;45981:150;;:::o;44794:216::-;44861:8;;;;;;;44847:10;:22;44839:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;44942:6;44923:16;44937:1;44923:13;:16::i;:::-;:25;44905:15;:43;44897:84;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;44988:9;:16;;;;45000:4;44988:16;;;44794:216::o;2126:181::-;2184:7;2216:5;;;2240:6;;;;2232:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2298:1;2126:181;-1:-1:-1;;;2126:181:0:o;3480:471::-;3538:7;3783:6;3779:47;;-1:-1:-1;3813:1:0;3806:8;;3779:47;3850:5;;;3854:1;3850;:5;:1;3874:5;;;;;:10;3866:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30123:199;30247:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30270:27;30247:68;;;30220:96;;30240:5;;30220:19;:96::i;:::-;30123:199;;;;:::o;29946:171::-;30052:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30075:23;30052:58;;;30025:86;;30045:5;;30025:19;:86::i;:::-;29946:171;;;:::o;4427:132::-;4485:7;4512:39;4516:1;4519;4512:39;;;;;;;;;;;;;;;;;:3;:39::i;2590:136::-;2648:7;2675:43;2679:1;2682;2675:43;;;;;;;;;;;;;;;;;:3;:43::i;32147:723::-;32555:23;32581:69;32609:4;32581:69;;;;;;;;;;;;;;;;;32589:5;32581:27;;;;:69;;;;;:::i;:::-;32661:17;;32555:95;;-1:-1:-1;32661:21:0;32657:208;;32791:10;32780:30;;;;;;;;;;;;;;;-1:-1:-1;32780:30:0;32772:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5055:278;5141:7;5176:12;5169:5;5161:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5200:9;5216:1;5212;:5;;;;;;;5055:278;-1:-1:-1;;;;;5055:278:0:o;3029:192::-;3115:7;3151:12;3143:6;;;;3135:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3187:5:0;;;3029:192::o;13997:195::-;14100:12;14132:52;14154:6;14162:4;14168:1;14171:12;14132:21;:52::i;:::-;14125:59;13997:195;-1:-1:-1;;;;13997:195:0:o;15049:530::-;15176:12;15234:5;15209:21;:30;;15201:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15301:18;15312:6;15301:10;:18::i;:::-;15293:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15427:12;15441:23;15468:6;:11;;15488:5;15496:4;15468:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15426:75;;;;15519:52;15537:7;15546:10;15558:12;15519:17;:52::i;:::-;15512:59;15049:530;-1:-1:-1;;;;;;;15049:530:0:o;11077:422::-;11444:20;11483:8;;;11077:422::o;17589:742::-;17704:12;17733:7;17729:595;;;-1:-1:-1;17764:10:0;17757:17;;17729:595;17878:17;;:21;17874:439;;18141:10;18135:17;18202:15;18189:10;18185:2;18181:19;18174:44;18089:148;18277:20;;;;;;;;;;;;;;;;;;;;18284:12;;18277:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;:::o
Swarm Source
ipfs://6497190a5b666667fb50eec3c316949044d824a8a4349aea062ff5bb3a633ed1
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 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.