Token Staked YETI Tokens
Overview ERC20
Total Supply:
553,834.986486 sYETI
Holders:
86,798 addresses
Transfers:
-
Profile Summary
Contract:
Decimals:
18
[ Download CSV Export ]
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
sYETIToken
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "./BoringCrypto/BoringMath.sol"; import "./BoringCrypto/BoringERC20.sol"; import "./BoringCrypto/Domain.sol"; import "./BoringCrypto/ERC20.sol"; import "./BoringCrypto/IERC20.sol"; import "./BoringCrypto/BoringBatchable.sol"; import "./BoringCrypto/BoringOwnable.sol"; interface IYETIToken is IERC20 { function sendToSYETI(address _sender, uint256 _amount) external; function transfer(address recipient, uint256 amount) external returns (bool); } // Staking in sSpell inspired by Chef Nomi's SushiBar - MIT license (originally WTFPL) // modified by BoringCrypto for DictatorDAO // Use effective yetibalance, which updates on rebase. Rebase occurs every 8 // Each rebase increases the effective yetibalance by a certain amount of the total value // of the contract, which is equal to the yusd balance + the last price which the buyback // was executed at, multiplied by the YETI balance. Then, a portion of the value, say 1/200 // of the total value of the contract is added to the effective yetibalance. Also updated on // mint and withdraw, because that is actual value that is added to the contract. contract sYETIToken is IERC20, Domain, BoringOwnable { using BoringMath for uint256; using BoringMath128 for uint128; using BoringERC20 for IERC20; string public constant symbol = "sYETI"; string public constant name = "Staked YETI Tokens"; uint8 public constant decimals = 18; uint256 public override totalSupply; uint256 private constant LOCK_TIME = 69 seconds; uint256 public effectiveYetiTokenBalance; uint256 public lastBuybackTime; uint256 public lastBuybackPrice; uint256 public lastRebaseTime; uint256 public transferRatio; // 100% = 1e18. Amount to transfer over each rebase. IYETIToken public yetiToken; IERC20 public yusdToken; struct User { uint128 balance; uint128 lockedUntil; } /// @notice owner > balance mapping. mapping(address => User) public users; /// @notice owner > spender > allowance mapping. mapping(address => mapping(address => uint256)) public override allowance; /// @notice owner > nonce mapping. Used in `permit`. mapping(address => uint256) public nonces; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event BuyBackExecuted(uint YUSDToSell, uint amounts0, uint amounts1); event Rebase(uint additionalYetiTokenBalance); function balanceOf(address user) public view override returns (uint256 balance) { return users[user].balance; } function setAddresses(IYETIToken _yeti, IERC20 _yusd) external onlyOwner { yetiToken = _yeti; yusdToken = _yusd; } function _transfer( address from, address to, uint256 shares ) internal { User memory fromUser = users[from]; require(block.timestamp >= fromUser.lockedUntil, "Locked"); if (shares != 0) { require(fromUser.balance >= shares, "Low balance"); if (from != to) { require(to != address(0), "Zero address"); // Moved down so other failed calls safe some gas User memory toUser = users[to]; users[from].balance = fromUser.balance - shares.to128(); // Underflow is checked users[to].balance = toUser.balance + shares.to128(); // Can't overflow because totalSupply would be greater than 2^128-1; } } emit Transfer(from, to, shares); } function _useAllowance(address from, uint256 shares) internal { if (msg.sender == from) { return; } uint256 spenderAllowance = allowance[from][msg.sender]; // If allowance is infinite, don't decrease it to save on gas (breaks with EIP-20). if (spenderAllowance != type(uint256).max) { require(spenderAllowance >= shares, "Low allowance"); allowance[from][msg.sender] = spenderAllowance - shares; // Underflow is checked } } /// @notice Transfers `shares` tokens from `msg.sender` to `to`. /// @param to The address to move the tokens. /// @param shares of the tokens to move. /// @return (bool) Returns True if succeeded. function transfer(address to, uint256 shares) public returns (bool) { _transfer(msg.sender, to, shares); return true; } /// @notice Transfers `shares` tokens from `from` to `to`. Caller needs approval for `from`. /// @param from Address to draw tokens from. /// @param to The address to move the tokens. /// @param shares The token shares to move. /// @return (bool) Returns True if succeeded. function transferFrom( address from, address to, uint256 shares ) public returns (bool) { _useAllowance(from, shares); _transfer(from, to, shares); return true; } /// @notice Approves `amount` from sender to be spend by `spender`. /// @param spender Address of the party that can draw from msg.sender's account. /// @param amount The maximum collective amount that `spender` can draw. /// @return (bool) Returns True if approved. function approve(address spender, uint256 amount) public override returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32) { return _domainSeparator(); } // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 private constant PERMIT_SIGNATURE_HASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; /// @notice Approves `value` from `owner_` to be spend by `spender`. /// @param owner_ Address of the owner. /// @param spender The address of the spender that gets approved to draw from `owner_`. /// @param value The maximum collective amount that `spender` can draw. /// @param deadline This permit must be redeemed before this deadline (UTC timestamp in seconds). function permit( address owner_, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external override { require(owner_ != address(0), "Zero owner"); require(block.timestamp < deadline, "Expired"); require( ecrecover(_getDigest(keccak256(abi.encode(PERMIT_SIGNATURE_HASH, owner_, spender, value, nonces[owner_]++, deadline))), v, r, s) == owner_, "Invalid Sig" ); allowance[owner_][spender] = value; emit Approval(owner_, spender, value); } /// math is ok, because amount, totalSupply and shares is always 0 <= amount <= 100.000.000 * 10^18 /// theoretically you can grow the amount/share ratio, but it's not practical and useless function mint(uint256 amount) public returns (bool) { require(msg.sender != address(0), "Zero address"); User memory user = users[msg.sender]; uint256 shares = totalSupply == 0 ? amount : (amount * totalSupply) / effectiveYetiTokenBalance; user.balance += shares.to128(); user.lockedUntil = (block.timestamp + LOCK_TIME).to128(); users[msg.sender] = user; totalSupply += shares; yetiToken.sendToSYETI(msg.sender, amount); effectiveYetiTokenBalance = effectiveYetiTokenBalance.add(amount); emit Transfer(address(0), msg.sender, shares); return true; } function _burn( address from, address to, uint256 shares ) internal { require(to != address(0), "Zero address"); User memory user = users[from]; require(block.timestamp >= user.lockedUntil, "Locked"); uint256 amount = (shares * effectiveYetiTokenBalance) / totalSupply; users[from].balance = user.balance.sub(shares.to128()); // Must check underflow totalSupply -= shares; yetiToken.transfer(to, amount); effectiveYetiTokenBalance = effectiveYetiTokenBalance.sub(amount); emit Transfer(from, address(0), shares); } function burn(address to, uint256 shares) public returns (bool) { _burn(msg.sender, to, shares); return true; } function burnFrom( address from, address to, uint256 shares ) public returns (bool) { _useAllowance(from, shares); _burn(from, to, shares); return true; } /** * Buyback function called by owner of function. Keeps track of the */ function buyBack(address routerAddress, uint256 YUSDToSell, uint256 YETIOutMin, address[] memory path) external onlyOwner { require(YUSDToSell > 0, "Zero amount"); require(lastBuybackTime + 69 seconds < block.timestamp, "Must have 69 hours pass before another buyBack"); yusdToken.approve(routerAddress, YUSDToSell); uint256[] memory amounts = IRouter(routerAddress).swapExactTokensForTokens(YUSDToSell, YETIOutMin, path, address(this), block.timestamp); lastBuybackTime = block.timestamp; // amounts[0] is the amount of YUSD that was sold, and amounts[1] is the amount of YETI that was gained in return. So the price is amounts[0] / amounts[1] lastBuybackPrice = div(amounts[0].mul(1e18), amounts[1]); emit BuyBackExecuted(YUSDToSell, amounts[0], amounts[1]); } // Rebase function for adding new value to the sYETI - YETI ratio. function rebase() external { require(block.timestamp >= lastRebaseTime + 8 seconds, "Must have 8 hours pass before another rebase"); // Use last buyback price to transfer some of the actual YETI Tokens that this contract owns // to the effective yeti token balance. Transfer a portion of the value over to the effective balance uint256 yetiTokenBalance = yetiToken.balanceOf(address(this)); uint256 valueOfContract = _getValueOfContract(yetiTokenBalance); uint256 additionalYetiTokenBalance = div(valueOfContract.mul(transferRatio), (lastBuybackPrice)); // Ensure that the amount of YETI tokens effectively added is >= the amount we have repurchased. if (yetiTokenBalance - effectiveYetiTokenBalance < additionalYetiTokenBalance) { additionalYetiTokenBalance = yetiTokenBalance; } effectiveYetiTokenBalance = effectiveYetiTokenBalance.add(additionalYetiTokenBalance); lastRebaseTime = block.timestamp; emit Rebase(additionalYetiTokenBalance); } // Sums YUSD balance + old price. function _getValueOfContract(uint _yetiTokenBalance) internal view returns (uint256) { uint256 adjustedYetiTokenBalance = _yetiTokenBalance.sub(effectiveYetiTokenBalance); uint256 yusdTokenBalance = yusdToken.balanceOf(address(this)); return div(lastBuybackPrice.mul(adjustedYetiTokenBalance), (1e18)).add(yusdTokenBalance); } // Sets new transfer ratio for rebasing function setTransferRatio(uint256 newTransferRatio) external onlyOwner { require(newTransferRatio > 0, "Zero transfer ratio"); require(newTransferRatio <= 1e18, "Transfer ratio too high"); transferRatio = newTransferRatio; } // Safe divide function div(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b > 0, "BoringMath: Div By 0"); return a / b; } } // Router for Uniswap V2, performs YUSD -> YETI swaps interface IRouter { function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; /// @notice A library for performing overflow-/underflow-safe math, /// updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math). library BoringMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b == 0 || (c = a * b) / b == a, "BoringMath: Mul Overflow"); } function to128(uint256 a) internal pure returns (uint128 c) { require(a <= uint128(-1), "BoringMath: uint128 Overflow"); c = uint128(a); } function to64(uint256 a) internal pure returns (uint64 c) { require(a <= uint64(-1), "BoringMath: uint64 Overflow"); c = uint64(a); } function to32(uint256 a) internal pure returns (uint32 c) { require(a <= uint32(-1), "BoringMath: uint32 Overflow"); c = uint32(a); } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint128. library BoringMath128 { function add(uint128 a, uint128 b) internal pure returns (uint128 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint128 a, uint128 b) internal pure returns (uint128 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint64. library BoringMath64 { function add(uint64 a, uint64 b) internal pure returns (uint64 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint64 a, uint64 b) internal pure returns (uint64 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint32. library BoringMath32 { function add(uint32 a, uint32 b) internal pure returns (uint32 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint32 a, uint32 b) internal pure returns (uint32 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; import "./IERC20.sol"; // solhint-disable avoid-low-level-calls library BoringERC20 { bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol() bytes4 private constant SIG_NAME = 0x06fdde03; // name() bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals() bytes4 private constant SIG_BALANCE_OF = 0x70a08231; // balanceOf(address) bytes4 private constant SIG_TRANSFER = 0xa9059cbb; // transfer(address,uint256) bytes4 private constant SIG_TRANSFER_FROM = 0x23b872dd; // transferFrom(address,address,uint256) function returnDataToString(bytes memory data) internal pure returns (string memory) { if (data.length >= 64) { return abi.decode(data, (string)); } else if (data.length == 32) { uint8 i = 0; while(i < 32 && data[i] != 0) { i++; } bytes memory bytesArray = new bytes(i); for (i = 0; i < 32 && data[i] != 0; i++) { bytesArray[i] = data[i]; } return string(bytesArray); } else { return "???"; } } /// @notice Provides a safe ERC20.symbol version which returns '???' as fallback string. /// @param token The address of the ERC-20 token contract. /// @return (string) Token symbol. function safeSymbol(IERC20 token) internal view returns (string memory) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_SYMBOL)); return success ? returnDataToString(data) : "???"; } /// @notice Provides a safe ERC20.name version which returns '???' as fallback string. /// @param token The address of the ERC-20 token contract. /// @return (string) Token name. function safeName(IERC20 token) internal view returns (string memory) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_NAME)); return success ? returnDataToString(data) : "???"; } /// @notice Provides a safe ERC20.decimals version which returns '18' as fallback value. /// @param token The address of the ERC-20 token contract. /// @return (uint8) Token decimals. function safeDecimals(IERC20 token) internal view returns (uint8) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_DECIMALS)); return success && data.length == 32 ? abi.decode(data, (uint8)) : 18; } /// @notice Provides a gas-optimized balance check to avoid a redundant extcodesize check in addition to the returndatasize check. /// @param token The address of the ERC-20 token. /// @param to The address of the user to check. /// @return amount The token amount. function safeBalanceOf(IERC20 token, address to) internal view returns (uint256 amount) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_BALANCE_OF, to)); require(success && data.length >= 32, "BoringERC20: BalanceOf failed"); amount = abi.decode(data, (uint256)); } /// @notice Provides a safe ERC20.transfer version for different ERC-20 implementations. /// Reverts on a failed transfer. /// @param token The address of the ERC-20 token. /// @param to Transfer tokens to. /// @param amount The token amount. function safeTransfer( IERC20 token, address to, uint256 amount ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER, to, amount)); require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: Transfer failed"); } /// @notice Provides a safe ERC20.transferFrom version for different ERC-20 implementations. /// Reverts on a failed transfer. /// @param token The address of the ERC-20 token. /// @param from Transfer tokens from. /// @param to Transfer tokens to. /// @param amount The token amount. function safeTransferFrom( IERC20 token, address from, address to, uint256 amount ) internal { (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(SIG_TRANSFER_FROM, from, to, amount)); require(success && (data.length == 0 || abi.decode(data, (bool))), "BoringERC20: TransferFrom failed"); } }
// SPDX-License-Identifier: UNLICENSED // Based on code and smartness by Ross Campbell and Keno // Uses immutable to store the domain separator to reduce gas usage // If the chain id changes due to a fork, the forked chain will calculate on the fly. pragma solidity 0.6.12; // solhint-disable no-inline-assembly contract Domain { bytes32 private constant DOMAIN_SEPARATOR_SIGNATURE_HASH = keccak256("EIP712Domain(uint256 chainId,address verifyingContract)"); // See https://eips.ethereum.org/EIPS/eip-191 string private constant EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA = "\x19\x01"; // solhint-disable var-name-mixedcase bytes32 private immutable _DOMAIN_SEPARATOR; uint256 private immutable DOMAIN_SEPARATOR_CHAIN_ID; /// @dev Calculate the DOMAIN_SEPARATOR function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) { return keccak256( abi.encode( DOMAIN_SEPARATOR_SIGNATURE_HASH, chainId, address(this) ) ); } constructor() public { uint256 chainId; assembly {chainId := chainid()} _DOMAIN_SEPARATOR = _calculateDomainSeparator(DOMAIN_SEPARATOR_CHAIN_ID = chainId); } /// @dev Return the DOMAIN_SEPARATOR // It's named internal to allow making it public from the contract that uses it by creating a simple view function // with the desired public name, such as DOMAIN_SEPARATOR or domainSeparator. // solhint-disable-next-line func-name-mixedcase function _domainSeparator() internal view returns (bytes32) { uint256 chainId; assembly {chainId := chainid()} return chainId == DOMAIN_SEPARATOR_CHAIN_ID ? _DOMAIN_SEPARATOR : _calculateDomainSeparator(chainId); } function _getDigest(bytes32 dataHash) internal view returns (bytes32 digest) { digest = keccak256( abi.encodePacked( EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA, _domainSeparator(), dataHash ) ); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; import "./IERC20.sol"; import "./Domain.sol"; // solhint-disable no-inline-assembly // solhint-disable not-rely-on-time // Data part taken out for building of contracts that receive delegate calls contract ERC20Data { /// @notice owner > balance mapping. mapping(address => uint256) public balanceOf; /// @notice owner > spender > allowance mapping. mapping(address => mapping(address => uint256)) public allowance; /// @notice owner > nonce mapping. Used in `permit`. mapping(address => uint256) public nonces; } abstract contract ERC20 is IERC20, Domain { /// @notice owner > balance mapping. mapping(address => uint256) public override balanceOf; /// @notice owner > spender > allowance mapping. mapping(address => mapping(address => uint256)) public override allowance; /// @notice owner > nonce mapping. Used in `permit`. mapping(address => uint256) public nonces; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); /// @notice Transfers `amount` tokens from `msg.sender` to `to`. /// @param to The address to move the tokens. /// @param amount of the tokens to move. /// @return (bool) Returns True if succeeded. function transfer(address to, uint256 amount) public returns (bool) { // If `amount` is 0, or `msg.sender` is `to` nothing happens if (amount != 0 || msg.sender == to) { uint256 srcBalance = balanceOf[msg.sender]; require(srcBalance >= amount, "ERC20: balance too low"); if (msg.sender != to) { require(to != address(0), "ERC20: no zero address"); // Moved down so low balance calls safe some gas balanceOf[msg.sender] = srcBalance - amount; // Underflow is checked balanceOf[to] += amount; } } emit Transfer(msg.sender, to, amount); return true; } /// @notice Transfers `amount` tokens from `from` to `to`. Caller needs approval for `from`. /// @param from Address to draw tokens from. /// @param to The address to move the tokens. /// @param amount The token amount to move. /// @return (bool) Returns True if succeeded. function transferFrom( address from, address to, uint256 amount ) public returns (bool) { // If `amount` is 0, or `from` is `to` nothing happens if (amount != 0) { uint256 srcBalance = balanceOf[from]; require(srcBalance >= amount, "ERC20: balance too low"); if (from != to) { uint256 spenderAllowance = allowance[from][msg.sender]; // If allowance is infinite, don't decrease it to save on gas (breaks with EIP-20). if (spenderAllowance != type(uint256).max) { require(spenderAllowance >= amount, "ERC20: allowance too low"); allowance[from][msg.sender] = spenderAllowance - amount; // Underflow is checked } require(to != address(0), "ERC20: no zero address"); // Moved down so other failed calls safe some gas balanceOf[from] = srcBalance - amount; // Underflow is checked balanceOf[to] += amount; } } emit Transfer(from, to, amount); return true; } /// @notice Approves `amount` from sender to be spend by `spender`. /// @param spender Address of the party that can draw from msg.sender's account. /// @param amount The maximum collective amount that `spender` can draw. /// @return (bool) Returns True if approved. function approve(address spender, uint256 amount) public override returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32) { return _domainSeparator(); } // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 private constant PERMIT_SIGNATURE_HASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; /// @notice Approves `value` from `owner_` to be spend by `spender`. /// @param owner_ Address of the owner. /// @param spender The address of the spender that gets approved to draw from `owner_`. /// @param value The maximum collective amount that `spender` can draw. /// @param deadline This permit must be redeemed before this deadline (UTC timestamp in seconds). function permit( address owner_, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external override { require(owner_ != address(0), "ERC20: Owner cannot be 0"); require(block.timestamp < deadline, "ERC20: Expired"); require( ecrecover(_getDigest(keccak256(abi.encode(PERMIT_SIGNATURE_HASH, owner_, spender, value, nonces[owner_]++, deadline))), v, r, s) == owner_, "ERC20: Invalid Signature" ); allowance[owner_][spender] = value; emit Approval(owner_, spender, value); } } contract ERC20WithSupply is IERC20, ERC20 { uint256 public override totalSupply; function _mint(address user, uint256 amount) internal { uint256 newTotalSupply = totalSupply + amount; require(newTotalSupply >= totalSupply, "Mint overflow"); totalSupply = newTotalSupply; balanceOf[user] += amount; emit Transfer(address(0), user, amount); } function _burn(address user, uint256 amount) internal { require(balanceOf[user] >= amount, "Burn too much"); totalSupply -= amount; balanceOf[user] -= amount; emit Transfer(user, address(0), amount); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); /// @notice EIP 2612 function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; pragma experimental ABIEncoderV2; // solhint-disable avoid-low-level-calls // solhint-disable no-inline-assembly // Audit on 5-Jan-2021 by Keno and BoringCrypto // WARNING!!! // Combining BoringBatchable with msg.value can cause double spending issues // https://www.paradigm.xyz/2021/08/two-rights-might-make-a-wrong/ import "./IERC20.sol"; contract BaseBoringBatchable { /// @dev Helper function to extract a useful revert message from a failed call. /// If the returned data is malformed or not correctly abi encoded then this call can fail itself. function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) { // If the _res length is less than 68, then the transaction failed silently (without a revert message) if (_returnData.length < 68) return "Transaction reverted silently"; assembly { // Slice the sighash. _returnData := add(_returnData, 0x04) } return abi.decode(_returnData, (string)); // All that remains is the revert string } /// @notice Allows batched call to self (this contract). /// @param calls An array of inputs for each call. /// @param revertOnFail If True then reverts after a failed call and stops doing further calls. // F1: External is ok here because this is the batch function, adding it to a batch makes no sense // F2: Calls in the batch may be payable, delegatecall operates in the same context, so each call in the batch has access to msg.value // C3: The length of the loop is fully under user control, so can't be exploited // C7: Delegatecall is only used on the same contract, so it's safe function batch(bytes[] calldata calls, bool revertOnFail) external payable { for (uint256 i = 0; i < calls.length; i++) { (bool success, bytes memory result) = address(this).delegatecall(calls[i]); if (!success && revertOnFail) { revert(_getRevertMsg(result)); } } } } contract BoringBatchable is BaseBoringBatchable { /// @notice Call wrapper that performs `ERC20.permit` on `token`. /// Lookup `IERC20.permit`. // F6: Parameters can be used front-run the permit and the user's permit will fail (due to nonce or other revert) // if part of a batch this could be used to grief once as the second call would not need the permit function permitToken( IERC20 token, address from, address to, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public { token.permit(from, to, amount, deadline, v, r, s); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; // Audit on 5-Jan-2021 by Keno and BoringCrypto // Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol + Claimable.sol // Edited by BoringCrypto contract BoringOwnableData { address public owner; address public pendingOwner; } contract BoringOwnable is BoringOwnableData { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /// @notice `owner` defaults to msg.sender on construction. constructor() public { owner = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } /// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner. /// Can only be invoked by the current `owner`. /// @param newOwner Address of the new owner. /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`. /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise. function transferOwnership( address newOwner, bool direct, bool renounce ) public onlyOwner { if (direct) { // Checks require(newOwner != address(0) || renounce, "Ownable: zero address"); // Effects emit OwnershipTransferred(owner, newOwner); owner = newOwner; pendingOwner = address(0); } else { // Effects pendingOwner = newOwner; } } /// @notice Needs to be called by `pendingOwner` to claim ownership. function claimOwnership() public { address _pendingOwner = pendingOwner; // Checks require(msg.sender == _pendingOwner, "Ownable: caller != pending owner"); // Effects emit OwnershipTransferred(owner, _pendingOwner); owner = _pendingOwner; pendingOwner = address(0); } /// @notice Only allows the `owner` to execute the function. modifier onlyOwner() { require(msg.sender == owner, "Ownable: caller is not the owner"); _; } }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"YUSDToSell","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amounts0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amounts1","type":"uint256"}],"name":"BuyBackExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"additionalYetiTokenBalance","type":"uint256"}],"name":"Rebase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"burnFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"routerAddress","type":"address"},{"internalType":"uint256","name":"YUSDToSell","type":"uint256"},{"internalType":"uint256","name":"YETIOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"buyBack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"effectiveYetiTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastBuybackPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastBuybackTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRebaseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rebase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IYETIToken","name":"_yeti","type":"address"},{"internalType":"contract IERC20","name":"_yusd","type":"address"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTransferRatio","type":"uint256"}],"name":"setTransferRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"direct","type":"bool"},{"internalType":"bool","name":"renounce","type":"bool"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"users","outputs":[{"internalType":"uint128","name":"balance","type":"uint128"},{"internalType":"uint128","name":"lockedUntil","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yetiToken","outputs":[{"internalType":"contract IYETIToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"yusdToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c060405234801561001057600080fd5b504660a081905261002081610068565b60805250600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36100db565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a79469218823060405160200161009f939291906100bc565b604051602081830303815290604052805190602001209050919050565b92835260208301919091526001600160a01b0316604082015260600190565b60805160a051611f626100fe6000398061112a52508061115f5250611f626000f3fe608060405234801561001057600080fd5b50600436106101a55760003560e01c806386f28581116100ef578063af14052c11610092578063af14052c14610335578063d505accf1461033d578063da433d6714610350578063dd225d7714610358578063dd62ed3e1461036b578063de6c20fd1461037e578063e30c397814610386578063ec60bcf31461038e576101a5565b806386f28581146102a55780638da5cb5b146102b857806390107afe146102c057806395d89b41146102d35780639dc29fac146102db578063a0712d68146102ee578063a87430ba14610301578063a9059cbb14610322576101a5565b8063313ce56711610157578063313ce567146102355780633644e5151461024a57806339664181146102525780634e71e0c81461025a578063568bcbb21461026257806356e41cf51461027757806370a082311461027f5780637ecebe0014610292576101a5565b806306fdde03146101aa578063078dfbe7146101c8578063095ea7b3146101dd57806316cbb34f146101fd57806318160ddd146102125780631924063e1461021a57806323b872dd14610222575b600080fd5b6101b26103a1565b6040516101bf91906119e4565b60405180910390f35b6101db6101d63660046116e4565b6103cf565b005b6101f06101eb36600461172e565b6104be565b6040516101bf919061195f565b610205610529565b6040516101bf919061196a565b61020561052f565b610205610535565b6101f061023036600461162f565b61053b565b61023d61055c565b6040516101bf9190611e61565b610205610561565b610205610570565b6101db610576565b61026a610603565b6040516101bf9190611932565b610205610612565b61020561028d3660046115d4565b610618565b6102056102a03660046115d4565b61063c565b6101db6102b3366004611759565b61064e565b61026a610893565b6101db6102ce3660046118c9565b6108a2565b6101b26108fa565b6101f06102e936600461172e565b61091b565b6101f06102fc3660046118db565b610931565b61031461030f3660046115d4565b610ad7565b6040516101bf929190611dc1565b6101f061033036600461172e565b610afd565b6101db610b0a565b6101db61034b36600461166f565b610c43565b610205610de4565b6101db6103663660046118db565b610dea565b6102056103793660046115f7565b610e61565b61026a610e7e565b61026a610e8d565b6101f061039c36600461162f565b610e9c565b604051806040016040528060128152602001715374616b6564205945544920546f6b656e7360701b81525081565b6000546001600160a01b031633146104025760405162461bcd60e51b81526004016103f990611c8d565b60405180910390fd5b811561049d576001600160a01b03831615158061041c5750805b6104385760405162461bcd60e51b81526004016103f990611ba2565b600080546040516001600160a01b03808716939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0385166001600160a01b0319918216179091556001805490911690556104b9565b600180546001600160a01b0319166001600160a01b0385161790555b505050565b336000818152600b602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061051790869061196a565b60405180910390a35060015b92915050565b60045481565b60025481565b60065481565b60006105478483610eb3565b610552848484610f44565b5060019392505050565b601281565b600061056b611125565b905090565b60035481565b6001546001600160a01b03163381146105a15760405162461bcd60e51b81526004016103f990611cf0565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b039092166001600160a01b0319928316179055600180549091169055565b6009546001600160a01b031681565b60055481565b6001600160a01b03166000908152600a60205260409020546001600160801b031690565b600c6020526000908152604090205481565b6000546001600160a01b031633146106785760405162461bcd60e51b81526004016103f990611c8d565b600083116106985760405162461bcd60e51b81526004016103f990611b7d565b42600454604501106106bc5760405162461bcd60e51b81526004016103f990611b0a565b60095460405163095ea7b360e01b81526001600160a01b039091169063095ea7b3906106ee9087908790600401611946565b602060405180830381600087803b15801561070857600080fd5b505af115801561071c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061074091906118ad565b506040516338ed173960e01b81526060906001600160a01b038616906338ed1739906107789087908790879030904290600401611ddb565b600060405180830381600087803b15801561079257600080fd5b505af11580156107a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107ce919081019061181d565b905042600481905550610823610809670de0b6b3a7640000836000815181106107f357fe5b602002602001015161118590919063ffffffff16565b8260018151811061081657fe5b60200260200101516111bc565b6005819055507f7b24d7247b96950964bd4beae65d9c26369ccc32e6949c2c3a4c5a6115955a30848260008151811061085857fe5b60200260200101518360018151811061086d57fe5b602002602001015160405161088493929190611e4b565b60405180910390a15050505050565b6000546001600160a01b031681565b6000546001600160a01b031633146108cc5760405162461bcd60e51b81526004016103f990611c8d565b600880546001600160a01b039384166001600160a01b03199182161790915560098054929093169116179055565b60405180604001604052806005815260200164735945544960d81b81525081565b60006109283384846111ee565b50600192915050565b6000336109505760405162461bcd60e51b81526004016103f990611bd1565b6109586115bd565b50336000908152600a602090815260408083208151808301909252546001600160801b038082168352600160801b9091041691810191909152600254909190156109b1576003546002548502816109ab57fe5b046109b3565b835b90506109be816113b7565b8251016001600160801b031682526109d8604542016113b7565b6001600160801b039081166020808501918252336000818152600a9092526040918290208651815494518616600160801b029086166001600160801b03199095169490941790941692909217909255600280548401905560085491516378df34af60e11b81526001600160a01b03929092169163f1be695e91610a5f918890600401611946565b600060405180830381600087803b158015610a7957600080fd5b505af1158015610a8d573d6000803e3d6000fd5b5050600354610a9f92509050856113e4565b6003556040513390600090600080516020611f0d83398151915290610ac590859061196a565b60405180910390a35060019392505050565b600a602052600090815260409020546001600160801b0380821691600160801b90041682565b6000610928338484610f44565b600654600801421015610b2f5760405162461bcd60e51b81526004016103f990611a66565b6008546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610b60903090600401611932565b60206040518083038186803b158015610b7857600080fd5b505afa158015610b8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb091906118f3565b90506000610bbd82611407565b90506000610be1610bd96007548461118590919063ffffffff16565b6005546111bc565b90508060035484031015610bf25750815b600354610bff90826113e4565b600355426006556040517fafae32ce2847c13a56ab802c034c27d3c19f1d61be48c424c5df134145cd44d090610c3690839061196a565b60405180910390a1505050565b6001600160a01b038716610c695760405162461bcd60e51b81526004016103f990611d4a565b834210610c885760405162461bcd60e51b81526004016103f990611da0565b6001600160a01b0387166000818152600c60209081526040918290208054600181810190925592519092610d0692610ceb927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928e928e928e92918e9101611973565b604051602081830303815290604052805190602001206114df565b85858560405160008152602001604052604051610d2694939291906119c6565b6020604051602081039080840390855afa158015610d48573d6000803e3d6000fd5b505050602060405103516001600160a01b031614610d785760405162461bcd60e51b81526004016103f990611d25565b6001600160a01b038088166000818152600b60209081526040808320948b168084529490915290819020889055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610dd390899061196a565b60405180910390a350505050505050565b60075481565b6000546001600160a01b03163314610e145760405162461bcd60e51b81526004016103f990611c8d565b60008111610e345760405162461bcd60e51b81526004016103f990611bf7565b670de0b6b3a7640000811115610e5c5760405162461bcd60e51b81526004016103f990611ab2565b600755565b600b60209081526000928352604080842090915290825290205481565b6008546001600160a01b031681565b6001546001600160a01b031681565b6000610ea88483610eb3565b6105528484846111ee565b336001600160a01b0383161415610ec957610f40565b6001600160a01b0382166000908152600b6020908152604080832033845290915290205460001981146104b95781811015610f165760405162461bcd60e51b81526004016103f990611ae3565b6001600160a01b0383166000908152600b6020908152604080832033845290915290208282039055505b5050565b610f4c6115bd565b506001600160a01b0383166000908152600a60209081526040918290208251808401909352546001600160801b038082168452600160801b90910416908201819052421015610fad5760405162461bcd60e51b81526004016103f990611a46565b81156110e65780516001600160801b0316821115610fdd5760405162461bcd60e51b81526004016103f990611b58565b826001600160a01b0316846001600160a01b0316146110e6576001600160a01b03831661101c5760405162461bcd60e51b81526004016103f990611bd1565b6110246115bd565b506001600160a01b0383166000908152600a60209081526040918290208251808401909352546001600160801b038082168452600160801b909104169082015261106d836113b7565b82516001600160a01b0387166000908152600a6020526040902080546001600160801b031916929091036001600160801b03169190911790556110af836113b7565b90516001600160a01b0385166000908152600a6020526040902080546001600160801b031916919092016001600160801b03161790555b826001600160a01b0316846001600160a01b0316600080516020611f0d83398151915284604051611117919061196a565b60405180910390a350505050565b6000467f0000000000000000000000000000000000000000000000000000000000000000811461115d5761115881611534565b61117f565b7f00000000000000000000000000000000000000000000000000000000000000005b91505090565b60008115806111a05750508082028282828161119d57fe5b04145b6105235760405162461bcd60e51b81526004016103f990611d6e565b60008082116111dd5760405162461bcd60e51b81526004016103f990611cc2565b8183816111e657fe5b049392505050565b6001600160a01b0382166112145760405162461bcd60e51b81526004016103f990611bd1565b61121c6115bd565b506001600160a01b0383166000908152600a60209081526040918290208251808401909352546001600160801b038082168452600160801b9091041690820181905242101561127d5760405162461bcd60e51b81526004016103f990611a46565b600060025460035484028161128e57fe5b0490506112ae61129d846113b7565b83516001600160801b03169061156b565b6001600160a01b038681166000908152600a60205260409081902080546001600160801b0319166001600160801b039490941693909317909255600280548690039055600854915163a9059cbb60e01b815291169063a9059cbb906113199087908590600401611946565b602060405180830381600087803b15801561133357600080fd5b505af1158015611347573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136b91906118ad565b50600354611379908261159a565b6003556040516000906001600160a01b03871690600080516020611f0d833981519152906113a890879061196a565b60405180910390a35050505050565b60006001600160801b038211156113e05760405162461bcd60e51b81526004016103f990611c24565b5090565b818101818110156105235760405162461bcd60e51b81526004016103f990611c5b565b60008061141f6003548461159a90919063ffffffff16565b6009546040516370a0823160e01b81529192506000916001600160a01b03909116906370a0823190611455903090600401611932565b60206040518083038186803b15801561146d57600080fd5b505afa158015611481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a591906118f3565b90506114d7816114d16114c38560055461118590919063ffffffff16565b670de0b6b3a76400006111bc565b906113e4565b949350505050565b600060405180604001604052806002815260200161190160f01b815250611504611125565b836040516020016115179392919061190b565b604051602081830303815290604052805190602001209050919050565b60007f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a794692188230604051602001611517939291906119a7565b8082036001600160801b0380841690821611156105235760405162461bcd60e51b81526004016103f990611a17565b808203828111156105235760405162461bcd60e51b81526004016103f990611a17565b604080518082019091526000808252602082015290565b6000602082840312156115e5578081fd5b81356115f081611ee6565b9392505050565b60008060408385031215611609578081fd5b823561161481611ee6565b9150602083013561162481611ee6565b809150509250929050565b600080600060608486031215611643578081fd5b833561164e81611ee6565b9250602084013561165e81611ee6565b929592945050506040919091013590565b600080600080600080600060e0888a031215611689578283fd5b873561169481611ee6565b965060208801356116a481611ee6565b95506040880135945060608801359350608088013560ff811681146116c7578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806000606084860312156116f8578283fd5b833561170381611ee6565b9250602084013561171381611efe565b9150604084013561172381611efe565b809150509250925092565b60008060408385031215611740578182fd5b823561174b81611ee6565b946020939093013593505050565b6000806000806080858703121561176e578384fd5b843561177981611ee6565b9350602085810135935060408601359250606086013567ffffffffffffffff8111156117a3578283fd5b8601601f810188136117b3578283fd5b80356117c66117c182611e96565b611e6f565b81815283810190838501858402850186018c10156117e2578687fd5b8694505b8385101561180d5780356117f981611ee6565b8352600194909401939185019185016117e6565b50979a9699509497505050505050565b6000602080838503121561182f578182fd5b825167ffffffffffffffff811115611845578283fd5b8301601f81018513611855578283fd5b80516118636117c182611e96565b818152838101908385018584028501860189101561187f578687fd5b8694505b838510156118a1578051835260019490940193918501918501611883565b50979650505050505050565b6000602082840312156118be578081fd5b81516115f081611efe565b60008060408385031215611609578182fd5b6000602082840312156118ec578081fd5b5035919050565b600060208284031215611904578081fd5b5051919050565b6000845161191d818460208901611eb6565b91909101928352506020820152604001919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b9586526001600160a01b0394851660208701529290931660408501526060840152608083019190915260a082015260c00190565b92835260208301919091526001600160a01b0316604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6000602082528251806020840152611a03816040850160208701611eb6565b601f01601f19169190910160400192915050565b602080825260159082015274426f72696e674d6174683a20556e646572666c6f7760581b604082015260600190565b602080825260069082015265131bd8dad95960d21b604082015260600190565b6020808252602c908201527f4d7573742068617665203820686f7572732070617373206265666f726520616e60408201526b6f746865722072656261736560a01b606082015260800190565b6020808252601790820152760a8e4c2dce6cccae440e4c2e8d2de40e8dede40d0d2ced604b1b604082015260600190565b6020808252600d908201526c4c6f7720616c6c6f77616e636560981b604082015260600190565b6020808252602e908201527f4d757374206861766520363920686f7572732070617373206265666f7265206160408201526d6e6f74686572206275794261636b60901b606082015260800190565b6020808252600b908201526a4c6f772062616c616e636560a81b604082015260600190565b6020808252600b908201526a16995c9bc8185b5bdd5b9d60aa1b604082015260600190565b6020808252601590820152744f776e61626c653a207a65726f206164647265737360581b604082015260600190565b6020808252600c908201526b5a65726f206164647265737360a01b604082015260600190565b6020808252601390820152725a65726f207472616e7366657220726174696f60681b604082015260600190565b6020808252601c908201527f426f72696e674d6174683a2075696e74313238204f766572666c6f7700000000604082015260600190565b602080825260189082015277426f72696e674d6174683a20416464204f766572666c6f7760401b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601490820152730426f72696e674d6174683a2044697620427920360641b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e6572604082015260600190565b6020808252600b908201526a496e76616c69642053696760a81b604082015260600190565b6020808252600a90820152692d32b9379037bbb732b960b11b604082015260600190565b602080825260189082015277426f72696e674d6174683a204d756c204f766572666c6f7760401b604082015260600190565b602080825260079082015266115e1c1a5c995960ca1b604082015260600190565b6001600160801b0392831681529116602082015260400190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611e2a5784516001600160a01b031683529383019391830191600101611e05565b50506001600160a01b03969096166060850152505050608001529392505050565b9283526020830191909152604082015260600190565b60ff91909116815260200190565b60405181810167ffffffffffffffff81118282101715611e8e57600080fd5b604052919050565b600067ffffffffffffffff821115611eac578081fd5b5060209081020190565b60005b83811015611ed1578181015183820152602001611eb9565b83811115611ee0576000848401525b50505050565b6001600160a01b0381168114611efb57600080fd5b50565b8015158114611efb57600080fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220e122922b63971480b63474274699d152f3161303026a00777eea3d833578483064736f6c634300060c0033