More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 52 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Redeem | 13682933 | 1085 days ago | IN | 0 ETH | 0.00755327 | ||||
Redeem | 13678338 | 1086 days ago | IN | 0 ETH | 0.01138836 | ||||
Redeem | 13667185 | 1087 days ago | IN | 0 ETH | 0.00959439 | ||||
Redeem | 13665685 | 1088 days ago | IN | 0 ETH | 0.01850774 | ||||
Redeem | 13659457 | 1089 days ago | IN | 0 ETH | 0.00703593 | ||||
Redeem | 13658491 | 1089 days ago | IN | 0 ETH | 0.00505393 | ||||
Redeem | 13654911 | 1089 days ago | IN | 0 ETH | 0.00984799 | ||||
Redeem | 13654911 | 1089 days ago | IN | 0 ETH | 0.01828268 | ||||
Deposit | 13653415 | 1089 days ago | IN | 0 ETH | 0.02709718 | ||||
Deposit | 13653388 | 1090 days ago | IN | 0 ETH | 0.00715502 | ||||
Set Bond Terms | 13653382 | 1090 days ago | IN | 0 ETH | 0.0028267 | ||||
Deposit | 13653355 | 1090 days ago | IN | 0 ETH | 0.00813023 | ||||
Set Bond Terms | 13653275 | 1090 days ago | IN | 0 ETH | 0.00353249 | ||||
Set Staking | 13652939 | 1090 days ago | IN | 0 ETH | 0.00561942 | ||||
Deposit | 13652115 | 1090 days ago | IN | 0 ETH | 0.02569975 | ||||
Redeem | 13649402 | 1090 days ago | IN | 0 ETH | 0.00732782 | ||||
Redeem | 13648879 | 1090 days ago | IN | 0 ETH | 0.00837807 | ||||
Redeem | 13648829 | 1090 days ago | IN | 0 ETH | 0.00812951 | ||||
Redeem | 13646173 | 1091 days ago | IN | 0 ETH | 0.00887519 | ||||
Redeem | 13646077 | 1091 days ago | IN | 0 ETH | 0.00579872 | ||||
Redeem | 13644439 | 1091 days ago | IN | 0 ETH | 0.00659095 | ||||
Redeem | 13641770 | 1091 days ago | IN | 0 ETH | 0.01086616 | ||||
Set Bond Terms | 13637200 | 1092 days ago | IN | 0 ETH | 0.00315849 | ||||
Deposit | 13636855 | 1092 days ago | IN | 0 ETH | 0.03834302 | ||||
Redeem | 13636666 | 1092 days ago | IN | 0 ETH | 0.00521266 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
AxeBondDepository
Compiler Version
v0.7.5+commit.eb77ed08
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; import "./libraries/Ownable.sol"; import "./libraries/SafeMath.sol"; import "./libraries/FixedPoint.sol"; import "./libraries/ERC20.sol"; interface ITreasury { function deposit( uint _amount, address _token, uint _profit ) external returns ( bool ); function valueOfToken( address _token, uint _amount ) external view returns ( uint value_ ); } interface IBondCalculator { function valuation( address _LP, uint _amount ) external view returns ( uint ); function markdown( address _LP ) external view returns ( uint ); } interface IStaking { function stake( uint _amount, address _recipient ) external returns ( bool ); } interface IStakingHelper { function stake( uint _amount, address _recipient ) external; } contract AxeBondDepository is Ownable { using FixedPoint for *; using SafeERC20 for IERC20; using SafeMath for uint; /* ======== EVENTS ======== */ event BondCreated( uint deposit, uint indexed payout, uint indexed expires, uint indexed priceInUSD ); event BondRedeemed( address indexed recipient, uint payout, uint remaining ); event BondPriceChanged( uint indexed priceInUSD, uint indexed internalPrice, uint indexed debtRatio ); event ControlVariableAdjustment( uint initialBCV, uint newBCV, uint adjustment, bool addition ); /* ======== STATE VARIABLES ======== */ address public immutable AXE; // token given as payment for bond address public immutable principle; // token used to create bond address public immutable treasury; // mints AXE when receives principle address public immutable DAO; // receives profit share from bond bool public immutable isLiquidityBond; // LP and Reserve bonds are treated slightly different address public immutable bondCalculator; // calculates value of LP tokens address public staking; // to auto-stake payout address public stakingHelper; // to stake and claim if no staking warmup bool public useHelper; Terms public terms; // stores terms for new bonds Adjust public adjustment; // stores adjustment to BCV data mapping( address => Bond ) public bondInfo; // stores bond information for depositors uint public totalDebt; // total value of outstanding bonds; used for pricing uint public lastDecay; // reference block for debt decay /* ======== STRUCTS ======== */ // Info for creating new bonds struct Terms { uint controlVariable; // scaling variable for price uint vestingTerm; // in seconds uint minimumPrice; // vs principle value uint maxPayout; // in thousandths of a %. i.e. 500 = 0.5% uint fee; // as % of bond payout, in hundreths. ( 500 = 5% = 0.05 for every 1 paid) uint maxDebt; // 9 decimal debt ratio, max % total supply created as debt } // Info for bond holder struct Bond { uint payout; // AXE remaining to be paid uint vesting; // Blocks left to vest uint lastTimestamp; // Last interaction uint pricePaid; // In DAI, for front end viewing } // Info for incremental adjustments to control variable struct Adjust { bool add; // addition or subtraction uint rate; // increment uint target; // BCV when adjustment finished uint buffer; // minimum length (in seconds) between adjustments uint lastTimestamp; // block when last adjustment made } /* ======== INITIALIZATION ======== */ constructor ( address _AXE, address _principle, address _treasury, address _DAO, address _bondCalculator ) { require( _AXE != address(0) ); AXE = _AXE; require( _principle != address(0) ); principle = _principle; require( _treasury != address(0) ); treasury = _treasury; require( _DAO != address(0) ); DAO = _DAO; // bondCalculator should be address(0) if not LP bond bondCalculator = _bondCalculator; isLiquidityBond = ( _bondCalculator != address(0) ); } /** * @notice initializes bond parameters * @param _controlVariable uint * @param _vestingTerm uint * @param _minimumPrice uint * @param _maxPayout uint * @param _fee uint * @param _maxDebt uint * @param _initialDebt uint */ function initializeBondTerms( uint _controlVariable, uint _vestingTerm, uint _minimumPrice, uint _maxPayout, uint _fee, uint _maxDebt, uint _initialDebt ) external onlyOwner() { require( terms.controlVariable == 0, "Bonds must be initialized from 0" ); terms = Terms ({ controlVariable: _controlVariable, vestingTerm: _vestingTerm, minimumPrice: _minimumPrice, maxPayout: _maxPayout, fee: _fee, maxDebt: _maxDebt }); totalDebt = _initialDebt; lastDecay = block.timestamp; } /* ======== POLICY FUNCTIONS ======== */ enum PARAMETER { VESTING, PAYOUT, FEE, DEBT } /** * @notice set parameters for new bonds * @param _parameter PARAMETER * @param _input uint */ function setBondTerms ( PARAMETER _parameter, uint _input ) external onlyOwner() { if ( _parameter == PARAMETER.VESTING ) { // 0 require( _input >= 36 * 60 * 60, "Vesting must be longer than 36 hours" ); terms.vestingTerm = _input; } else if ( _parameter == PARAMETER.PAYOUT ) { // 1 require( _input <= 1000, "Payout cannot be above 1 percent" ); terms.maxPayout = _input; } else if ( _parameter == PARAMETER.FEE ) { // 2 require( _input <= 10000, "DAO fee cannot exceed payout" ); terms.fee = _input; } else if ( _parameter == PARAMETER.DEBT ) { // 3 terms.maxDebt = _input; } } /** * @notice set control variable adjustment * @param _addition bool * @param _increment uint * @param _target uint * @param _buffer uint */ function setAdjustment ( bool _addition, uint _increment, uint _target, uint _buffer ) external onlyOwner() { require( _increment <= terms.controlVariable.mul( 25 ).div( 1000 ), "Increment too large" ); adjustment = Adjust({ add: _addition, rate: _increment, target: _target, buffer: _buffer, lastTimestamp: block.timestamp }); } /** * @notice set contract for auto stake * @param _staking address * @param _helper bool */ function setStaking( address _staking, bool _helper ) external onlyOwner() { require( _staking != address(0) ); if ( _helper ) { useHelper = true; stakingHelper = _staking; } else { useHelper = false; staking = _staking; } } /* ======== USER FUNCTIONS ======== */ /** * @notice deposit bond * @param _amount uint * @param _maxPrice uint * @param _depositor address * @return uint */ function deposit( uint _amount, uint _maxPrice, address _depositor ) external returns ( uint ) { require( _depositor != address(0), "Invalid address" ); decayDebt(); require( totalDebt <= terms.maxDebt, "Max capacity reached" ); uint priceInUSD = bondPriceInUSD(); // Stored in bond info uint nativePrice = _bondPrice(); require( _maxPrice >= nativePrice, "Slippage limit: more than max price" ); // slippage protection uint value = ITreasury( treasury ).valueOfToken( principle, _amount ); uint payout = payoutFor( value ); // payout to bonder is computed require( payout >= 10000000, "Bond too small" ); // must be > 0.01 AXE ( underflow protection ) require( payout <= maxPayout(), "Bond too large"); // size protection because there is no slippage // profits are calculated uint fee = payout.mul( terms.fee ).div( 10000 ); uint profit = 0; if(value > payout.add( fee )) { profit = value.sub( payout ).sub( fee ); } else { profit = value.sub( payout ); fee = 0; } /** principle is transferred in approved and deposited into the treasury, returning (_amount - profit) AXE */ IERC20( principle ).safeTransferFrom( msg.sender, address(this), _amount ); IERC20( principle ).approve( address( treasury ), _amount ); ITreasury( treasury ).deposit( _amount, principle, profit ); if ( fee != 0 ) { // fee is transferred to dao IERC20( AXE ).safeTransfer( DAO, fee ); } // total debt is increased totalDebt = totalDebt.add( value ); // depositor info is stored bondInfo[ _depositor ] = Bond({ payout: bondInfo[ _depositor ].payout.add( payout ), vesting: terms.vestingTerm, lastTimestamp: block.timestamp, pricePaid: priceInUSD }); // indexed events are emitted emit BondCreated( _amount, payout, block.timestamp.add( terms.vestingTerm ), priceInUSD ); emit BondPriceChanged( bondPriceInUSD(), _bondPrice(), debtRatio() ); adjust(); // control variable is adjusted return payout; } /** * @notice redeem bond for user * @param _recipient address * @param _stake bool * @return uint */ function redeem( address _recipient, bool _stake ) external returns ( uint ) { Bond memory info = bondInfo[ _recipient ]; uint percentVested = percentVestedFor( _recipient ); // (blocks since last interaction / vesting term remaining) if ( percentVested >= 10000 ) { // if fully vested delete bondInfo[ _recipient ]; // delete user info emit BondRedeemed( _recipient, info.payout, 0 ); // emit bond data return stakeOrSend( _recipient, _stake, info.payout ); // pay user everything due } else { // if unfinished // calculate payout vested uint payout = info.payout.mul( percentVested ).div( 10000 ); // store updated deposit info bondInfo[ _recipient ] = Bond({ payout: info.payout.sub( payout ), vesting: info.vesting.sub( block.timestamp.sub( info.lastTimestamp ) ), lastTimestamp: block.timestamp, pricePaid: info.pricePaid }); emit BondRedeemed( _recipient, payout, bondInfo[ _recipient ].payout ); return stakeOrSend( _recipient, _stake, payout ); } } /* ======== INTERNAL HELPER FUNCTIONS ======== */ /** * @notice allow user to stake payout automatically * @param _stake bool * @param _amount uint * @return uint */ function stakeOrSend( address _recipient, bool _stake, uint _amount ) internal returns ( uint ) { if ( !_stake ) { // if user does not want to stake IERC20( AXE ).transfer( _recipient, _amount ); // send payout } else { // if user wants to stake if ( useHelper ) { // use if staking warmup is 0 IERC20( AXE ).approve( stakingHelper, _amount ); IStakingHelper( stakingHelper ).stake( _amount, _recipient ); } else { IERC20( AXE ).approve( staking, _amount ); IStaking( staking ).stake( _amount, _recipient ); } } return _amount; } /** * @notice makes incremental adjustment to control variable */ function adjust() internal { uint blockCanAdjust = adjustment.lastTimestamp.add( adjustment.buffer ); if( adjustment.rate != 0 && block.timestamp >= blockCanAdjust ) { uint initial = terms.controlVariable; if ( adjustment.add ) { terms.controlVariable = terms.controlVariable.add( adjustment.rate ); if ( terms.controlVariable >= adjustment.target ) { adjustment.rate = 0; } } else { terms.controlVariable = terms.controlVariable.sub( adjustment.rate ); if ( terms.controlVariable <= adjustment.target ) { adjustment.rate = 0; } } adjustment.lastTimestamp = block.timestamp; emit ControlVariableAdjustment( initial, terms.controlVariable, adjustment.rate, adjustment.add ); } } /** * @notice reduce total debt */ function decayDebt() internal { totalDebt = totalDebt.sub( debtDecay() ); lastDecay = block.timestamp; } /* ======== VIEW FUNCTIONS ======== */ /** * @notice determine maximum bond size * @return uint */ function maxPayout() public view returns ( uint ) { return IERC20( AXE ).totalSupply().mul( terms.maxPayout ).div( 100000 ); } /** * @notice calculate interest due for new bond * @param _value uint * @return uint */ function payoutFor( uint _value ) public view returns ( uint ) { return FixedPoint.fraction( _value, bondPrice() ).decode112with18().div( 1e16 ); } /** * @notice calculate current bond premium * @return price_ uint */ function bondPrice() public view returns ( uint price_ ) { price_ = terms.controlVariable.mul( debtRatio() ).add( 1e9 ).div( 1e7 ); if ( price_ < terms.minimumPrice ) { price_ = terms.minimumPrice; } } /** * @notice calculate current bond price and remove floor if above * @return price_ uint */ function _bondPrice() internal returns ( uint price_ ) { price_ = terms.controlVariable.mul( debtRatio() ).add( 1e9 ).div( 1e7 ); if ( price_ < terms.minimumPrice ) { price_ = terms.minimumPrice; } else if ( terms.minimumPrice != 0 ) { terms.minimumPrice = 0; } } /** * @notice converts bond price to DAI value * @return price_ uint */ function bondPriceInUSD() public view returns ( uint price_ ) { if( isLiquidityBond ) { price_ = bondPrice().mul( IBondCalculator( bondCalculator ).markdown( principle ) ).div( 100 ); } else { price_ = bondPrice().mul( 10 ** IERC20( principle ).decimals() ).div( 100 ); } } /** * @notice calculate current ratio of debt to AXE supply * @return debtRatio_ uint */ function debtRatio() public view returns ( uint debtRatio_ ) { uint supply = IERC20( AXE ).totalSupply(); debtRatio_ = FixedPoint.fraction( currentDebt().mul( 1e9 ), supply ).decode112with18().div( 1e18 ); } /** * @notice debt ratio in same terms for reserve or liquidity bonds * @return uint */ function standardizedDebtRatio() external view returns ( uint ) { if ( isLiquidityBond ) { return debtRatio().mul( IBondCalculator( bondCalculator ).markdown( principle ) ).div( 1e9 ); } else { return debtRatio(); } } /** * @notice calculate debt factoring in decay * @return uint */ function currentDebt() public view returns ( uint ) { return totalDebt.sub( debtDecay() ); } /** * @notice amount to decay total debt by * @return decay_ uint */ function debtDecay() public view returns ( uint decay_ ) { uint secondsSinceLast = block.timestamp.sub( lastDecay ); decay_ = totalDebt.mul( secondsSinceLast ).div( terms.vestingTerm ); if ( decay_ > totalDebt ) { decay_ = totalDebt; } } /** * @notice calculate how far into vesting a depositor is * @param _depositor address * @return percentVested_ uint */ function percentVestedFor( address _depositor ) public view returns ( uint percentVested_ ) { Bond memory bond = bondInfo[ _depositor ]; uint blocksSinceLast = block.timestamp.sub( bond.lastTimestamp ); uint vesting = bond.vesting; if ( vesting > 0 ) { percentVested_ = blocksSinceLast.mul( 10000 ).div( vesting ); } else { percentVested_ = 0; } } /** * @notice calculate amount of AXE available for claim by depositor * @param _depositor address * @return pendingPayout_ uint */ function pendingPayoutFor( address _depositor ) external view returns ( uint pendingPayout_ ) { uint percentVested = percentVestedFor( _depositor ); uint payout = bondInfo[ _depositor ].payout; if ( percentVested >= 10000 ) { pendingPayout_ = payout; } else { pendingPayout_ = payout.mul( percentVested ).div( 10000 ); } } /* ======= AUXILLIARY ======= */ /** * @notice allow anyone to send lost tokens (excluding principle or AXE) to the DAO * @return bool */ function recoverLostToken( address _token ) external returns ( bool ) { require( _token != AXE ); require( _token != principle ); IERC20( _token ).safeTransfer( DAO, IERC20( _token ).balanceOf( address(this) ) ); return true; } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; import "../interfaces/IERC20.sol"; import "./SafeMath.sol"; import "./Counters.sol"; import "./Address.sol"; abstract contract ERC20 is IERC20 { using SafeMath for uint256; // TODO comment actual hash value. bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( "ERC20Token" ); mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 internal _totalSupply; string internal _name; string internal _symbol; uint8 internal _decimals; constructor (string memory name_, string memory symbol_, uint8 decimals_) { _name = name_; _symbol = symbol_; _decimals = decimals_; } function name() public view override returns (string memory) { return _name; } function symbol() public view override returns (string memory) { return _symbol; } function decimals() public view override returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(msg.sender, spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } 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); } function _mint(address account_, uint256 ammount_) internal virtual { require(account_ != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address( this ), account_, ammount_); _totalSupply = _totalSupply.add(ammount_); _balances[account_] = _balances[account_].add(ammount_); emit Transfer(address( this ), account_, ammount_); } 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); } 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); } function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { } } interface IERC2612Permit { function permit( address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; function nonces(address owner) external view returns (uint256); } abstract contract ERC20Permit is ERC20, IERC2612Permit { using Counters for Counters.Counter; mapping(address => Counters.Counter) private _nonces; // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; bytes32 public DOMAIN_SEPARATOR; constructor() { uint256 chainID; assembly { chainID := chainid() } DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name())), keccak256(bytes("1")), // Version chainID, address(this) ) ); } function permit( address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override { require(block.timestamp <= deadline, "Permit: expired deadline"); bytes32 hashStruct = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, amount, _nonces[owner].current(), deadline)); bytes32 _hash = keccak256(abi.encodePacked(uint16(0x1901), DOMAIN_SEPARATOR, hashStruct)); address signer = ecrecover(_hash, v, r, s); require(signer != address(0) && signer == owner, "ZeroSwapPermit: Invalid signature"); _nonces[owner].increment(); _approve(owner, spender, amount); } function nonces(address owner) public view override returns (uint256) { return _nonces[owner].current(); } } 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)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { 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)); } function _callOptionalReturn(IERC20 token, bytes memory data) private { 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: AGPL-3.0-or-later pragma solidity 0.7.5; import './FullMath.sol'; import './BitMath.sol'; import './Babylonian.sol'; library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint256 _x; } uint8 private constant RESOLUTION = 112; uint256 private constant Q112 = 0x10000000000000000000000000000; uint256 private constant Q224 = 0x100000000000000000000000000000000000000000000000000000000; uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits) // decode a UQ112x112 into a uint112 by truncating after the radix point function decode(uq112x112 memory self) internal pure returns (uint112) { return uint112(self._x >> RESOLUTION); } // decode a uq112x112 into a uint with 18 decimals of precision function decode112with18(uq112x112 memory self) internal pure returns (uint) { return uint(self._x) / 5192296858534827; } function fraction(uint256 numerator, uint256 denominator) internal pure returns (uq112x112 memory) { require(denominator > 0, 'FixedPoint::fraction: division by zero'); if (numerator == 0) return FixedPoint.uq112x112(0); if (numerator <= uint144(-1)) { uint256 result = (numerator << RESOLUTION) / denominator; require(result <= uint224(-1), 'FixedPoint::fraction: overflow'); return uq112x112(uint224(result)); } else { uint256 result = FullMath.mulDiv(numerator, Q112, denominator); require(result <= uint224(-1), 'FixedPoint::fraction: overflow'); return uq112x112(uint224(result)); } } // square root of a UQ112x112 // lossy between 0/1 and 40 bits function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) { if (self._x <= uint144(-1)) { return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112))); } uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x); safeShiftBits -= safeShiftBits % 2; return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << safeShiftBits) << ((112 - safeShiftBits) / 2))); } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } 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; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sqrrt(uint256 a) internal pure returns (uint c) { if (a > 3) { c = a; uint b = add( div( a, 2), 1 ); while (b < c) { c = b; b = div( add( div( a, b ), b), 2 ); } } else if (a != 0) { c = 1; } } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; interface IOwnable { function owner() external view returns (address); function renounceManagement() external; function pushManagement( address newOwner_ ) external; function pullManagement() external; } contract Ownable is IOwnable { address internal _owner; address internal _newOwner; event OwnershipPushed(address indexed previousOwner, address indexed newOwner); event OwnershipPulled(address indexed previousOwner, address indexed newOwner); constructor () { _owner = msg.sender; emit OwnershipPushed( address(0), _owner ); } function owner() public view override returns (address) { return _owner; } modifier onlyOwner() { require( _owner == msg.sender, "Ownable: caller is not the owner" ); _; } function renounceManagement() public virtual override onlyOwner() { emit OwnershipPushed( _owner, address(0) ); _owner = address(0); } function pushManagement( address newOwner_ ) public virtual override onlyOwner() { require( newOwner_ != address(0), "Ownable: new owner is the zero address"); emit OwnershipPushed( _owner, newOwner_ ); _newOwner = newOwner_; } function pullManagement() public virtual override { require( msg.sender == _newOwner, "Ownable: must be new owner to pull"); emit OwnershipPulled( _owner, _newOwner ); _owner = _newOwner; } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; library Babylonian { function sqrt(uint256 x) internal pure returns (uint256) { if (x == 0) return 0; uint256 xx = x; uint256 r = 1; if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; } if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; } if (xx >= 0x100000000) { xx >>= 32; r <<= 16; } if (xx >= 0x10000) { xx >>= 16; r <<= 8; } if (xx >= 0x100) { xx >>= 8; r <<= 4; } if (xx >= 0x10) { xx >>= 4; r <<= 2; } if (xx >= 0x8) { r <<= 1; } r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; // Seven iterations should be enough uint256 r1 = x / r; return (r < r1 ? r : r1); } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; library BitMath { function mostSignificantBit(uint256 x) internal pure returns (uint8 r) { require(x > 0, 'BitMath::mostSignificantBit: zero'); if (x >= 0x100000000000000000000000000000000) { x >>= 128; r += 128; } if (x >= 0x10000000000000000) { x >>= 64; r += 64; } if (x >= 0x100000000) { x >>= 32; r += 32; } if (x >= 0x10000) { x >>= 16; r += 16; } if (x >= 0x100) { x >>= 8; r += 8; } if (x >= 0x10) { x >>= 4; r += 4; } if (x >= 0x4) { x >>= 2; r += 2; } if (x >= 0x2) r += 1; } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; library FullMath { function fullMul(uint256 x, uint256 y) private pure returns (uint256 l, uint256 h) { uint256 mm = mulmod(x, y, uint256(-1)); l = x * y; h = mm - l; if (mm < l) h -= 1; } function fullDiv( uint256 l, uint256 h, uint256 d ) private pure returns (uint256) { uint256 pow2 = d & -d; d /= pow2; l /= pow2; l += h * ((-pow2) / pow2 + 1); uint256 r = 1; r *= 2 - d * r; r *= 2 - d * r; r *= 2 - d * r; r *= 2 - d * r; r *= 2 - d * r; r *= 2 - d * r; r *= 2 - d * r; r *= 2 - d * r; return l * r; } function mulDiv( uint256 x, uint256 y, uint256 d ) internal pure returns (uint256) { (uint256 l, uint256 h) = fullMul(x, y); uint256 mm = mulmod(x, y, d); if (mm > l) h -= 1; l -= mm; require(h < d, 'FullMath::mulDiv: overflow'); return fullDiv(l, h, d); } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; library Address { function isContract(address account) internal view returns (bool) { uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } 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"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } 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"); } 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); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); 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); } } } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } 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); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } 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 { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function addressToString(address _address) internal pure returns(string memory) { bytes32 _bytes = bytes32(uint256(_address)); bytes memory HEX = "0123456789abcdef"; bytes memory _addr = new bytes(42); _addr[0] = '0'; _addr[1] = 'x'; for(uint256 i = 0; i < 20; i++) { _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)]; _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)]; } return string(_addr); } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; import "./SafeMath.sol"; library Counters { using SafeMath for uint256; struct Counter { uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } }
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity >=0.5.0; interface IERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } interface IERC20Mintable { function mint( uint256 amount_ ) external; function mint( address account_, uint256 ammount_ ) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_AXE","type":"address"},{"internalType":"address","name":"_principle","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_DAO","type":"address"},{"internalType":"address","name":"_bondCalculator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"deposit","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"payout","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"expires","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"priceInUSD","type":"uint256"}],"name":"BondCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"priceInUSD","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"internalPrice","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"debtRatio","type":"uint256"}],"name":"BondPriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"payout","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"remaining","type":"uint256"}],"name":"BondRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"initialBCV","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBCV","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"adjustment","type":"uint256"},{"indexed":false,"internalType":"bool","name":"addition","type":"bool"}],"name":"ControlVariableAdjustment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipPulled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipPushed","type":"event"},{"inputs":[],"name":"AXE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DAO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adjustment","outputs":[{"internalType":"bool","name":"add","type":"bool"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"uint256","name":"target","type":"uint256"},{"internalType":"uint256","name":"buffer","type":"uint256"},{"internalType":"uint256","name":"lastTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bondCalculator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bondInfo","outputs":[{"internalType":"uint256","name":"payout","type":"uint256"},{"internalType":"uint256","name":"vesting","type":"uint256"},{"internalType":"uint256","name":"lastTimestamp","type":"uint256"},{"internalType":"uint256","name":"pricePaid","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bondPrice","outputs":[{"internalType":"uint256","name":"price_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bondPriceInUSD","outputs":[{"internalType":"uint256","name":"price_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"debtDecay","outputs":[{"internalType":"uint256","name":"decay_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"debtRatio","outputs":[{"internalType":"uint256","name":"debtRatio_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_maxPrice","type":"uint256"},{"internalType":"address","name":"_depositor","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_controlVariable","type":"uint256"},{"internalType":"uint256","name":"_vestingTerm","type":"uint256"},{"internalType":"uint256","name":"_minimumPrice","type":"uint256"},{"internalType":"uint256","name":"_maxPayout","type":"uint256"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_maxDebt","type":"uint256"},{"internalType":"uint256","name":"_initialDebt","type":"uint256"}],"name":"initializeBondTerms","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isLiquidityBond","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastDecay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPayout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"payoutFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_depositor","type":"address"}],"name":"pendingPayoutFor","outputs":[{"internalType":"uint256","name":"pendingPayout_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_depositor","type":"address"}],"name":"percentVestedFor","outputs":[{"internalType":"uint256","name":"percentVested_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"principle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pullManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner_","type":"address"}],"name":"pushManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverLostToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"bool","name":"_stake","type":"bool"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceManagement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_addition","type":"bool"},{"internalType":"uint256","name":"_increment","type":"uint256"},{"internalType":"uint256","name":"_target","type":"uint256"},{"internalType":"uint256","name":"_buffer","type":"uint256"}],"name":"setAdjustment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum AxeBondDepository.PARAMETER","name":"_parameter","type":"uint8"},{"internalType":"uint256","name":"_input","type":"uint256"}],"name":"setBondTerms","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staking","type":"address"},{"internalType":"bool","name":"_helper","type":"bool"}],"name":"setStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingHelper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"standardizedDebtRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"terms","outputs":[{"internalType":"uint256","name":"controlVariable","type":"uint256"},{"internalType":"uint256","name":"vestingTerm","type":"uint256"},{"internalType":"uint256","name":"minimumPrice","type":"uint256"},{"internalType":"uint256","name":"maxPayout","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"maxDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"useHelper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101406040523480156200001257600080fd5b5060405162002c6638038062002c66833981810160405260a08110156200003857600080fd5b50805160208201516040808401516060850151608090950151600080546001600160a01b031916331780825593519596949592949391926001600160a01b0392909216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908290a36001600160a01b038516620000b557600080fd5b6001600160601b0319606086901b166080526001600160a01b038416620000db57600080fd5b6001600160601b0319606085901b1660a0526001600160a01b0383166200010157600080fd5b6001600160601b0319606084901b1660c0526001600160a01b0382166200012757600080fd5b6001600160601b0319606092831b811660e0529181901b909116610120526001600160a01b0316151560f81b6101005250505060805160601c60a05160601c60c05160601c60e05160601c6101005160f81c6101205160601c612a386200022e60003980610f6e5280611729528061194c525080610f4052806116f85280611b2752508061159e52806117f25280611899525080610db152806111e6528061141052806114f252508061059b5280610f9d5280611044528061121552806113b752806113e152806114c152806117585280611857525080610f1a528061157c5280611818528061199a5280611b9c5280611d215280611e065280611f1b5250612a386000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c80637dd2a0ee11610125578063cea55f57116100ad578063d7ccfb0b1161007c578063d7ccfb0b14610571578063e0176de814610579578063e392a26214610581578063f5c2ab5b14610589578063fc7b9c181461059157610211565b8063cea55f57146104f8578063d4d863ce14610500578063d50256251461052e578063d79690601461056957610211565b8063904b3ece116100f4578063904b3ece1461046e57806398fabd3a14610476578063b4abccba1461047e578063c5332b7c146104a4578063cd1234b3146104ac57610211565b80637dd2a0ee14610424578063844b5c7c1461042c5780638da5cb5b146104345780638dbdbe6d1461043c57610211565b806346f68ee9116101a857806361d027b31161017757806361d027b3146103ae57806371535008146103b6578063759076e5146103f757806377b81895146103ff5780637927ebf81461040757610211565b806346f68ee9146103525780634cf088d914610378578063507930ec146103805780635a96ac0a146103a657610211565b80631e321a0f116101e45780631e321a0f146102ad5780631feed31f146102d35780632f3f470a14610301578063451ee4a11461031d57610211565b8063016a42841461021657806301b88ee81461023a578063089208d8146102725780631a3d00681461027c575b600080fd5b61021e610599565b604080516001600160a01b039092168252519081900360200190f35b6102606004803603602081101561025057600080fd5b50356001600160a01b03166105bd565b60408051918252519081900360200190f35b61027a610616565b005b61027a6004803603608081101561029257600080fd5b508035151590602081013590604081013590606001356106ad565b61027a600480360360408110156102c357600080fd5b5060ff81351690602001356107a5565b610260600480360360408110156102e957600080fd5b506001600160a01b038135169060200135151561095a565b610309610b4f565b604080519115158252519081900360200190f35b610325610b5f565b60408051951515865260208601949094528484019290925260608401526080830152519081900360a00190f35b61027a6004803603602081101561036857600080fd5b50356001600160a01b0316610b77565b61021e610c64565b6102606004803603602081101561039657600080fd5b50356001600160a01b0316610c73565b61027a610d05565b61021e610daf565b61027a600480360360e08110156103cc57600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c00135610dd3565b610260610ec7565b61021e610ee3565b6102606004803603602081101561041d57600080fd5b5035610ef2565b61021e610f18565b610260610f3c565b61021e6110d5565b6102606004803603606081101561045257600080fd5b50803590602081013590604001356001600160a01b03166110e4565b6102606116f4565b61021e6117f0565b6103096004803603602081101561049457600080fd5b50356001600160a01b0316611814565b61021e61194a565b6104d2600480360360208110156104c257600080fd5b50356001600160a01b031661196e565b604080519485526020850193909352838301919091526060830152519081900360800190f35b610260611995565b61027a6004803603604081101561051657600080fd5b506001600160a01b0381351690602001351515611a4d565b610536611b10565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b610309611b25565b610260611b49565b610260611b88565b610260611c25565b610260611c6a565b610260611c70565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806105c983610c73565b6001600160a01b0384166000908152600f602052604090205490915061271082106105f65780925061060f565b61060c6127106106068385611c76565b90611cd6565b92505b5050919050565b6000546001600160a01b03163314610663576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106fa576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b600454610710906103e890610606906019611c76565b83111561075a576040805162461bcd60e51b8152602060048201526013602482015272496e6372656d656e7420746f6f206c6172676560681b604482015290519081900360640190fd5b6040805160a0810182529415158086526020860185905290850183905260608501829052426080909501859052600a805460ff19169091179055600b92909255600c55600d55600e55565b6000546001600160a01b031633146107f2576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b600082600381111561080057fe5b1415610852576201fa408110156108485760405162461bcd60e51b81526004018080602001828103825260248152602001806129b56024913960400191505060405180910390fd5b6005819055610956565b600182600381111561086057fe5b14156108c7576103e88111156108bd576040805162461bcd60e51b815260206004820181905260248201527f5061796f75742063616e6e6f742062652061626f766520312070657263656e74604482015290519081900360640190fd5b6007819055610956565b60028260038111156108d557fe5b141561093c57612710811115610932576040805162461bcd60e51b815260206004820152601c60248201527f44414f206665652063616e6e6f7420657863656564207061796f757400000000604482015290519081900360640190fd5b6008819055610956565b600382600381111561094a57fe5b14156109565760098190555b5050565b60006109646128a8565b506001600160a01b0383166000908152600f60209081526040808320815160808101835281548152600182015493810193909352600281015491830191909152600301546060820152906109b785610c73565b90506127108110610a47576001600160a01b0385166000818152600f602090815260408083208381556001810184905560028101849055600301839055855181519081529182019290925281517f51c99f515c87b0d95ba97f616edd182e8f161c4932eac17c6fefe9dab58b77b1929181900390910190a2610a3e85858460000151611d18565b92505050610b49565b8151600090610a5e90612710906106069085611c76565b90506040518060800160405280610a8283866000015161201c90919063ffffffff16565b8152602001610aac610aa186604001514261201c90919063ffffffff16565b60208701519061201c565b8152426020808301919091526060808701516040938401526001600160a01b038a166000818152600f84528490208551808255868501516001830155868601516002830155959092015160039092019190915582518581529182019390935281517f51c99f515c87b0d95ba97f616edd182e8f161c4932eac17c6fefe9dab58b77b1929181900390910190a2610b43868683611d18565b93505050505b92915050565b600354600160a01b900460ff1681565b600a54600b54600c54600d54600e5460ff9094169385565b6000546001600160a01b03163314610bc4576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b6001600160a01b038116610c095760405162461bcd60e51b81526004018080602001828103825260268152602001806128e36026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b6000610c7d6128a8565b506001600160a01b0382166000908152600f602090815260408083208151608081018352815481526001820154938101939093526002810154918301829052600301546060830152909190610cd390429061201c565b60208301519091508015610cf857610cf18161060684612710611c76565b9350610cfd565b600093505b505050919050565b6001546001600160a01b03163314610d4e5760405162461bcd60e51b81526004018080602001828103825260228152602001806129096022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b03163314610e20576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b60045415610e75576040805162461bcd60e51b815260206004820181905260248201527f426f6e6473206d75737420626520696e697469616c697a65642066726f6d2030604482015290519081900360640190fd5b6040805160c08101825288815260208101889052908101869052606081018590526080810184905260a00182905260049690965560059490945560069290925560075560085560095560105542601155565b6000610edd610ed4611c25565b6010549061201c565b90505b90565b6003546001600160a01b031681565b6000610b49662386f26fc10000610606610f1385610f0e611b49565b61205e565b6121d5565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000001561103a5761103360646106067f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166332da80a37f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610ff957600080fd5b505afa15801561100d573d6000803e3d6000fd5b505050506040513d602081101561102357600080fd5b505161102d611b49565b90611c76565b9050610ee0565b610edd60646106067f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561109b57600080fd5b505afa1580156110af573d6000803e3d6000fd5b505050506040513d60208110156110c557600080fd5b505160ff16600a0a61102d611b49565b6000546001600160a01b031690565b60006001600160a01b038216611133576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b61113b6121ed565b600954601054111561118b576040805162461bcd60e51b815260206004820152601460248201527313585e0818d85c1858da5d1e481c995858da195960621b604482015290519081900360640190fd5b6000611195610f3c565b905060006111a1612201565b9050808510156111e25760405162461bcd60e51b81526004018080602001828103825260238152602001806129926023913960400191505060405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d1b317e57f0000000000000000000000000000000000000000000000000000000000000000896040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561127957600080fd5b505afa15801561128d573d6000803e3d6000fd5b505050506040513d60208110156112a357600080fd5b5051905060006112b282610ef2565b9050629896808110156112fd576040805162461bcd60e51b815260206004820152600e60248201526d109bdb99081d1bdbc81cdb585b1b60921b604482015290519081900360640190fd5b611305611b88565b81111561134a576040805162461bcd60e51b815260206004820152600e60248201526d426f6e6420746f6f206c6172676560901b604482015290519081900360640190fd5b6000611369612710610606600480015485611c7690919063ffffffff16565b905060006113778383612243565b841115611399576113928261138c868661201c565b9061201c565b90506113aa565b6113a3848461201c565b9050600091505b6113df6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308d61229d565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663095ea7b37f00000000000000000000000000000000000000000000000000000000000000008c6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561147657600080fd5b505af115801561148a573d6000803e3d6000fd5b505050506040513d60208110156114a057600080fd5b50506040805163bc157ac160e01b8152600481018c90526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660248301526044820184905291517f00000000000000000000000000000000000000000000000000000000000000009092169163bc157ac1916064808201926020929091908290030181600087803b15801561153d57600080fd5b505af1158015611551573d6000803e3d6000fd5b505050506040513d602081101561156757600080fd5b505081156115c3576115c36001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000846122fd565b6010546115d09085612243565b601055604080516080810182526001600160a01b038a166000908152600f602052919091205481906116029086612243565b81526005805460208084019190915242604080850182905260609485018c90526001600160a01b038e166000908152600f8452819020865181559286015160018401558501516002830155939092015160039092019190915554879161166791612243565b604080518d8152905186917f1fec6dc81f140574bf43f6b1e420ae1dd47928b9d57db8cbd7b8611063b85ae5919081900360200190a46116a5611995565b6116ad612201565b6116b5610f3c565b6040517f375b221f40939bfd8f49723a17cf7bc6d576ebf72efe2cc3e991826f5b3f390a90600090a46116e6612354565b509098975050505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000156117e857611033633b9aca006106067f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166332da80a37f00000000000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117b457600080fd5b505afa1580156117c8573d6000803e3d6000fd5b505050506040513d60208110156117de57600080fd5b505161102d611995565b611033611995565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561185557600080fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316141561189457600080fd5b6119427f0000000000000000000000000000000000000000000000000000000000000000836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561190557600080fd5b505afa158015611919573d6000803e3d6000fd5b505050506040513d602081101561192f57600080fd5b50516001600160a01b03851691906122fd565b506001919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f6020526000908152604090208054600182015460028301546003909301549192909184565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f157600080fd5b505afa158015611a05573d6000803e3d6000fd5b505050506040513d6020811015611a1b57600080fd5b50519050611a47670de0b6b3a7640000610606610f13611a41633b9aca0061102d610ec7565b8561205e565b91505090565b6000546001600160a01b03163314611a9a576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b6001600160a01b038216611aad57600080fd5b8015611ae25760038054600160a01b60ff60a01b19909116176001600160a01b0319166001600160a01b038416179055610956565b6003805460ff60a01b19169055600280546001600160a01b0384166001600160a01b03199091161790555050565b60045460055460065460075460085460095486565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000611b7462989680610606633b9aca00611b6e611b65611995565b60045490611c76565b90612243565b600654909150811015610ee0575060065490565b6000610edd620186a06106066004600301547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bf357600080fd5b505afa158015611c07573d6000803e3d6000fd5b505050506040513d6020811015611c1d57600080fd5b505190611c76565b600080611c3d6011544261201c90919063ffffffff16565b600554601054919250611c54916106069084611c76565b9150601054821115611c665760105491505b5090565b60115481565b60105481565b600082611c8557506000610b49565b82820282848281611c9257fe5b0414611ccf5760405162461bcd60e51b81526004018080602001828103825260218152602001806129516021913960400191505060405180910390fd5b9392505050565b6000611ccf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612434565b600082611dc8577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb85846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611d9657600080fd5b505af1158015611daa573d6000803e3d6000fd5b505050506040513d6020811015611dc057600080fd5b506120159050565b600354600160a01b900460ff1615611eef576003546040805163095ea7b360e01b81526001600160a01b0392831660048201526024810185905290517f00000000000000000000000000000000000000000000000000000000000000009092169163095ea7b3916044808201926020929091908290030181600087803b158015611e5157600080fd5b505af1158015611e65573d6000803e3d6000fd5b505050506040513d6020811015611e7b57600080fd5b505060035460408051637acb775760e01b8152600481018590526001600160a01b03878116602483015291519190921691637acb775791604480830192600092919082900301818387803b158015611ed257600080fd5b505af1158015611ee6573d6000803e3d6000fd5b50505050612015565b6002546040805163095ea7b360e01b81526001600160a01b0392831660048201526024810185905290517f00000000000000000000000000000000000000000000000000000000000000009092169163095ea7b3916044808201926020929091908290030181600087803b158015611f6657600080fd5b505af1158015611f7a573d6000803e3d6000fd5b505050506040513d6020811015611f9057600080fd5b505060025460408051637acb775760e01b8152600481018590526001600160a01b03878116602483015291519190921691637acb77579160448083019260209291908290030181600087803b158015611fe857600080fd5b505af1158015611ffc573d6000803e3d6000fd5b505050506040513d602081101561201257600080fd5b50505b5092915050565b6000611ccf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506124d6565b6120666128d0565b600082116120a55760405162461bcd60e51b815260040180806020018281038252602681526020018061292b6026913960400191505060405180910390fd5b826120bf5750604080516020810190915260008152610b49565b71ffffffffffffffffffffffffffffffffffff831161216657600082607085901b816120e757fe5b0490506001600160e01b03811115612146576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b6040518060200160405280826001600160e01b0316815250915050610b49565b600061217784600160701b85612530565b90506001600160e01b03811115612146576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b516612725dd1d243ab6001600160e01b039091160490565b6121f8610ed4611c25565b60105542601155565b600061221d62989680610606633b9aca00611b6e611b65611995565b6006549091508110156122335750600654610ee0565b60065415610ee057600060065590565b600082820183811015611ccf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526122f79085906125d0565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261234f9084906125d0565b505050565b600d54600e546000916123679190612243565b600b549091501580159061237b5750804210155b1561243157600454600a5460ff16156123b557600b5460045461239d91612243565b6004819055600c54116123b0576000600b555b6123d7565b600b546004546123c49161201c565b6004819055600c54106123d7576000600b555b42600e55600454600b54600a546040805185815260208101949094528381019290925260ff1615156060830152517fb923e581a0f83128e9e1d8297aa52b18d6744310476e0b54509c054cd7a93b2a9181900360800190a1505b50565b600081836124c05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561248557818101518382015260200161246d565b50505050905090810190601f1680156124b25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124cc57fe5b0495945050505050565b600081848411156125285760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561248557818101518382015260200161246d565b505050900390565b600080600061253f8686612681565b915091506000848061254d57fe5b868809905082811115612561576001820391505b80830392508482106125ba576040805162461bcd60e51b815260206004820152601a60248201527f46756c6c4d6174683a3a6d756c4469763a206f766572666c6f77000000000000604482015290519081900360640190fd5b6125c58383876126ae565b979650505050505050565b6060612625826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661271e9092919063ffffffff16565b80519091501561234f5780806020019051602081101561264457600080fd5b505161234f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806129d9602a913960400191505060405180910390fd5b60008080600019848609905083850292508281039150828110156126a6576001820391505b509250929050565b600081810382168083816126be57fe5b0492508085816126ca57fe5b0494508081600003816126d957fe5b60028581038087028203028087028203028087028203028087028203028087028203028087028203029586029003909402930460010193909302939093010292915050565b606061272d8484600085612735565b949350505050565b6060612740856128a2565b612791576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106127d05780518252601f1990920191602091820191016127b1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612832576040519150601f19603f3d011682016040523d82523d6000602084013e612837565b606091505b5091509150811561284b57915061272d9050565b80511561285b5780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561248557818101518382015260200161246d565b3b151590565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6040805160208101909152600081529056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6c4669786564506f696e743a3a6672616374696f6e3a206469766973696f6e206279207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572536c697070616765206c696d69743a206d6f7265207468616e206d617820707269636556657374696e67206d757374206265206c6f6e676572207468616e20333620686f7572735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d527ea6b9a37ebe0833e5fa4876ecaa5d44d1ac254337e7369d6da78441676ca64736f6c6343000705003300000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000a2039621cc042567092faaee89b03ef959f897120000000000000000000000003586075f3997d52c866b00fa6bbb8eb6e1b702cd0000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102115760003560e01c80637dd2a0ee11610125578063cea55f57116100ad578063d7ccfb0b1161007c578063d7ccfb0b14610571578063e0176de814610579578063e392a26214610581578063f5c2ab5b14610589578063fc7b9c181461059157610211565b8063cea55f57146104f8578063d4d863ce14610500578063d50256251461052e578063d79690601461056957610211565b8063904b3ece116100f4578063904b3ece1461046e57806398fabd3a14610476578063b4abccba1461047e578063c5332b7c146104a4578063cd1234b3146104ac57610211565b80637dd2a0ee14610424578063844b5c7c1461042c5780638da5cb5b146104345780638dbdbe6d1461043c57610211565b806346f68ee9116101a857806361d027b31161017757806361d027b3146103ae57806371535008146103b6578063759076e5146103f757806377b81895146103ff5780637927ebf81461040757610211565b806346f68ee9146103525780634cf088d914610378578063507930ec146103805780635a96ac0a146103a657610211565b80631e321a0f116101e45780631e321a0f146102ad5780631feed31f146102d35780632f3f470a14610301578063451ee4a11461031d57610211565b8063016a42841461021657806301b88ee81461023a578063089208d8146102725780631a3d00681461027c575b600080fd5b61021e610599565b604080516001600160a01b039092168252519081900360200190f35b6102606004803603602081101561025057600080fd5b50356001600160a01b03166105bd565b60408051918252519081900360200190f35b61027a610616565b005b61027a6004803603608081101561029257600080fd5b508035151590602081013590604081013590606001356106ad565b61027a600480360360408110156102c357600080fd5b5060ff81351690602001356107a5565b610260600480360360408110156102e957600080fd5b506001600160a01b038135169060200135151561095a565b610309610b4f565b604080519115158252519081900360200190f35b610325610b5f565b60408051951515865260208601949094528484019290925260608401526080830152519081900360a00190f35b61027a6004803603602081101561036857600080fd5b50356001600160a01b0316610b77565b61021e610c64565b6102606004803603602081101561039657600080fd5b50356001600160a01b0316610c73565b61027a610d05565b61021e610daf565b61027a600480360360e08110156103cc57600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c00135610dd3565b610260610ec7565b61021e610ee3565b6102606004803603602081101561041d57600080fd5b5035610ef2565b61021e610f18565b610260610f3c565b61021e6110d5565b6102606004803603606081101561045257600080fd5b50803590602081013590604001356001600160a01b03166110e4565b6102606116f4565b61021e6117f0565b6103096004803603602081101561049457600080fd5b50356001600160a01b0316611814565b61021e61194a565b6104d2600480360360208110156104c257600080fd5b50356001600160a01b031661196e565b604080519485526020850193909352838301919091526060830152519081900360800190f35b610260611995565b61027a6004803603604081101561051657600080fd5b506001600160a01b0381351690602001351515611a4d565b610536611b10565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b610309611b25565b610260611b49565b610260611b88565b610260611c25565b610260611c6a565b610260611c70565b7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b6000806105c983610c73565b6001600160a01b0384166000908152600f602052604090205490915061271082106105f65780925061060f565b61060c6127106106068385611c76565b90611cd6565b92505b5050919050565b6000546001600160a01b03163314610663576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106fa576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b600454610710906103e890610606906019611c76565b83111561075a576040805162461bcd60e51b8152602060048201526013602482015272496e6372656d656e7420746f6f206c6172676560681b604482015290519081900360640190fd5b6040805160a0810182529415158086526020860185905290850183905260608501829052426080909501859052600a805460ff19169091179055600b92909255600c55600d55600e55565b6000546001600160a01b031633146107f2576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b600082600381111561080057fe5b1415610852576201fa408110156108485760405162461bcd60e51b81526004018080602001828103825260248152602001806129b56024913960400191505060405180910390fd5b6005819055610956565b600182600381111561086057fe5b14156108c7576103e88111156108bd576040805162461bcd60e51b815260206004820181905260248201527f5061796f75742063616e6e6f742062652061626f766520312070657263656e74604482015290519081900360640190fd5b6007819055610956565b60028260038111156108d557fe5b141561093c57612710811115610932576040805162461bcd60e51b815260206004820152601c60248201527f44414f206665652063616e6e6f7420657863656564207061796f757400000000604482015290519081900360640190fd5b6008819055610956565b600382600381111561094a57fe5b14156109565760098190555b5050565b60006109646128a8565b506001600160a01b0383166000908152600f60209081526040808320815160808101835281548152600182015493810193909352600281015491830191909152600301546060820152906109b785610c73565b90506127108110610a47576001600160a01b0385166000818152600f602090815260408083208381556001810184905560028101849055600301839055855181519081529182019290925281517f51c99f515c87b0d95ba97f616edd182e8f161c4932eac17c6fefe9dab58b77b1929181900390910190a2610a3e85858460000151611d18565b92505050610b49565b8151600090610a5e90612710906106069085611c76565b90506040518060800160405280610a8283866000015161201c90919063ffffffff16565b8152602001610aac610aa186604001514261201c90919063ffffffff16565b60208701519061201c565b8152426020808301919091526060808701516040938401526001600160a01b038a166000818152600f84528490208551808255868501516001830155868601516002830155959092015160039092019190915582518581529182019390935281517f51c99f515c87b0d95ba97f616edd182e8f161c4932eac17c6fefe9dab58b77b1929181900390910190a2610b43868683611d18565b93505050505b92915050565b600354600160a01b900460ff1681565b600a54600b54600c54600d54600e5460ff9094169385565b6000546001600160a01b03163314610bc4576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b6001600160a01b038116610c095760405162461bcd60e51b81526004018080602001828103825260268152602001806128e36026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917fea8258f2d9ddb679928cf34b78cf645b7feda9acc828e4dd82d014eaae270eba91a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031681565b6000610c7d6128a8565b506001600160a01b0382166000908152600f602090815260408083208151608081018352815481526001820154938101939093526002810154918301829052600301546060830152909190610cd390429061201c565b60208301519091508015610cf857610cf18161060684612710611c76565b9350610cfd565b600093505b505050919050565b6001546001600160a01b03163314610d4e5760405162461bcd60e51b81526004018080602001828103825260228152602001806129096022913960400191505060405180910390fd5b600154600080546040516001600160a01b0393841693909116917faa151555690c956fc3ea32f106bb9f119b5237a061eaa8557cff3e51e3792c8d91a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b7f000000000000000000000000a2039621cc042567092faaee89b03ef959f8971281565b6000546001600160a01b03163314610e20576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b60045415610e75576040805162461bcd60e51b815260206004820181905260248201527f426f6e6473206d75737420626520696e697469616c697a65642066726f6d2030604482015290519081900360640190fd5b6040805160c08101825288815260208101889052908101869052606081018590526080810184905260a00182905260049690965560059490945560069290925560075560085560095560105542601155565b6000610edd610ed4611c25565b6010549061201c565b90505b90565b6003546001600160a01b031681565b6000610b49662386f26fc10000610606610f1385610f0e611b49565b61205e565b6121d5565b7f00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c81565b60007f00000000000000000000000000000000000000000000000000000000000000001561103a5761103360646106067f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166332da80a37f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610ff957600080fd5b505afa15801561100d573d6000803e3d6000fd5b505050506040513d602081101561102357600080fd5b505161102d611b49565b90611c76565b9050610ee0565b610edd60646106067f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561109b57600080fd5b505afa1580156110af573d6000803e3d6000fd5b505050506040513d60208110156110c557600080fd5b505160ff16600a0a61102d611b49565b6000546001600160a01b031690565b60006001600160a01b038216611133576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b61113b6121ed565b600954601054111561118b576040805162461bcd60e51b815260206004820152601460248201527313585e0818d85c1858da5d1e481c995858da195960621b604482015290519081900360640190fd5b6000611195610f3c565b905060006111a1612201565b9050808510156111e25760405162461bcd60e51b81526004018080602001828103825260238152602001806129926023913960400191505060405180910390fd5b60007f000000000000000000000000a2039621cc042567092faaee89b03ef959f897126001600160a01b031663d1b317e57f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f896040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561127957600080fd5b505afa15801561128d573d6000803e3d6000fd5b505050506040513d60208110156112a357600080fd5b5051905060006112b282610ef2565b9050629896808110156112fd576040805162461bcd60e51b815260206004820152600e60248201526d109bdb99081d1bdbc81cdb585b1b60921b604482015290519081900360640190fd5b611305611b88565b81111561134a576040805162461bcd60e51b815260206004820152600e60248201526d426f6e6420746f6f206c6172676560901b604482015290519081900360640190fd5b6000611369612710610606600480015485611c7690919063ffffffff16565b905060006113778383612243565b841115611399576113928261138c868661201c565b9061201c565b90506113aa565b6113a3848461201c565b9050600091505b6113df6001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f1633308d61229d565b7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b031663095ea7b37f000000000000000000000000a2039621cc042567092faaee89b03ef959f897128c6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561147657600080fd5b505af115801561148a573d6000803e3d6000fd5b505050506040513d60208110156114a057600080fd5b50506040805163bc157ac160e01b8152600481018c90526001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f811660248301526044820184905291517f000000000000000000000000a2039621cc042567092faaee89b03ef959f897129092169163bc157ac1916064808201926020929091908290030181600087803b15801561153d57600080fd5b505af1158015611551573d6000803e3d6000fd5b505050506040513d602081101561156757600080fd5b505081156115c3576115c36001600160a01b037f00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c167f0000000000000000000000003586075f3997d52c866b00fa6bbb8eb6e1b702cd846122fd565b6010546115d09085612243565b601055604080516080810182526001600160a01b038a166000908152600f602052919091205481906116029086612243565b81526005805460208084019190915242604080850182905260609485018c90526001600160a01b038e166000908152600f8452819020865181559286015160018401558501516002830155939092015160039092019190915554879161166791612243565b604080518d8152905186917f1fec6dc81f140574bf43f6b1e420ae1dd47928b9d57db8cbd7b8611063b85ae5919081900360200190a46116a5611995565b6116ad612201565b6116b5610f3c565b6040517f375b221f40939bfd8f49723a17cf7bc6d576ebf72efe2cc3e991826f5b3f390a90600090a46116e6612354565b509098975050505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000156117e857611033633b9aca006106067f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166332da80a37f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117b457600080fd5b505afa1580156117c8573d6000803e3d6000fd5b505050506040513d60208110156117de57600080fd5b505161102d611995565b611033611995565b7f0000000000000000000000003586075f3997d52c866b00fa6bbb8eb6e1b702cd81565b60007f00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c6001600160a01b0316826001600160a01b0316141561185557600080fd5b7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316826001600160a01b0316141561189457600080fd5b6119427f0000000000000000000000003586075f3997d52c866b00fa6bbb8eb6e1b702cd836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561190557600080fd5b505afa158015611919573d6000803e3d6000fd5b505050506040513d602081101561192f57600080fd5b50516001600160a01b03851691906122fd565b506001919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f6020526000908152604090208054600182015460028301546003909301549192909184565b6000807f00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f157600080fd5b505afa158015611a05573d6000803e3d6000fd5b505050506040513d6020811015611a1b57600080fd5b50519050611a47670de0b6b3a7640000610606610f13611a41633b9aca0061102d610ec7565b8561205e565b91505090565b6000546001600160a01b03163314611a9a576040805162461bcd60e51b81526020600482018190526024820152600080516020612972833981519152604482015290519081900360640190fd5b6001600160a01b038216611aad57600080fd5b8015611ae25760038054600160a01b60ff60a01b19909116176001600160a01b0319166001600160a01b038416179055610956565b6003805460ff60a01b19169055600280546001600160a01b0384166001600160a01b03199091161790555050565b60045460055460065460075460085460095486565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000611b7462989680610606633b9aca00611b6e611b65611995565b60045490611c76565b90612243565b600654909150811015610ee0575060065490565b6000610edd620186a06106066004600301547f00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611bf357600080fd5b505afa158015611c07573d6000803e3d6000fd5b505050506040513d6020811015611c1d57600080fd5b505190611c76565b600080611c3d6011544261201c90919063ffffffff16565b600554601054919250611c54916106069084611c76565b9150601054821115611c665760105491505b5090565b60115481565b60105481565b600082611c8557506000610b49565b82820282848281611c9257fe5b0414611ccf5760405162461bcd60e51b81526004018080602001828103825260218152602001806129516021913960400191505060405180910390fd5b9392505050565b6000611ccf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612434565b600082611dc8577f00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c6001600160a01b031663a9059cbb85846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611d9657600080fd5b505af1158015611daa573d6000803e3d6000fd5b505050506040513d6020811015611dc057600080fd5b506120159050565b600354600160a01b900460ff1615611eef576003546040805163095ea7b360e01b81526001600160a01b0392831660048201526024810185905290517f00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c9092169163095ea7b3916044808201926020929091908290030181600087803b158015611e5157600080fd5b505af1158015611e65573d6000803e3d6000fd5b505050506040513d6020811015611e7b57600080fd5b505060035460408051637acb775760e01b8152600481018590526001600160a01b03878116602483015291519190921691637acb775791604480830192600092919082900301818387803b158015611ed257600080fd5b505af1158015611ee6573d6000803e3d6000fd5b50505050612015565b6002546040805163095ea7b360e01b81526001600160a01b0392831660048201526024810185905290517f00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c9092169163095ea7b3916044808201926020929091908290030181600087803b158015611f6657600080fd5b505af1158015611f7a573d6000803e3d6000fd5b505050506040513d6020811015611f9057600080fd5b505060025460408051637acb775760e01b8152600481018590526001600160a01b03878116602483015291519190921691637acb77579160448083019260209291908290030181600087803b158015611fe857600080fd5b505af1158015611ffc573d6000803e3d6000fd5b505050506040513d602081101561201257600080fd5b50505b5092915050565b6000611ccf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506124d6565b6120666128d0565b600082116120a55760405162461bcd60e51b815260040180806020018281038252602681526020018061292b6026913960400191505060405180910390fd5b826120bf5750604080516020810190915260008152610b49565b71ffffffffffffffffffffffffffffffffffff831161216657600082607085901b816120e757fe5b0490506001600160e01b03811115612146576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b6040518060200160405280826001600160e01b0316815250915050610b49565b600061217784600160701b85612530565b90506001600160e01b03811115612146576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b516612725dd1d243ab6001600160e01b039091160490565b6121f8610ed4611c25565b60105542601155565b600061221d62989680610606633b9aca00611b6e611b65611995565b6006549091508110156122335750600654610ee0565b60065415610ee057600060065590565b600082820183811015611ccf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526122f79085906125d0565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261234f9084906125d0565b505050565b600d54600e546000916123679190612243565b600b549091501580159061237b5750804210155b1561243157600454600a5460ff16156123b557600b5460045461239d91612243565b6004819055600c54116123b0576000600b555b6123d7565b600b546004546123c49161201c565b6004819055600c54106123d7576000600b555b42600e55600454600b54600a546040805185815260208101949094528381019290925260ff1615156060830152517fb923e581a0f83128e9e1d8297aa52b18d6744310476e0b54509c054cd7a93b2a9181900360800190a1505b50565b600081836124c05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561248557818101518382015260200161246d565b50505050905090810190601f1680156124b25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816124cc57fe5b0495945050505050565b600081848411156125285760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561248557818101518382015260200161246d565b505050900390565b600080600061253f8686612681565b915091506000848061254d57fe5b868809905082811115612561576001820391505b80830392508482106125ba576040805162461bcd60e51b815260206004820152601a60248201527f46756c6c4d6174683a3a6d756c4469763a206f766572666c6f77000000000000604482015290519081900360640190fd5b6125c58383876126ae565b979650505050505050565b6060612625826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661271e9092919063ffffffff16565b80519091501561234f5780806020019051602081101561264457600080fd5b505161234f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806129d9602a913960400191505060405180910390fd5b60008080600019848609905083850292508281039150828110156126a6576001820391505b509250929050565b600081810382168083816126be57fe5b0492508085816126ca57fe5b0494508081600003816126d957fe5b60028581038087028203028087028203028087028203028087028203028087028203028087028203029586029003909402930460010193909302939093010292915050565b606061272d8484600085612735565b949350505050565b6060612740856128a2565b612791576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106127d05780518252601f1990920191602091820191016127b1565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612832576040519150601f19603f3d011682016040523d82523d6000602084013e612837565b606091505b5091509150811561284b57915061272d9050565b80511561285b5780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561248557818101518382015260200161246d565b3b151590565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b6040805160208101909152600081529056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a206d757374206265206e6577206f776e657220746f2070756c6c4669786564506f696e743a3a6672616374696f6e3a206469766973696f6e206279207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572536c697070616765206c696d69743a206d6f7265207468616e206d617820707269636556657374696e67206d757374206265206c6f6e676572207468616e20333620686f7572735361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220d527ea6b9a37ebe0833e5fa4876ecaa5d44d1ac254337e7369d6da78441676ca64736f6c63430007050033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000a2039621cc042567092faaee89b03ef959f897120000000000000000000000003586075f3997d52c866b00fa6bbb8eb6e1b702cd0000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _AXE (address): 0x30AC8317DfB0ab4263CD8dB1C4F10749911B126C
Arg [1] : _principle (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F
Arg [2] : _treasury (address): 0xa2039621Cc042567092fAaee89B03Ef959F89712
Arg [3] : _DAO (address): 0x3586075F3997d52C866B00FA6bbb8Eb6E1b702Cd
Arg [4] : _bondCalculator (address): 0x0000000000000000000000000000000000000000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000030ac8317dfb0ab4263cd8db1c4f10749911b126c
Arg [1] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Arg [2] : 000000000000000000000000a2039621cc042567092faaee89b03ef959f89712
Arg [3] : 0000000000000000000000003586075f3997d52c866b00fa6bbb8eb6e1b702cd
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.