More Info
Private Name Tags
ContractCreator
TokenTracker
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Contract Name:
LiquidityGaugeV3
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/ILiquidityGauge.sol"; import "../interfaces/IChessSchedule.sol"; import "../interfaces/IChessController.sol"; import "../interfaces/IFundV3.sol"; import "../interfaces/ITrancheIndexV2.sol"; import "../interfaces/IStableSwap.sol"; import "../interfaces/IVotingEscrow.sol"; import "../utils/CoreUtility.sol"; import "../utils/SafeDecimalMath.sol"; interface ISwapBonus { function bonusToken() external view returns (address); function getBonus() external returns (uint256); } contract LiquidityGaugeV3 is ILiquidityGauge, ITrancheIndexV2, CoreUtility, ERC20 { using Math for uint256; using SafeMath for uint256; using SafeDecimalMath for uint256; using SafeERC20 for IERC20; uint256 private constant MAX_ITERATIONS = 500; uint256 private constant MAX_BOOSTING_FACTOR = 3e18; uint256 private constant MAX_BOOSTING_FACTOR_MINUS_ONE = MAX_BOOSTING_FACTOR - 1e18; address public immutable stableSwap; IERC20 private immutable _quoteToken; IChessSchedule public immutable chessSchedule; IChessController public immutable chessController; IFundV3 public immutable fund; IVotingEscrow private immutable _votingEscrow; address public immutable swapBonus; IERC20 private immutable _bonusToken; uint256 private _workingSupply; mapping(address => uint256) private _workingBalances; uint256 private _chessIntegral; uint256 private _chessIntegralTimestamp; mapping(address => uint256) private _chessUserIntegrals; mapping(address => uint256) private _claimableChess; uint256 private _bonusIntegral; mapping(address => uint256) private _bonusUserIntegral; mapping(address => uint256) private _claimableBonus; /// @dev Per-gauge CHESS emission rate. The product of CHESS emission rate /// and weekly percentage of the gauge uint256 private _rate; constructor( string memory name_, string memory symbol_, address stableSwap_, address chessSchedule_, address chessController_, address fund_, address votingEscrow_, address swapBonus_ ) public ERC20(name_, symbol_) { stableSwap = stableSwap_; _quoteToken = IERC20(IStableSwap(stableSwap_).quoteAddress()); chessSchedule = IChessSchedule(chessSchedule_); chessController = IChessController(chessController_); fund = IFundV3(fund_); _votingEscrow = IVotingEscrow(votingEscrow_); swapBonus = swapBonus_; _bonusToken = IERC20(ISwapBonus(swapBonus_).bonusToken()); _chessIntegralTimestamp = block.timestamp; } modifier onlyStableSwap() { require(msg.sender == stableSwap, "Only stable swap"); _; } function getRate() external view returns (uint256) { return _rate / 1e18; } function mint(address account, uint256 amount) external override onlyStableSwap { uint256 oldWorkingBalance = _workingBalances[account]; uint256 oldWorkingSupply = _workingSupply; _checkpoint(account, oldWorkingBalance, oldWorkingSupply); _mint(account, amount); _updateWorkingBalance(account, oldWorkingBalance, oldWorkingSupply, balanceOf(account)); } function burnFrom(address account, uint256 amount) external override onlyStableSwap { uint256 oldWorkingBalance = _workingBalances[account]; uint256 oldWorkingSupply = _workingSupply; _checkpoint(account, oldWorkingBalance, oldWorkingSupply); _burn(account, amount); _updateWorkingBalance(account, oldWorkingBalance, oldWorkingSupply, balanceOf(account)); } function _transfer(address from, address to, uint256 amount) internal override { uint256 oldWorkingBalanceFrom = _workingBalances[from]; uint256 oldWorkingBalanceTo = _workingBalances[to]; uint256 oldWorkingSupply = _workingSupply; _checkpoint(from, oldWorkingBalanceFrom, oldWorkingSupply); _checkpoint(to, oldWorkingBalanceTo, oldWorkingSupply); super._transfer(from, to, amount); _updateWorkingBalance(from, oldWorkingBalanceFrom, oldWorkingSupply, balanceOf(from)); _updateWorkingBalance(to, oldWorkingBalanceTo, oldWorkingSupply, balanceOf(to)); } function workingBalanceOf(address account) external view override returns (uint256) { return _workingBalances[account]; } function workingSupply() external view override returns (uint256) { return _workingSupply; } function claimableRewards( address account ) external override returns (uint256 chessAmount, uint256 bonusAmount, uint256, uint256, uint256, uint256) { (chessAmount, bonusAmount) = _checkpoint( account, _workingBalances[account], _workingSupply ); } function claimRewards(address account) external override { uint256 balance = balanceOf(account); uint256 oldWorkingBalance = _workingBalances[account]; uint256 oldWorkingSupply = _workingSupply; (uint256 chessAmount, uint256 bonusAmount) = _checkpoint( account, oldWorkingBalance, oldWorkingSupply ); _updateWorkingBalance(account, oldWorkingBalance, oldWorkingSupply, balance); if (chessAmount != 0) { chessSchedule.mint(account, chessAmount); delete _claimableChess[account]; } if (bonusAmount != 0) { _bonusToken.safeTransfer(account, bonusAmount); delete _claimableBonus[account]; } } function syncWithVotingEscrow(address account) external { uint256 balance = balanceOf(account); uint256 oldWorkingBalance = _workingBalances[account]; uint256 oldWorkingSupply = _workingSupply; _checkpoint(account, oldWorkingBalance, oldWorkingSupply); _updateWorkingBalance(account, oldWorkingBalance, oldWorkingSupply, balance); } function distribute(uint256, uint256, uint256, uint256, uint256) external override { revert("Not implemented"); } function _updateWorkingBalance( address account, uint256 oldWorkingBalance, uint256 oldWorkingSupply, uint256 newBalance ) private { uint256 newWorkingBalance = newBalance; uint256 veBalance = _votingEscrow.balanceOf(account); if (veBalance > 0) { uint256 veTotalSupply = _votingEscrow.totalSupply(); uint256 maxWorkingBalance = newWorkingBalance.multiplyDecimal(MAX_BOOSTING_FACTOR); uint256 boostedWorkingBalance = newWorkingBalance.add( totalSupply().mul(veBalance).multiplyDecimal(MAX_BOOSTING_FACTOR_MINUS_ONE).div( veTotalSupply ) ); newWorkingBalance = maxWorkingBalance.min(boostedWorkingBalance); } _workingSupply = oldWorkingSupply.sub(oldWorkingBalance).add(newWorkingBalance); _workingBalances[account] = newWorkingBalance; } function _checkpoint( address account, uint256 weight, uint256 totalWeight ) private returns (uint256 chessAmount, uint256 bonusAmount) { chessAmount = _chessCheckpoint(account, weight, totalWeight); bonusAmount = _bonusCheckpoint(account, weight, totalWeight); } function _chessCheckpoint( address account, uint256 weight, uint256 totalWeight ) private returns (uint256 amount) { // Update global state uint256 timestamp = _chessIntegralTimestamp; uint256 integral = _chessIntegral; uint256 endWeek = _endOfWeek(timestamp); uint256 rate = _rate; if (rate == 0) { // CHESS emission may update in the middle of a week due to cross-chain lag. // We re-calculate the rate if it was zero after the last checkpoint. uint256 weeklySupply = chessSchedule.getWeeklySupply(timestamp); if (weeklySupply != 0) { rate = (weeklySupply / (endWeek - timestamp)).mul( chessController.getFundRelativeWeight(address(this), timestamp) ); } } for (uint256 i = 0; i < MAX_ITERATIONS && timestamp < block.timestamp; i++) { uint256 endTimestamp = endWeek.min(block.timestamp); if (totalWeight != 0) { integral = integral.add( rate.mul(endTimestamp - timestamp).decimalToPreciseDecimal().div(totalWeight) ); } if (endTimestamp == endWeek) { rate = chessSchedule.getRate(endWeek).mul( chessController.getFundRelativeWeight(address(this), endWeek) ); endWeek += 1 weeks; } timestamp = endTimestamp; } _chessIntegralTimestamp = block.timestamp; _chessIntegral = integral; _rate = rate; // Update per-user state amount = _claimableChess[account].add( weight.multiplyDecimalPrecise(integral.sub(_chessUserIntegrals[account])) ); _claimableChess[account] = amount; _chessUserIntegrals[account] = integral; } function _bonusCheckpoint( address account, uint256 weight, uint256 totalWeight ) private returns (uint256 amount) { // Update global state uint256 newBonus = ISwapBonus(swapBonus).getBonus(); uint256 integral = _bonusIntegral; if (totalWeight != 0 && newBonus != 0) { integral = integral.add(newBonus.divideDecimalPrecise(totalWeight)); _bonusIntegral = integral; } // Update per-user state uint256 oldUserIntegral = _bonusUserIntegral[account]; if (oldUserIntegral == integral) { return _claimableBonus[account]; } amount = _claimableBonus[account].add( weight.multiplyDecimalPrecise(integral.sub(oldUserIntegral)) ); _claimableBonus[account] = amount; _bonusUserIntegral[account] = integral; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using 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"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with 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; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; interface IChessController { function getFundRelativeWeight(address account, uint256 timestamp) external returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; interface IChessSchedule { function getWeeklySupply(uint256 timestamp) external view returns (uint256); function getRate(uint256 timestamp) external view returns (uint256); function mint(address account, uint256 amount) external; function addMinter(address account) external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; pragma experimental ABIEncoderV2; import "./ITwapOracleV2.sol"; interface IFundV3 { /// @notice A linear transformation matrix that represents a rebalance. /// /// ``` /// [ 1 0 0 ] /// R = [ ratioB2Q ratioBR 0 ] /// [ ratioR2Q 0 ratioBR ] /// ``` /// /// Amounts of the three tranches `q`, `b` and `r` can be rebalanced by multiplying the matrix: /// /// ``` /// [ q', b', r' ] = [ q, b, r ] * R /// ``` struct Rebalance { uint256 ratioB2Q; uint256 ratioR2Q; uint256 ratioBR; uint256 timestamp; } function tokenUnderlying() external view returns (address); function tokenQ() external view returns (address); function tokenB() external view returns (address); function tokenR() external view returns (address); function tokenShare(uint256 tranche) external view returns (address); function primaryMarket() external view returns (address); function primaryMarketUpdateProposal() external view returns (address, uint256); function strategy() external view returns (address); function strategyUpdateProposal() external view returns (address, uint256); function underlyingDecimalMultiplier() external view returns (uint256); function twapOracle() external view returns (ITwapOracleV2); function feeCollector() external view returns (address); function endOfDay(uint256 timestamp) external pure returns (uint256); function trancheTotalSupply(uint256 tranche) external view returns (uint256); function trancheBalanceOf(uint256 tranche, address account) external view returns (uint256); function trancheAllBalanceOf(address account) external view returns (uint256, uint256, uint256); function trancheBalanceVersion(address account) external view returns (uint256); function trancheAllowance( uint256 tranche, address owner, address spender ) external view returns (uint256); function trancheAllowanceVersion( address owner, address spender ) external view returns (uint256); function trancheTransfer( uint256 tranche, address recipient, uint256 amount, uint256 version ) external; function trancheTransferFrom( uint256 tranche, address sender, address recipient, uint256 amount, uint256 version ) external; function trancheApprove( uint256 tranche, address spender, uint256 amount, uint256 version ) external; function getRebalanceSize() external view returns (uint256); function getRebalance(uint256 index) external view returns (Rebalance memory); function getRebalanceTimestamp(uint256 index) external view returns (uint256); function currentDay() external view returns (uint256); function splitRatio() external view returns (uint256); function historicalSplitRatio(uint256 version) external view returns (uint256); function fundActivityStartTime() external view returns (uint256); function isFundActive(uint256 timestamp) external view returns (bool); function getEquivalentTotalB() external view returns (uint256); function getEquivalentTotalQ() external view returns (uint256); function historicalEquivalentTotalB(uint256 timestamp) external view returns (uint256); function historicalNavs(uint256 timestamp) external view returns (uint256 navB, uint256 navR); function extrapolateNav(uint256 price) external view returns (uint256, uint256, uint256); function doRebalance( uint256 amountQ, uint256 amountB, uint256 amountR, uint256 index ) external view returns (uint256 newAmountQ, uint256 newAmountB, uint256 newAmountR); function batchRebalance( uint256 amountQ, uint256 amountB, uint256 amountR, uint256 fromIndex, uint256 toIndex ) external view returns (uint256 newAmountQ, uint256 newAmountB, uint256 newAmountR); function refreshBalance(address account, uint256 targetVersion) external; function refreshAllowance(address owner, address spender, uint256 targetVersion) external; function shareTransfer(address sender, address recipient, uint256 amount) external; function shareTransferFrom( address spender, address sender, address recipient, uint256 amount ) external returns (uint256 newAllowance); function shareIncreaseAllowance( address sender, address spender, uint256 addedValue ) external returns (uint256 newAllowance); function shareDecreaseAllowance( address sender, address spender, uint256 subtractedValue ) external returns (uint256 newAllowance); function shareApprove(address owner, address spender, uint256 amount) external; function historicalUnderlying(uint256 timestamp) external view returns (uint256); function getTotalUnderlying() external view returns (uint256); function getStrategyUnderlying() external view returns (uint256); function getTotalDebt() external view returns (uint256); event RebalanceTriggered( uint256 indexed index, uint256 indexed day, uint256 navSum, uint256 navB, uint256 navROrZero, uint256 ratioB2Q, uint256 ratioR2Q, uint256 ratioBR ); event Settled(uint256 indexed day, uint256 navB, uint256 navR, uint256 interestRate); event InterestRateUpdated(uint256 baseInterestRate, uint256 floatingInterestRate); event BalancesRebalanced( address indexed account, uint256 version, uint256 balanceQ, uint256 balanceB, uint256 balanceR ); event AllowancesRebalanced( address indexed owner, address indexed spender, uint256 version, uint256 allowanceQ, uint256 allowanceB, uint256 allowanceR ); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface ILiquidityGauge is IERC20 { function mint(address account, uint256 amount) external; function burnFrom(address account, uint256 amount) external; function workingSupply() external view returns (uint256); function workingBalanceOf(address account) external view returns (uint256); function claimableRewards( address account ) external returns ( uint256 chessAmount, uint256 bonusAmount, uint256 amountQ, uint256 amountB, uint256 amountR, uint256 quoteAmount ); function claimRewards(address account) external; function distribute( uint256 amountQ, uint256 amountB, uint256 amountR, uint256 quoteAmount, uint256 version ) external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; import "../interfaces/IFundV3.sol"; interface IStableSwapCore { function getQuoteOut(uint256 baseIn) external view returns (uint256 quoteOut); function getQuoteIn(uint256 baseOut) external view returns (uint256 quoteIn); function getBaseOut(uint256 quoteIn) external view returns (uint256 baseOut); function getBaseIn(uint256 quoteOut) external view returns (uint256 baseIn); function buy( uint256 version, uint256 baseOut, address recipient, bytes calldata data ) external returns (uint256 realBaseOut); function sell( uint256 version, uint256 quoteOut, address recipient, bytes calldata data ) external returns (uint256 realQuoteOut); } interface IStableSwap is IStableSwapCore { function fund() external view returns (IFundV3); function baseTranche() external view returns (uint256); function baseAddress() external view returns (address); function quoteAddress() external view returns (address); function allBalances() external view returns (uint256, uint256); function getOraclePrice() external view returns (uint256); function getCurrentD() external view returns (uint256); function getCurrentPriceOverOracle() external view returns (uint256); function getCurrentPrice() external view returns (uint256); function getPriceOverOracleIntegral() external view returns (uint256); function addLiquidity(uint256 version, address recipient) external returns (uint256); function removeLiquidity( uint256 version, uint256 lpIn, uint256 minBaseOut, uint256 minQuoteOut ) external returns (uint256 baseOut, uint256 quoteOut); function removeLiquidityUnwrap( uint256 version, uint256 lpIn, uint256 minBaseOut, uint256 minQuoteOut ) external returns (uint256 baseOut, uint256 quoteOut); function removeBaseLiquidity( uint256 version, uint256 lpIn, uint256 minBaseOut ) external returns (uint256 baseOut); function removeQuoteLiquidity( uint256 version, uint256 lpIn, uint256 minQuoteOut ) external returns (uint256 quoteOut); function removeQuoteLiquidityUnwrap( uint256 version, uint256 lpIn, uint256 minQuoteOut ) external returns (uint256 quoteOut); } /// @dev The interface shares the same function names as in `IStableSwapCore`; /// all getters are defined as non-view functions in order to parse and /// return the internal revert messages interface IStableSwapCoreInternalRevertExpected { function getQuoteOut(uint256 baseIn) external returns (uint256 quoteOut); function getQuoteIn(uint256 baseOut) external returns (uint256 quoteIn); function getBaseOut(uint256 quoteIn) external returns (uint256 baseOut); function getBaseIn(uint256 quoteOut) external returns (uint256 baseIn); function buy( uint256 version, uint256 baseOut, address recipient, bytes calldata data ) external returns (uint256 realBaseOut); function sell( uint256 version, uint256 quoteOut, address recipient, bytes calldata data ) external returns (uint256 realQuoteOut); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; /// @notice Amounts of QUEEN, BISHOP and ROOK are sometimes stored in a `uint256[3]` array. /// This contract defines index of each tranche in this array. /// /// Solidity does not allow constants to be defined in interfaces. So this contract follows /// the naming convention of interfaces but is implemented as an `abstract contract`. abstract contract ITrancheIndexV2 { uint256 internal constant TRANCHE_Q = 0; uint256 internal constant TRANCHE_B = 1; uint256 internal constant TRANCHE_R = 2; uint256 internal constant TRANCHE_COUNT = 3; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; interface ITwapOracle { enum UpdateType { PRIMARY, SECONDARY, OWNER, CHAINLINK, UNISWAP_V2 } function getTwap(uint256 timestamp) external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; import "./ITwapOracle.sol"; interface ITwapOracleV2 is ITwapOracle { function getLatest() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; pragma experimental ABIEncoderV2; interface IAddressWhitelist { function check(address account) external view returns (bool); } interface IVotingEscrowCallback { function syncWithVotingEscrow(address account) external; } interface IVotingEscrow { struct LockedBalance { uint256 amount; uint256 unlockTime; } function token() external view returns (address); function maxTime() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function totalSupply() external view returns (uint256); function balanceOfAtTimestamp( address account, uint256 timestamp ) external view returns (uint256); function getTimestampDropBelow( address account, uint256 threshold ) external view returns (uint256); function getLockedBalance(address account) external view returns (LockedBalance memory); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.10 <0.8.0; import "@openzeppelin/contracts/math/SafeMath.sol"; abstract contract CoreUtility { using SafeMath for uint256; /// @dev UTC time of a day when the fund settles. uint256 internal constant SETTLEMENT_TIME = 14 hours; /// @dev Return end timestamp of the trading week containing a given timestamp. /// /// A trading week starts at UTC time `SETTLEMENT_TIME` on a Thursday (inclusive) /// and ends at the same time of the next Thursday (exclusive). /// @param timestamp The given timestamp /// @return End timestamp of the trading week. function _endOfWeek(uint256 timestamp) internal pure returns (uint256) { return ((timestamp.add(1 weeks) - SETTLEMENT_TIME) / 1 weeks) * 1 weeks + SETTLEMENT_TIME; } }
// SPDX-License-Identifier: MIT // // Copyright (c) 2019 Synthetix // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. pragma solidity >=0.6.10 <0.8.0; import "@openzeppelin/contracts/math/SafeMath.sol"; library SafeDecimalMath { using SafeMath for uint256; /* Number of decimal places in the representations. */ uint256 private constant decimals = 18; uint256 private constant highPrecisionDecimals = 27; /* The number representing 1.0. */ uint256 private constant UNIT = 10 ** uint256(decimals); /* The number representing 1.0 for higher fidelity numbers. */ uint256 private constant PRECISE_UNIT = 10 ** uint256(highPrecisionDecimals); uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10 ** uint256(highPrecisionDecimals - decimals); /** * @return The result of multiplying x and y, interpreting the operands as fixed-point * decimals. * * @dev A unit factor is divided out after the product of x and y is evaluated, * so that product must be less than 2**256. As this is an integer division, * the internal division always rounds down. This helps save on gas. Rounding * is more expensive on gas. */ function multiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) { /* Divide by UNIT to remove the extra factor introduced by the product. */ return x.mul(y).div(UNIT); } function multiplyDecimalPrecise(uint256 x, uint256 y) internal pure returns (uint256) { /* Divide by UNIT to remove the extra factor introduced by the product. */ return x.mul(y).div(PRECISE_UNIT); } /** * @return The result of safely dividing x and y. The return value is a high * precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and UNIT must be less than 2**256. As * this is an integer division, the result is always rounded down. * This helps save on gas. Rounding is more expensive on gas. */ function divideDecimal(uint256 x, uint256 y) internal pure returns (uint256) { /* Reintroduce the UNIT factor that will be divided out by y. */ return x.mul(UNIT).div(y); } function divideDecimalPrecise(uint256 x, uint256 y) internal pure returns (uint256) { /* Reintroduce the UNIT factor that will be divided out by y. */ return x.mul(PRECISE_UNIT).div(y); } /** * @dev Convert a standard decimal representation to a high precision one. */ function decimalToPreciseDecimal(uint256 i) internal pure returns (uint256) { return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR); } /** * @dev Convert a high precision decimal to a standard decimal representation. */ function preciseDecimalToDecimal(uint256 i) internal pure returns (uint256) { uint256 quotientTimesTen = i.mul(10).div(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR); if (quotientTimesTen % 10 >= 5) { quotientTimesTen = quotientTimesTen.add(10); } return quotientTimesTen.div(10); } /** * @dev Returns the multiplication of two unsigned integers, and the max value of * uint256 on overflow. */ function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; return c / a != b ? type(uint256).max : c; } function saturatingMultiplyDecimal(uint256 x, uint256 y) internal pure returns (uint256) { /* Divide by UNIT to remove the extra factor introduced by the product. */ return saturatingMul(x, y).div(UNIT); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"address","name":"stableSwap_","type":"address"},{"internalType":"address","name":"chessSchedule_","type":"address"},{"internalType":"address","name":"chessController_","type":"address"},{"internalType":"address","name":"fund_","type":"address"},{"internalType":"address","name":"votingEscrow_","type":"address"},{"internalType":"address","name":"swapBonus_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"chessController","outputs":[{"internalType":"contract IChessController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chessSchedule","outputs":[{"internalType":"contract IChessSchedule","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimableRewards","outputs":[{"internalType":"uint256","name":"chessAmount","type":"uint256"},{"internalType":"uint256","name":"bonusAmount","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fund","outputs":[{"internalType":"contract IFundV3","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stableSwap","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapBonus","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"syncWithVotingEscrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"workingBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"workingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101806040523480156200001257600080fd5b506040516200240538038062002405833981016040819052620000359162000366565b8751889088906200004e906003906020850190620001e0565b50805162000064906004906020840190620001e0565b50506005805460ff19166012179055506001600160601b0319606087901b16608052604080516378505a2760e11b815290516001600160a01b0388169163f0a0b44e916004808301926020929190829003018186803b158015620000c757600080fd5b505afa158015620000dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000102919062000341565b6001600160601b0319606091821b811660a05286821b811660c05285821b811660e05284821b81166101005283821b8116610120529082901b1661014052604080516341d4a1ab60e01b815290516001600160a01b038316916341d4a1ab916004808301926020929190829003018186803b1580156200018157600080fd5b505afa15801562000196573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001bc919062000341565b60601b6001600160601b031916610160525050426009555062000461945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200022357805160ff191683800117855562000253565b8280016001018555821562000253579182015b828111156200025357825182559160200191906001019062000236565b506200026192915062000265565b5090565b5b8082111562000261576000815560010162000266565b80516001600160a01b03811681146200029457600080fd5b92915050565b600082601f830112620002ab578081fd5b81516001600160401b0380821115620002c2578283fd5b6040516020601f8401601f1916820181018381118382101715620002e4578586fd5b806040525081945083825286818588010111156200030157600080fd5b600092505b8383101562000325578583018101518284018201529182019162000306565b83831115620003375760008185840101525b5050505092915050565b60006020828403121562000353578081fd5b6200035f83836200027c565b9392505050565b600080600080600080600080610100898b03121562000383578384fd5b88516001600160401b03808211156200039a578586fd5b620003a88c838d016200029a565b995060208b0151915080821115620003be578586fd5b50620003cd8b828c016200029a565b9750506040890151620003e08162000448565b60608a0151909650620003f38162000448565b60808a0151909550620004068162000448565b9350620004178a60a08b016200027c565b9250620004288a60c08b016200027c565b9150620004398a60e08b016200027c565b90509295985092959890939650565b6001600160a01b03811681146200045e57600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c6101405160601c6101605160601c611f06620004ff6000398061099d5250806106615280611420525080610c595280610cea52508061080652508061058c528061113e528061124b5250806106e15280610907528061109652806112eb525050806104f752806105ef52806107665250611f066000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c806381366192116100de578063a457c2d711610097578063c8562f7211610071578063c8562f72146102e5578063dc01f60d146102ed578063dd62ed3e14610312578063ef5cfb8c1461032557610173565b8063a457c2d7146102b7578063a9059cbb146102ca578063b60d4288146102dd57610173565b8063813661921461027157806382812290146102795780639050fd4e1461028c578063919c2aa21461029f57806395d89b41146102a75780639e548b7f146102af57610173565b80633950935111610130578063395093511461020657806340c10f191461021957806341d06e081461022e578063679aefce1461024357806370a082311461024b57806379cc67901461025e57610173565b806306fdde0314610178578063095ea7b3146101965780630c7c97c7146101b657806318160ddd146101d657806323b872dd146101de578063313ce567146101f1575b600080fd5b610180610338565b60405161018d91906119ff565b60405180910390f35b6101a96101a436600461190f565b6103ce565b60405161018d91906119f4565b6101c96101c4366004611880565b6103ec565b60405161018d9190611db8565b6101c9610407565b6101a96101ec3660046118cf565b61040d565b6101f9610495565b60405161018d9190611de9565b6101a961021436600461190f565b61049e565b61022c61022736600461190f565b6104ec565b005b61023661058a565b60405161018d91906119c7565b6101c96105ae565b6101c9610259366004611880565b6105c9565b61022c61026c36600461190f565b6105e4565b61023661065f565b61022c610287366004611971565b610683565b61022c61029a366004611880565b61069b565b6102366106df565b610180610703565b610236610764565b6101a96102c536600461190f565b610788565b6101a96102d836600461190f565b6107f0565b610236610804565b6101c9610828565b6103006102fb366004611880565b61082e565b60405161018d96959493929190611dc1565b6101c961032036600461189b565b610877565b61022c610333366004611880565b6108a2565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c45780601f10610399576101008083540402835291602001916103c4565b820191906000526020600020905b8154815290600101906020018083116103a757829003601f168201915b5050505050905090565b60006103e26103db6109e6565b84846109ea565b5060015b92915050565b6001600160a01b031660009081526007602052604090205490565b60025490565b600061041a848484610a9e565b61048a846104266109e6565b61048585604051806060016040528060288152602001611e84602891396001600160a01b038a166000908152600160205260408120906104646109e6565b6001600160a01b031681526020810191909152604001600020549190610b07565b6109ea565b5060015b9392505050565b60055460ff1690565b60006103e26104ab6109e6565b8461048585600160006104bc6109e6565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610b33565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461053d5760405162461bcd60e51b815260040161053490611ba2565b60405180910390fd5b6001600160a01b038216600090815260076020526040902054600654610564848383610b58565b50506105708484610b7d565b61058484838361057f886105c9565b610c3d565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000670de0b6b3a7640000600f54816105c357fe5b04905090565b6001600160a01b031660009081526020819052604090205490565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461062c5760405162461bcd60e51b815260040161053490611ba2565b6001600160a01b038216600090815260076020526040902054600654610653848383610b58565b50506105708484610e17565b7f000000000000000000000000000000000000000000000000000000000000000081565b60405162461bcd60e51b815260040161053490611c0d565b60006106a6826105c9565b6001600160a01b038316600090815260076020526040902054600654919250906106d1848383610b58565b505061058484838386610c3d565b7f000000000000000000000000000000000000000000000000000000000000000081565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c45780601f10610399576101008083540402835291602001916103c4565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006103e26107956109e6565b8461048585604051806060016040528060258152602001611eac60259139600160006107bf6109e6565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610b07565b60006103e26107fd6109e6565b8484610a9e565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065490565b60008060008060008061086987600760008a6001600160a01b03166001600160a01b0316815260200190815260200160002054600654610b58565b909890975093955091935091565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006108ad826105c9565b6001600160a01b0383166000908152600760205260408120546006549293509190806108da868585610b58565b915091506108ea86858588610c3d565b811561098a576040516340c10f1960e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340c10f199061093e90899086906004016119db565b600060405180830381600087803b15801561095857600080fd5b505af115801561096c573d6000803e3d6000fd5b5050506001600160a01b0387166000908152600b6020526040812055505b80156109de576109c46001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168783610eed565b6001600160a01b0386166000908152600e60205260408120555b505050505050565b3390565b6001600160a01b038316610a105760405162461bcd60e51b815260040161053490611cbc565b6001600160a01b038216610a365760405162461bcd60e51b815260040161053490611a75565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610a91908590611db8565b60405180910390a3505050565b6001600160a01b03808416600090815260076020526040808220549285168252902054600654610acf868483610b58565b5050610adc858383610b58565b5050610ae9868686610f48565b610af886848361057f8a6105c9565b6109de85838361057f896105c9565b60008184841115610b2b5760405162461bcd60e51b815260040161053491906119ff565b505050900390565b60008282018381101561048e5760405162461bcd60e51b815260040161053490611ab7565b600080610b6685858561105d565b9150610b7385858561141b565b9050935093915050565b6001600160a01b038216610ba35760405162461bcd60e51b815260040161053490611d81565b610baf60008383610f43565b600254610bbc9082610b33565b6002556001600160a01b038216600090815260208190526040902054610be29082610b33565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c31908590611db8565b60405180910390a35050565b6040516370a0823160e01b815281906000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610c8e9089906004016119c7565b60206040518083038186803b158015610ca657600080fd5b505afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde9190611959565b90508015610ddd5760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4157600080fd5b505afa158015610d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d799190611959565b90506000610d8f846729a2241af62c0000611593565b90506000610dcb610dc484610dbe671bc16d674ec80000610db889610db2610407565b906115a7565b90611593565b906115e1565b8690610b33565b9050610dd78282611613565b94505050505b610df182610deb8688611629565b90610b33565b600655506001600160a01b03909416600090815260076020526040902093909355505050565b6001600160a01b038216610e3d5760405162461bcd60e51b815260040161053490611c36565b610e4982600083610f43565b610e8681604051806060016040528060228152602001611e3c602291396001600160a01b0385166000908152602081905260409020549190610b07565b6001600160a01b038316600090815260208190526040902055600254610eac9082611629565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c31908590611db8565b610f438363a9059cbb60e01b8484604051602401610f0c9291906119db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611651565b505050565b6001600160a01b038316610f6e5760405162461bcd60e51b815260040161053490611c77565b6001600160a01b038216610f945760405162461bcd60e51b815260040161053490611a32565b610f9f838383610f43565b610fdc81604051806060016040528060268152602001611e5e602691396001600160a01b0386166000908152602081905260409020549190610b07565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461100b9082610b33565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a91908590611db8565b6009546008546000919082611071836116e0565b600f54909150806111de576040516354cb065d60e11b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9960cba906110cb908890600401611db8565b60206040518083038186803b1580156110e357600080fd5b505afa1580156110f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111b9190611959565b905080156111dc57604051636910f41760e01b81526111d9906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636910f417906111759030908a906004016119db565b602060405180830381600087803b15801561118f57600080fd5b505af11580156111a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c79190611959565b86850383816111d257fe5b04906115a7565b91505b505b60005b6101f4811080156111f157504285105b156113855760006112028442611613565b9050871561122857611225610dc489610dbe611220878b87036115a7565b61170a565b94505b8381141561137b57604051636910f41760e01b8152611370906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636910f4179061128290309089906004016119db565b602060405180830381600087803b15801561129c57600080fd5b505af11580156112b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d49190611959565b6040516315dd902560e21b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635776409490611320908990600401611db8565b60206040518083038186803b15801561133857600080fd5b505afa15801561134c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db29190611959565b925062093a80840193505b94506001016111e1565b50426009556008839055600f8190556001600160a01b0388166000908152600a60205260409020546113e6906113c7906113c0908690611629565b899061171a565b6001600160a01b038a166000908152600b602052604090205490610b33565b6001600160a01b039098166000908152600b602090815260408083208b9055600a909152902092909255509495945050505050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638bdff1616040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561147957600080fd5b505af115801561148d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b19190611959565b600c5490915083158015906114c557508115155b156114e6576114de6114d78386611736565b8290610b33565b600c81905590505b6001600160a01b0386166000908152600d60205260409020548181141561152957505050506001600160a01b0383166000908152600e602052604090205461048e565b61155f6115406115398484611629565b889061171a565b6001600160a01b0389166000908152600e602052604090205490610b33565b6001600160a01b0388166000908152600e60209081526040808320849055600d909152902092909255509150509392505050565b600061048e670de0b6b3a7640000610dbe85855b6000826115b6575060006103e6565b828202828482816115c357fe5b041461048e5760405162461bcd60e51b815260040161053490611bcc565b60008082116116025760405162461bcd60e51b815260040161053490611b6b565b81838161160b57fe5b049392505050565b6000818310611622578161048e565b5090919050565b60008282111561164b5760405162461bcd60e51b815260040161053490611aee565b50900390565b60606116a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117529092919063ffffffff16565b805190915015610f4357808060200190518101906116c49190611939565b610f435760405162461bcd60e51b815260040161053490611d37565b600061c4e062093a80816116f48583610b33565b03816116fc57fe5b0462093a8002019050919050565b60006103e682633b9aca006115a7565b600061048e6b033b2e3c9fd0803ce8000000610dbe85856115a7565b600061048e82610dbe856b033b2e3c9fd0803ce80000006115a7565b60606117618484600085611769565b949350505050565b60608247101561178b5760405162461bcd60e51b815260040161053490611b25565b6117948561182a565b6117b05760405162461bcd60e51b815260040161053490611d00565b60006060866001600160a01b031685876040516117cd91906119ab565b60006040518083038185875af1925050503d806000811461180a576040519150601f19603f3d011682016040523d82523d6000602084013e61180f565b606091505b509150915061181f828286611830565b979650505050505050565b3b151590565b6060831561183f57508161048e565b82511561184f5782518084602001fd5b8160405162461bcd60e51b815260040161053491906119ff565b80356001600160a01b03811681146103e657600080fd5b600060208284031215611891578081fd5b61048e8383611869565b600080604083850312156118ad578081fd5b6118b78484611869565b91506118c68460208501611869565b90509250929050565b6000806000606084860312156118e3578081fd5b83356118ee81611e23565b925060208401356118fe81611e23565b929592945050506040919091013590565b60008060408385031215611921578182fd5b61192b8484611869565b946020939093013593505050565b60006020828403121561194a578081fd5b8151801515811461048e578182fd5b60006020828403121561196a578081fd5b5051919050565b600080600080600060a08688031215611988578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b600082516119bd818460208701611df7565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152611a1e816040850160208701611df7565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526010908201526f04f6e6c7920737461626c6520737761760841b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600f908201526e139bdd081a5b5c1b195b595b9d1959608a1b604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b958652602086019490945260408501929092526060840152608083015260a082015260c00190565b60ff91909116815260200190565b60005b83811015611e12578181015183820152602001611dfa565b838111156105845750506000910152565b6001600160a01b0381168114611e3857600080fd5b5056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fa3ba8aff0e65ff2f0f6d9d2b9fa5b65ac986d532bcce0e583ae6e75df4adfb464736f6c634300060c003300000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000ec8bfa1d15842d6b670d11777a08c39b09a5ff00000000000000000000000000f3bf24b8fdb80b167b3fb6b97131fb942579dafa000000000000000000000000fae0e20b4d74531e58ea31a964adfc61c08fa13b0000000000000000000000004b0d5fe3c1f58fd68d20651a5bc761553c10d955000000000000000000000000ffd17794bf2e3ba798170f358225763f1af8f5ba00000000000000000000000062b4b4723770a8f28afb796613c7e245b3c30c86000000000000000000000000000000000000000000000000000000000000001a5472616e6368657373207374615953544f4e45322d53544f4e45000000000000000000000000000000000000000000000000000000000000000000000000000853544f4e45324c50000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806381366192116100de578063a457c2d711610097578063c8562f7211610071578063c8562f72146102e5578063dc01f60d146102ed578063dd62ed3e14610312578063ef5cfb8c1461032557610173565b8063a457c2d7146102b7578063a9059cbb146102ca578063b60d4288146102dd57610173565b8063813661921461027157806382812290146102795780639050fd4e1461028c578063919c2aa21461029f57806395d89b41146102a75780639e548b7f146102af57610173565b80633950935111610130578063395093511461020657806340c10f191461021957806341d06e081461022e578063679aefce1461024357806370a082311461024b57806379cc67901461025e57610173565b806306fdde0314610178578063095ea7b3146101965780630c7c97c7146101b657806318160ddd146101d657806323b872dd146101de578063313ce567146101f1575b600080fd5b610180610338565b60405161018d91906119ff565b60405180910390f35b6101a96101a436600461190f565b6103ce565b60405161018d91906119f4565b6101c96101c4366004611880565b6103ec565b60405161018d9190611db8565b6101c9610407565b6101a96101ec3660046118cf565b61040d565b6101f9610495565b60405161018d9190611de9565b6101a961021436600461190f565b61049e565b61022c61022736600461190f565b6104ec565b005b61023661058a565b60405161018d91906119c7565b6101c96105ae565b6101c9610259366004611880565b6105c9565b61022c61026c36600461190f565b6105e4565b61023661065f565b61022c610287366004611971565b610683565b61022c61029a366004611880565b61069b565b6102366106df565b610180610703565b610236610764565b6101a96102c536600461190f565b610788565b6101a96102d836600461190f565b6107f0565b610236610804565b6101c9610828565b6103006102fb366004611880565b61082e565b60405161018d96959493929190611dc1565b6101c961032036600461189b565b610877565b61022c610333366004611880565b6108a2565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c45780601f10610399576101008083540402835291602001916103c4565b820191906000526020600020905b8154815290600101906020018083116103a757829003601f168201915b5050505050905090565b60006103e26103db6109e6565b84846109ea565b5060015b92915050565b6001600160a01b031660009081526007602052604090205490565b60025490565b600061041a848484610a9e565b61048a846104266109e6565b61048585604051806060016040528060288152602001611e84602891396001600160a01b038a166000908152600160205260408120906104646109e6565b6001600160a01b031681526020810191909152604001600020549190610b07565b6109ea565b5060015b9392505050565b60055460ff1690565b60006103e26104ab6109e6565b8461048585600160006104bc6109e6565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610b33565b336001600160a01b037f000000000000000000000000ec8bfa1d15842d6b670d11777a08c39b09a5ff00161461053d5760405162461bcd60e51b815260040161053490611ba2565b60405180910390fd5b6001600160a01b038216600090815260076020526040902054600654610564848383610b58565b50506105708484610b7d565b61058484838361057f886105c9565b610c3d565b50505050565b7f000000000000000000000000fae0e20b4d74531e58ea31a964adfc61c08fa13b81565b6000670de0b6b3a7640000600f54816105c357fe5b04905090565b6001600160a01b031660009081526020819052604090205490565b336001600160a01b037f000000000000000000000000ec8bfa1d15842d6b670d11777a08c39b09a5ff00161461062c5760405162461bcd60e51b815260040161053490611ba2565b6001600160a01b038216600090815260076020526040902054600654610653848383610b58565b50506105708484610e17565b7f00000000000000000000000062b4b4723770a8f28afb796613c7e245b3c30c8681565b60405162461bcd60e51b815260040161053490611c0d565b60006106a6826105c9565b6001600160a01b038316600090815260076020526040902054600654919250906106d1848383610b58565b505061058484838386610c3d565b7f000000000000000000000000f3bf24b8fdb80b167b3fb6b97131fb942579dafa81565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156103c45780601f10610399576101008083540402835291602001916103c4565b7f000000000000000000000000ec8bfa1d15842d6b670d11777a08c39b09a5ff0081565b60006103e26107956109e6565b8461048585604051806060016040528060258152602001611eac60259139600160006107bf6109e6565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610b07565b60006103e26107fd6109e6565b8484610a9e565b7f0000000000000000000000004b0d5fe3c1f58fd68d20651a5bc761553c10d95581565b60065490565b60008060008060008061086987600760008a6001600160a01b03166001600160a01b0316815260200190815260200160002054600654610b58565b909890975093955091935091565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60006108ad826105c9565b6001600160a01b0383166000908152600760205260408120546006549293509190806108da868585610b58565b915091506108ea86858588610c3d565b811561098a576040516340c10f1960e01b81526001600160a01b037f000000000000000000000000f3bf24b8fdb80b167b3fb6b97131fb942579dafa16906340c10f199061093e90899086906004016119db565b600060405180830381600087803b15801561095857600080fd5b505af115801561096c573d6000803e3d6000fd5b5050506001600160a01b0387166000908152600b6020526040812055505b80156109de576109c46001600160a01b037f0000000000000000000000009735fb1126b521a913697a541f768376011bccf9168783610eed565b6001600160a01b0386166000908152600e60205260408120555b505050505050565b3390565b6001600160a01b038316610a105760405162461bcd60e51b815260040161053490611cbc565b6001600160a01b038216610a365760405162461bcd60e51b815260040161053490611a75565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610a91908590611db8565b60405180910390a3505050565b6001600160a01b03808416600090815260076020526040808220549285168252902054600654610acf868483610b58565b5050610adc858383610b58565b5050610ae9868686610f48565b610af886848361057f8a6105c9565b6109de85838361057f896105c9565b60008184841115610b2b5760405162461bcd60e51b815260040161053491906119ff565b505050900390565b60008282018381101561048e5760405162461bcd60e51b815260040161053490611ab7565b600080610b6685858561105d565b9150610b7385858561141b565b9050935093915050565b6001600160a01b038216610ba35760405162461bcd60e51b815260040161053490611d81565b610baf60008383610f43565b600254610bbc9082610b33565b6002556001600160a01b038216600090815260208190526040902054610be29082610b33565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c31908590611db8565b60405180910390a35050565b6040516370a0823160e01b815281906000906001600160a01b037f000000000000000000000000ffd17794bf2e3ba798170f358225763f1af8f5ba16906370a0823190610c8e9089906004016119c7565b60206040518083038186803b158015610ca657600080fd5b505afa158015610cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cde9190611959565b90508015610ddd5760007f000000000000000000000000ffd17794bf2e3ba798170f358225763f1af8f5ba6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4157600080fd5b505afa158015610d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d799190611959565b90506000610d8f846729a2241af62c0000611593565b90506000610dcb610dc484610dbe671bc16d674ec80000610db889610db2610407565b906115a7565b90611593565b906115e1565b8690610b33565b9050610dd78282611613565b94505050505b610df182610deb8688611629565b90610b33565b600655506001600160a01b03909416600090815260076020526040902093909355505050565b6001600160a01b038216610e3d5760405162461bcd60e51b815260040161053490611c36565b610e4982600083610f43565b610e8681604051806060016040528060228152602001611e3c602291396001600160a01b0385166000908152602081905260409020549190610b07565b6001600160a01b038316600090815260208190526040902055600254610eac9082611629565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610c31908590611db8565b610f438363a9059cbb60e01b8484604051602401610f0c9291906119db565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611651565b505050565b6001600160a01b038316610f6e5760405162461bcd60e51b815260040161053490611c77565b6001600160a01b038216610f945760405162461bcd60e51b815260040161053490611a32565b610f9f838383610f43565b610fdc81604051806060016040528060268152602001611e5e602691396001600160a01b0386166000908152602081905260409020549190610b07565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461100b9082610b33565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610a91908590611db8565b6009546008546000919082611071836116e0565b600f54909150806111de576040516354cb065d60e11b81526000906001600160a01b037f000000000000000000000000f3bf24b8fdb80b167b3fb6b97131fb942579dafa169063a9960cba906110cb908890600401611db8565b60206040518083038186803b1580156110e357600080fd5b505afa1580156110f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111b9190611959565b905080156111dc57604051636910f41760e01b81526111d9906001600160a01b037f000000000000000000000000fae0e20b4d74531e58ea31a964adfc61c08fa13b1690636910f417906111759030908a906004016119db565b602060405180830381600087803b15801561118f57600080fd5b505af11580156111a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c79190611959565b86850383816111d257fe5b04906115a7565b91505b505b60005b6101f4811080156111f157504285105b156113855760006112028442611613565b9050871561122857611225610dc489610dbe611220878b87036115a7565b61170a565b94505b8381141561137b57604051636910f41760e01b8152611370906001600160a01b037f000000000000000000000000fae0e20b4d74531e58ea31a964adfc61c08fa13b1690636910f4179061128290309089906004016119db565b602060405180830381600087803b15801561129c57600080fd5b505af11580156112b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d49190611959565b6040516315dd902560e21b81526001600160a01b037f000000000000000000000000f3bf24b8fdb80b167b3fb6b97131fb942579dafa1690635776409490611320908990600401611db8565b60206040518083038186803b15801561133857600080fd5b505afa15801561134c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db29190611959565b925062093a80840193505b94506001016111e1565b50426009556008839055600f8190556001600160a01b0388166000908152600a60205260409020546113e6906113c7906113c0908690611629565b899061171a565b6001600160a01b038a166000908152600b602052604090205490610b33565b6001600160a01b039098166000908152600b602090815260408083208b9055600a909152902092909255509495945050505050565b6000807f00000000000000000000000062b4b4723770a8f28afb796613c7e245b3c30c866001600160a01b0316638bdff1616040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561147957600080fd5b505af115801561148d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b19190611959565b600c5490915083158015906114c557508115155b156114e6576114de6114d78386611736565b8290610b33565b600c81905590505b6001600160a01b0386166000908152600d60205260409020548181141561152957505050506001600160a01b0383166000908152600e602052604090205461048e565b61155f6115406115398484611629565b889061171a565b6001600160a01b0389166000908152600e602052604090205490610b33565b6001600160a01b0388166000908152600e60209081526040808320849055600d909152902092909255509150509392505050565b600061048e670de0b6b3a7640000610dbe85855b6000826115b6575060006103e6565b828202828482816115c357fe5b041461048e5760405162461bcd60e51b815260040161053490611bcc565b60008082116116025760405162461bcd60e51b815260040161053490611b6b565b81838161160b57fe5b049392505050565b6000818310611622578161048e565b5090919050565b60008282111561164b5760405162461bcd60e51b815260040161053490611aee565b50900390565b60606116a6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117529092919063ffffffff16565b805190915015610f4357808060200190518101906116c49190611939565b610f435760405162461bcd60e51b815260040161053490611d37565b600061c4e062093a80816116f48583610b33565b03816116fc57fe5b0462093a8002019050919050565b60006103e682633b9aca006115a7565b600061048e6b033b2e3c9fd0803ce8000000610dbe85856115a7565b600061048e82610dbe856b033b2e3c9fd0803ce80000006115a7565b60606117618484600085611769565b949350505050565b60608247101561178b5760405162461bcd60e51b815260040161053490611b25565b6117948561182a565b6117b05760405162461bcd60e51b815260040161053490611d00565b60006060866001600160a01b031685876040516117cd91906119ab565b60006040518083038185875af1925050503d806000811461180a576040519150601f19603f3d011682016040523d82523d6000602084013e61180f565b606091505b509150915061181f828286611830565b979650505050505050565b3b151590565b6060831561183f57508161048e565b82511561184f5782518084602001fd5b8160405162461bcd60e51b815260040161053491906119ff565b80356001600160a01b03811681146103e657600080fd5b600060208284031215611891578081fd5b61048e8383611869565b600080604083850312156118ad578081fd5b6118b78484611869565b91506118c68460208501611869565b90509250929050565b6000806000606084860312156118e3578081fd5b83356118ee81611e23565b925060208401356118fe81611e23565b929592945050506040919091013590565b60008060408385031215611921578182fd5b61192b8484611869565b946020939093013593505050565b60006020828403121561194a578081fd5b8151801515811461048e578182fd5b60006020828403121561196a578081fd5b5051919050565b600080600080600060a08688031215611988578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b600082516119bd818460208701611df7565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152611a1e816040850160208701611df7565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526010908201526f04f6e6c7920737461626c6520737761760841b604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600f908201526e139bdd081a5b5c1b195b595b9d1959608a1b604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b958652602086019490945260408501929092526060840152608083015260a082015260c00190565b60ff91909116815260200190565b60005b83811015611e12578181015183820152602001611dfa565b838111156105845750506000910152565b6001600160a01b0381168114611e3857600080fd5b5056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220fa3ba8aff0e65ff2f0f6d9d2b9fa5b65ac986d532bcce0e583ae6e75df4adfb464736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000ec8bfa1d15842d6b670d11777a08c39b09a5ff00000000000000000000000000f3bf24b8fdb80b167b3fb6b97131fb942579dafa000000000000000000000000fae0e20b4d74531e58ea31a964adfc61c08fa13b0000000000000000000000004b0d5fe3c1f58fd68d20651a5bc761553c10d955000000000000000000000000ffd17794bf2e3ba798170f358225763f1af8f5ba00000000000000000000000062b4b4723770a8f28afb796613c7e245b3c30c86000000000000000000000000000000000000000000000000000000000000001a5472616e6368657373207374615953544f4e45322d53544f4e45000000000000000000000000000000000000000000000000000000000000000000000000000853544f4e45324c50000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): Tranchess staYSTONE2-STONE
Arg [1] : symbol_ (string): STONE2LP
Arg [2] : stableSwap_ (address): 0xEC8bFa1D15842D6B670d11777A08c39B09A5FF00
Arg [3] : chessSchedule_ (address): 0xF3bf24b8FdB80B167B3fb6b97131fB942579Dafa
Arg [4] : chessController_ (address): 0xFAe0E20b4d74531e58ea31A964ADFC61C08FA13B
Arg [5] : fund_ (address): 0x4B0D5Fe3C1F58FD68D20651A5bC761553C10D955
Arg [6] : votingEscrow_ (address): 0xffD17794bF2e3BA798170f358225763F1aF8f5ba
Arg [7] : swapBonus_ (address): 0x62b4b4723770a8F28aFb796613C7E245B3c30C86
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 000000000000000000000000ec8bfa1d15842d6b670d11777a08c39b09a5ff00
Arg [3] : 000000000000000000000000f3bf24b8fdb80b167b3fb6b97131fb942579dafa
Arg [4] : 000000000000000000000000fae0e20b4d74531e58ea31a964adfc61c08fa13b
Arg [5] : 0000000000000000000000004b0d5fe3c1f58fd68d20651a5bc761553c10d955
Arg [6] : 000000000000000000000000ffd17794bf2e3ba798170f358225763f1af8f5ba
Arg [7] : 00000000000000000000000062b4b4723770a8f28afb796613c7e245b3c30c86
Arg [8] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [9] : 5472616e6368657373207374615953544f4e45322d53544f4e45000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [11] : 53544f4e45324c50000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
SCROLL | 100.00% | $0.064328 | 11,456.7076 | $736.99 |
Loading...
Loading
Loading...
Loading
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.