My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x649149e242555817300bb6574a77b6ade2d69399e1045ba2088c699fb2113e84 | Authorize | 23210486 | 483 days 5 hrs ago | Tarot: Deployer | IN | Tarot: Supply Vault Strategy V1 | 0 FTM | 0.011819048005 | |
0x477adce4ecd60c04138bfc944cb2f4444544315ad7fff24c50989dbd6ab75c32 | Authorize | 23126340 | 484 days 2 hrs ago | Tarot: Deployer | IN | Tarot: Supply Vault Strategy V1 | 0 FTM | 0.008920019188 | |
0x9d6c371d0a417ed4adc872d341fb5d5baae3e556d5935c7def0ea57f3405ff45 | Authorize | 23126254 | 484 days 2 hrs ago | Tarot: Deployer | IN | Tarot: Supply Vault Strategy V1 | 0 FTM | 0.008743062101 | |
0xa36f22d1f4c80e017dd5c30359210b9a9007e5cb8955331caffeb1bd57be2426 | Authorize | 23125078 | 484 days 3 hrs ago | Tarot: Deployer | IN | Tarot: Supply Vault Strategy V1 | 0 FTM | 0.01090117238 | |
0x2caa44bba702999fac8e957918da3f1865ddb8ccf70d7295b250c65936f9dc4f | 0x60806040 | 23125003 | 484 days 3 hrs ago | Tarot: Deployer | IN | Create: SupplyVaultStrategyV1 | 0 FTM | 0.480516075954 |
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0x2caa44bba702999fac8e957918da3f1865ddb8ccf70d7295b250c65936f9dc4f | 23125003 | 484 days 3 hrs ago | Tarot: Deployer | Contract Creation | 0 FTM |
[ Download CSV Export ]
Contract Name:
SupplyVaultStrategyV1
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./libraries/StringHelpers.sol"; import "./libraries/MathHelpers.sol"; import "./libraries/BorrowableHelpers.sol"; import "./interfaces/ISupplyVaultStrategy.sol"; import "./interfaces/IBorrowable.sol"; import "./interfaces/ISupplyVault.sol"; import "./interfaces/IFactory.sol"; contract SupplyVaultStrategyV1 is ISupplyVaultStrategy, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; using BorrowableHelpers for IBorrowable; struct BorrowableOption { IBorrowable borrowable; uint256 underlyingAmount; uint256 borrowableAmount; uint256 minLoss; uint256 maxGain; } mapping(ISupplyVault => bool) private isAuthorized; function _authorize(ISupplyVault supplyVault) private { require(!isAuthorized[supplyVault], "SupplyVaultStrategyV1: ALREADY_AUTHORIZED"); isAuthorized[supplyVault] = true; } function authorize(ISupplyVault supplyVault) external onlyOwner { _authorize(supplyVault); } function authorizeMany(ISupplyVault[] calldata supplyVaultList) external onlyOwner { for (uint256 i = 0; i < supplyVaultList.length; i++) { _authorize(supplyVaultList[i]); } } modifier onlyAuthorized() { require(isAuthorized[ISupplyVault(msg.sender)], "SupplyVaultStrategyV1: NOT_AUTHORIZED"); _; } function getNetChange( ISupplyVault supplyVault, IBorrowable borrowable, uint256 depositAmount, uint256 withdrawAmount ) private returns (uint256 gain_, uint256 loss_) { require(depositAmount > 0 != withdrawAmount > 0, "SupplyVaultStrategyV1: DEPOSIT_XOR_WITHDRAW"); (uint256 currentSupplyRate, , ) = borrowable.getCurrentSupplyRate(); if (currentSupplyRate == 0) { return (gain_ = 0, loss_ = 0); } (uint256 nextSupplyRate, , ) = borrowable.getNextSupplyRate(depositAmount, withdrawAmount); uint256 currentBalance = borrowable.underlyingBalanceOf(address(supplyVault)); uint256 currentInterest = currentBalance.mul(currentSupplyRate); uint256 nextInterest; if (depositAmount > 0) { nextInterest = currentBalance.add(depositAmount).mul(nextSupplyRate); } else if (withdrawAmount > 0) { nextInterest = currentBalance.sub(withdrawAmount).mul(nextSupplyRate); } else { assert(false); } if (nextInterest > currentInterest) { gain_ = nextInterest.sub(currentInterest); } else { loss_ = currentInterest.sub(nextInterest); } } IFactory constant TAROT_FACTORY = IFactory(0x35C052bBf8338b06351782A565aa9AaD173432eA); function getBorrowable(address _address) external view override onlyAuthorized returns (IBorrowable) { ISupplyVault supplyVault = ISupplyVault(msg.sender); address underlying = address(supplyVault.underlying()); // Treating _address as a UniswapV2Pair, try to get the lending pool from the known factory adress (bool initialized, , , address borrowable0, address borrowable1) = TAROT_FACTORY.getLendingPool(_address); if (initialized) { if (IBorrowable(borrowable0).underlying() == underlying) { return IBorrowable(borrowable0); } if (IBorrowable(borrowable1).underlying() == underlying) { return IBorrowable(borrowable1); } } require(false, "SupplyVaultStrategyV1: INVALID_BORROWABLE"); } function getSupplyRate() external override onlyAuthorized returns (uint256 supplyRate_) { ISupplyVault supplyVault = ISupplyVault(msg.sender); IERC20 underlying = supplyVault.underlying(); uint256 totalUnderlying = underlying.balanceOf(address(supplyVault)); uint256 weightedSupplyRate = 0; // Underlying has a supply rate of zero uint256 numBorrowables = supplyVault.getBorrowablesLength(); for (uint256 i = 0; i < numBorrowables; i++) { IBorrowable borrowable = supplyVault.borrowables(i); uint256 borrowableUnderlyingBalance = borrowable.underlyingBalanceOf(address(supplyVault)); if (borrowableUnderlyingBalance > 0) { (uint256 borrowableSupplyRate, , ) = borrowable.getCurrentSupplyRate(); weightedSupplyRate = weightedSupplyRate.add(borrowableUnderlyingBalance.mul(borrowableSupplyRate)); totalUnderlying = totalUnderlying.add(borrowableUnderlyingBalance); } } if (totalUnderlying != 0) { supplyRate_ = weightedSupplyRate.div(totalUnderlying); } } function allocate() public override onlyAuthorized { ISupplyVault supplyVault = ISupplyVault(msg.sender); IERC20 underlying = supplyVault.underlying(); uint256 amount = underlying.balanceOf(address(supplyVault)); if (amount == 0) { // Nothing to allocate return; } BorrowableOption memory best; uint256 numBorrowables = supplyVault.getBorrowablesLength(); require(numBorrowables > 0, "SupplyVaultStrategyV1: NO_BORROWABLES"); for (uint256 i = 0; i < numBorrowables; i++) { IBorrowable borrowable = supplyVault.borrowables(i); if (!supplyVault.getBorrowableEnabled(borrowable)) { continue; } (uint256 gain, ) = getNetChange(supplyVault, borrowable, amount, 0); if (gain > best.maxGain) { best.borrowable = borrowable; best.maxGain = gain; } } if (address(best.borrowable) != address(0)) { supplyVault.allocateIntoBorrowable(best.borrowable, amount); } } /** * Deallocate from the least performing borrowable either: * 1) The amount of that borrowable to generate at least needAmount of underlying * 2) The maximum amount that can be withdrawn from that borrowable at this time */ function _deallocateFromLowestSupplyRate( ISupplyVault supplyVault, uint256 numBorrowables, IERC20 underlying, uint256 needAmount ) private returns (uint256 deallocatedAmount) { BorrowableOption memory best; best.minLoss = type(uint256).max; for (uint256 i = 0; i < numBorrowables; i++) { IBorrowable borrowable = supplyVault.borrowables(i); uint256 withdrawBorrowableAmount; uint256 withdrawBorrowableAmountAsUnderlying; { uint256 vaultBorrowableBalance = borrowable.balanceOf(address(supplyVault)); if (vaultBorrowableBalance == 0) { continue; } uint256 borrowableUnderlyingBalance = underlying.balanceOf(address(borrowable)); uint256 borrowableUnderlyingBalanceAsBorrowable = borrowable.borrowableValueOf( borrowableUnderlyingBalance ); if (borrowableUnderlyingBalanceAsBorrowable == 0) { continue; } uint256 needAmountAsBorrowableIn = borrowable.borrowableValueOf(needAmount).add(1); withdrawBorrowableAmount = MathHelpers.min( needAmountAsBorrowableIn, vaultBorrowableBalance, borrowableUnderlyingBalanceAsBorrowable ); withdrawBorrowableAmountAsUnderlying = borrowable.underlyingValueOf(withdrawBorrowableAmount); } if (withdrawBorrowableAmountAsUnderlying == 0) { continue; } (, uint256 loss) = getNetChange(supplyVault, borrowable, 0, withdrawBorrowableAmountAsUnderlying); uint256 lossPerUnderlying = loss.mul(1e18).div(withdrawBorrowableAmountAsUnderlying); if (lossPerUnderlying < best.minLoss) { best.borrowable = borrowable; best.minLoss = lossPerUnderlying; best.borrowableAmount = withdrawBorrowableAmount; best.underlyingAmount = withdrawBorrowableAmountAsUnderlying; } if (loss == 0) { break; } } require(best.minLoss < type(uint256).max, "SupplyVaultStrategyV1: INSUFFICIENT_CASH"); uint256 beforeBalance = underlying.balanceOf(address(supplyVault)); supplyVault.deallocateFromBorrowable(best.borrowable, best.borrowableAmount); uint256 afterBalance = underlying.balanceOf(address(supplyVault)); require(afterBalance.sub(beforeBalance) == best.underlyingAmount, "Delta must match"); return best.underlyingAmount; } function deallocate(uint256 needAmount) public override onlyAuthorized { require(needAmount > 0, "SupplyVaultStrategyV1: ZERO_AMOUNT"); ISupplyVault supplyVault = ISupplyVault(msg.sender); IERC20 underlying = supplyVault.underlying(); uint256 numBorrowables = supplyVault.getBorrowablesLength(); do { // Withdraw as much as we can from the lowest supply or fail if none is available uint256 withdraw = _deallocateFromLowestSupplyRate(supplyVault, numBorrowables, underlying, needAmount); // If we get here then we made some progress if (withdraw >= needAmount) { // We unwound a bit more than we needed as deallocation had to round up needAmount = 0; } else { // Update the remaining amount that we desire needAmount = needAmount.sub(withdraw); } if (needAmount == 0) { // We have enough so we are done break; } // Keep going and try a different borrowable } while (true); assert(needAmount == 0); } function reallocate(uint256 _underlyingAmount, bytes calldata _data) external override onlyAuthorized { _data; // silence compiler deallocate(_underlyingAmount); allocate(); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
pragma solidity 0.6.12; library StringHelpers { function append(string memory a, string memory b) internal pure returns (string memory) { return string(abi.encodePacked(a, b)); } /** * Returns the first string if it is not-empty, otherwise the second. */ function orElse(string memory a, string memory b) internal pure returns (string memory) { if (bytes(a).length > 0) { return a; } return b; } }
pragma solidity 0.6.12; library MathHelpers { function min(uint256 a, uint256 b) internal pure returns (uint256) { if (a < b) { return a; } return b; } function min( uint256 a, uint256 b, uint256 c ) internal pure returns (uint256) { return min(a, min(b, c)); } function max(uint256 a, uint256 b) internal pure returns (uint256) { if (a > b) { return a; } return b; } function max( uint256 a, uint256 b, uint256 c ) internal pure returns (uint256) { return max(a, max(b, c)); } }
pragma solidity 0.6.12; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IBorrowable.sol"; library BorrowableHelpers { using SafeMath for uint256; uint256 private constant RATE_SCALE = 1e18; function borrowableValueOf(IBorrowable borrowable, uint256 underlyingAmount) internal returns (uint256) { if (underlyingAmount == 0) { return 0; } uint256 exchangeRate = borrowable.exchangeRate(); return underlyingAmount.mul(1e18).div(exchangeRate); } function underlyingValueOf(IBorrowable borrowable, uint256 borrowableAmount) internal returns (uint256) { if (borrowableAmount == 0) { return 0; } uint256 exchangeRate = borrowable.exchangeRate(); return borrowableAmount.mul(exchangeRate).div(1e18); } function underlyingBalanceOf(IBorrowable borrowable, address account) internal returns (uint256) { return underlyingValueOf(borrowable, borrowable.balanceOf(account)); } function myUnderlyingBalance(IBorrowable borrowable) internal returns (uint256) { return underlyingValueOf(borrowable, borrowable.balanceOf(address(this))); } function getNextBorrowRate( IBorrowable borrowable, uint256 depositAmount, uint256 withdrawAmount ) internal returns (uint256 borrowRate_, uint256 utilizationRate_) { require(depositAmount == 0 || withdrawAmount == 0, "BH: INVLD_DELTA"); borrowable.accrueInterest(); { uint256 totalBorrows = borrowable.totalBorrows(); uint256 nextBalance = borrowable.totalBalance().add(totalBorrows); if (depositAmount > 0) { nextBalance = nextBalance.add(depositAmount); } if (withdrawAmount > 0) { nextBalance = nextBalance.sub(withdrawAmount); } utilizationRate_ = (nextBalance == 0) ? 0 : totalBorrows.mul(RATE_SCALE).div(nextBalance); } uint256 kinkUtilizationRate = borrowable.kinkUtilizationRate(); // gas savings if (utilizationRate_ <= kinkUtilizationRate) { borrowRate_ = borrowable.kinkBorrowRate().mul(utilizationRate_).div(kinkUtilizationRate); } else { borrowRate_ = borrowable.KINK_MULTIPLIER().sub(1); { // utilizationRate_ is strictly less than kinkUtilizationRate uint256 overUtilization = utilizationRate_.sub(kinkUtilizationRate).mul(RATE_SCALE).div( RATE_SCALE.sub(kinkUtilizationRate) ); borrowRate_ = borrowRate_.mul(overUtilization); } borrowRate_ = borrowRate_.add(RATE_SCALE).mul(borrowable.kinkBorrowRate()).div(RATE_SCALE); } borrowRate_ = uint48(borrowRate_); } function getNextSupplyRate( IBorrowable borrowable, uint256 depositAmount, uint256 withdrawAmount ) internal returns ( uint256 supplyRate_, uint256 borrowRate_, uint256 utilizationRate_ ) { (borrowRate_, utilizationRate_) = getNextBorrowRate(borrowable, depositAmount, withdrawAmount); supplyRate_ = borrowRate_ .mul(utilizationRate_) .div(RATE_SCALE) .mul(RATE_SCALE.sub(borrowable.reserveFactor())) .div(RATE_SCALE); } function getCurrentBorrowRate(IBorrowable borrowable) internal returns (uint256 borrowRate_, uint256 utilizationRate_) { return getNextBorrowRate(borrowable, 0, 0); } function getCurrentSupplyRate(IBorrowable borrowable) internal returns ( uint256 supplyRate_, uint256 borrowRate_, uint256 utilizationRate_ ) { return getNextSupplyRate(borrowable, 0, 0); } }
pragma solidity >=0.5.0; import "./IBorrowable.sol"; import "./ISupplyVault.sol"; interface ISupplyVaultStrategy { function getBorrowable(address _address) external view returns (IBorrowable); function getSupplyRate() external returns (uint256 supplyRate_); function allocate() external; function deallocate(uint256 _underlyingAmount) external; function reallocate(uint256 _underlyingAmount, bytes calldata _data) external; }
pragma solidity >=0.5.0; interface IBorrowable { /*** Tarot ERC20 ***/ event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /*** Pool Token ***/ event Mint( address indexed sender, address indexed minter, uint256 mintAmount, uint256 mintTokens ); event Redeem( address indexed sender, address indexed redeemer, uint256 redeemAmount, uint256 redeemTokens ); event Sync(uint256 totalBalance); function underlying() external view returns (address); function factory() external view returns (address); function totalBalance() external view returns (uint256); function MINIMUM_LIQUIDITY() external pure returns (uint256); function exchangeRate() external returns (uint256); function mint(address minter) external returns (uint256 mintTokens); function redeem(address redeemer) external returns (uint256 redeemAmount); function skim(address to) external; function sync() external; function _setFactory() external; /*** Borrowable ***/ event BorrowApproval( address indexed owner, address indexed spender, uint256 value ); event Borrow( address indexed sender, address indexed borrower, address indexed receiver, uint256 borrowAmount, uint256 repayAmount, uint256 accountBorrowsPrior, uint256 accountBorrows, uint256 totalBorrows ); event Liquidate( address indexed sender, address indexed borrower, address indexed liquidator, uint256 seizeTokens, uint256 repayAmount, uint256 accountBorrowsPrior, uint256 accountBorrows, uint256 totalBorrows ); function BORROW_FEE() external pure returns (uint256); function collateral() external view returns (address); function reserveFactor() external view returns (uint256); function exchangeRateLast() external view returns (uint256); function borrowIndex() external view returns (uint256); function totalBorrows() external view returns (uint256); function borrowAllowance(address owner, address spender) external view returns (uint256); function borrowBalance(address borrower) external view returns (uint256); function borrowTracker() external view returns (address); function BORROW_PERMIT_TYPEHASH() external pure returns (bytes32); function borrowApprove(address spender, uint256 value) external returns (bool); function borrowPermit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; function borrow( address borrower, address receiver, uint256 borrowAmount, bytes calldata data ) external; function liquidate(address borrower, address liquidator) external returns (uint256 seizeTokens); function trackBorrow(address borrower) external; /*** Borrowable Interest Rate Model ***/ event AccrueInterest( uint256 interestAccumulated, uint256 borrowIndex, uint256 totalBorrows ); event CalculateKink(uint256 kinkRate); event CalculateBorrowRate(uint256 borrowRate); function KINK_BORROW_RATE_MAX() external pure returns (uint256); function KINK_BORROW_RATE_MIN() external pure returns (uint256); function KINK_MULTIPLIER() external pure returns (uint256); function borrowRate() external view returns (uint256); function kinkBorrowRate() external view returns (uint256); function kinkUtilizationRate() external view returns (uint256); function adjustSpeed() external view returns (uint256); function rateUpdateTimestamp() external view returns (uint32); function accrualTimestamp() external view returns (uint32); function accrueInterest() external; /*** Borrowable Setter ***/ event NewReserveFactor(uint256 newReserveFactor); event NewKinkUtilizationRate(uint256 newKinkUtilizationRate); event NewAdjustSpeed(uint256 newAdjustSpeed); event NewBorrowTracker(address newBorrowTracker); function RESERVE_FACTOR_MAX() external pure returns (uint256); function KINK_UR_MIN() external pure returns (uint256); function KINK_UR_MAX() external pure returns (uint256); function ADJUST_SPEED_MIN() external pure returns (uint256); function ADJUST_SPEED_MAX() external pure returns (uint256); function _initialize( string calldata _name, string calldata _symbol, address _underlying, address _collateral ) external; function _setReserveFactor(uint256 newReserveFactor) external; function _setKinkUtilizationRate(uint256 newKinkUtilizationRate) external; function _setAdjustSpeed(uint256 newAdjustSpeed) external; function _setBorrowTracker(address newBorrowTracker) external; }
pragma solidity >=0.5.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./IBorrowable.sol"; import "./ISupplyVaultStrategy.sol"; interface ISupplyVault { /* Vault */ function enter(uint256 _amount) external returns (uint256 share); function enterWithToken(address _tokenAddress, uint256 _tokenAmount) external returns (uint256 share); function leave(uint256 _share) external returns (uint256 underlyingAmount); function leaveInKind(uint256 _share) external; function applyFee() external; /** Read */ function getBorrowablesLength() external view returns (uint256); function getBorrowableEnabled(IBorrowable borrowable) external view returns (bool); function getBorrowableExists(IBorrowable borrowable) external view returns (bool); function indexOfBorrowable(IBorrowable borrowable) external view returns (uint256); function borrowables(uint256) external view returns (IBorrowable); function underlying() external view returns (IERC20); function strategy() external view returns (ISupplyVaultStrategy); function pendingStrategy() external view returns (ISupplyVaultStrategy); function pendingStrategyNotBefore() external view returns (uint256); function feeBps() external view returns (uint256); function feeTo() external view returns (address); function reallocateManager() external view returns (address); /* Read functions that are non-view due to updating exchange rates */ function underlyingBalanceForAccount(address _account) external returns (uint256 underlyingBalance); function shareValuedAsUnderlying(uint256 _share) external returns (uint256 underlyingAmount_); function underlyingValuedAsShare(uint256 _underlyingAmount) external returns (uint256 share_); function getTotalUnderlying() external returns (uint256 totalUnderlying); function getSupplyRate() external returns (uint256 supplyRate_); /* Only from strategy */ function allocateIntoBorrowable(IBorrowable borrowable, uint256 underlyingAmount) external; function deallocateFromBorrowable(IBorrowable borrowable, uint256 borrowableAmount) external; function reallocate(uint256 _share, bytes calldata _data) external; /* Only owner */ function addBorrowable(address _address) external; function addBorrowables(address[] calldata _addressList) external; function removeBorrowable(IBorrowable borrowable) external; function disableBorrowable(IBorrowable borrowable) external; function enableBorrowable(IBorrowable borrowable) external; function unwindBorrowable(IBorrowable borrowable, uint256 borowableAmount) external; function updatePendingStrategy(ISupplyVaultStrategy _newPendingStrategy, uint256 _notBefore) external; function updateStrategy() external; function updateFeeBps(uint256 _newFeeBps) external; function updateFeeTo(address _newFeeTo) external; function updateReallocateManager(address _newReallocateManager) external; function pause() external; function unpause() external; /* Voting */ function delegates(address delegator) external view returns (address); function delegate(address delegatee) external; function delegateBySig( address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s ) external; function getCurrentVotes(address account) external view returns (uint256); function getPriorVotes(address account, uint blockNumber) external view returns (uint256); /* Events */ event AddBorrowable(address indexed borrowable); event RemoveBorrowable(address indexed borrowable); event EnableBorrowable(address indexed borrowable); event DisableBorrowable(address indexed borrowable); event UpdatePendingStrategy(address indexed strategy, uint256 notBefore); event UpdateStrategy(address indexed strategy); event UpdateFeeBps(uint256 newFeeBps); event UpdateFeeTo(address indexed newFeeTo); event UpdateReallocateManager(address indexed newReallocateManager); event UnwindBorrowable(address indexed borrowable, uint256 underlyingAmount, uint256 borrowableAmount); event Enter( address indexed who, address indexed token, uint256 tokenAmount, uint256 underlyingAmount, uint256 share ); event Leave(address indexed who, uint256 share, uint256 underlyingAmount); event LeaveInKind(address indexed who, uint256 share); event Reallocate(address indexed sender, uint256 share); event AllocateBorrowable(address indexed borrowable, uint256 underlyingAmount, uint256 borrowableAmount); event DeallocateBorrowable(address indexed borrowable, uint256 borrowableAmount, uint256 underlyingAmount); event ApplyFee(address indexed feeTo, uint256 gain, uint256 fee, uint256 feeShare); event UpdateCheckpoint(uint256 checkpointBalance); }
pragma solidity >=0.5.0; interface IFactory { event LendingPoolInitialized(address indexed uniswapV2Pair, address indexed token0, address indexed token1, address collateral, address borrowable0, address borrowable1, uint lendingPoolId); event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin); event NewAdmin(address oldAdmin, address newAdmin); event NewReservesPendingAdmin(address oldReservesPendingAdmin, address newReservesPendingAdmin); event NewReservesAdmin(address oldReservesAdmin, address newReservesAdmin); event NewReservesManager(address oldReservesManager, address newReservesManager); function admin() external view returns (address); function pendingAdmin() external view returns (address); function reservesAdmin() external view returns (address); function reservesPendingAdmin() external view returns (address); function reservesManager() external view returns (address); function getLendingPool(address uniswapV2Pair) external view returns ( bool initialized, uint24 lendingPoolId, address collateral, address borrowable0, address borrowable1 ); function allLendingPools(uint) external view returns (address uniswapV2Pair); function allLendingPoolsLength() external view returns (uint); function bDeployer() external view returns (address); function cDeployer() external view returns (address); function tarotPriceOracle() external view returns (address); function createCollateral(address uniswapV2Pair) external returns (address collateral); function createBorrowable0(address uniswapV2Pair) external returns (address borrowable0); function createBorrowable1(address uniswapV2Pair) external returns (address borrowable1); function initializeLendingPool(address uniswapV2Pair) external; function _setPendingAdmin(address newPendingAdmin) external; function _acceptAdmin() external; function _setReservesPendingAdmin(address newPendingAdmin) external; function _acceptReservesAdmin() external; function _setReservesManager(address newReservesManager) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISupplyVault","name":"supplyVault","type":"address"}],"name":"authorize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISupplyVault[]","name":"supplyVaultList","type":"address[]"}],"name":"authorizeMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"needAmount","type":"uint256"}],"name":"deallocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getBorrowable","outputs":[{"internalType":"contract IBorrowable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSupplyRate","outputs":[{"internalType":"uint256","name":"supplyRate_","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_underlyingAmount","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"reallocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600061001b61006a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006e565b3390565b6120e98061007d6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80638da5cb5b116100665780638da5cb5b146101cb5780639685e716146101ef578063abaa991614610215578063b6a5d7de1461021d578063f2fde38b146102435761009e565b80634dc0ed9b146100a35780636f6c441f14610115578063715018a61461013257806384bdc9a81461013a5780638670d9dc14610154575b600080fd5b610113600480360360208110156100b957600080fd5b8101906020810181356401000000008111156100d457600080fd5b8201836020820111156100e657600080fd5b8035906020019184602083028401116401000000008311171561010857600080fd5b509092509050610269565b005b6101136004803603602081101561012b57600080fd5b5035610307565b6101136104c1565b61014261056d565b60408051918252519081900360200190f35b6101136004803603604081101561016a57600080fd5b8135919081019060408101602082013564010000000081111561018c57600080fd5b82018360208201111561019e57600080fd5b803590602001918460018302840111640100000000831117156101c057600080fd5b50909250905061081a565b6101d3610879565b604080516001600160a01b039092168252519081900360200190f35b6101d36004803603602081101561020557600080fd5b50356001600160a01b0316610888565b610113610b3c565b6101136004803603602081101561023357600080fd5b50356001600160a01b0316610ef8565b6101136004803603602081101561025957600080fd5b50356001600160a01b0316610f66565b610271611068565b6001600160a01b0316610282610879565b6001600160a01b0316146102cb576040805162461bcd60e51b8152602060048201819052602482015260008051602061201a833981519152604482015290519081900360640190fd5b60005b81811015610302576102fa8383838181106102e557fe5b905060200201356001600160a01b031661106c565b6001016102ce565b505050565b3360009081526001602052604090205460ff166103555760405162461bcd60e51b8152600401808060200182810382526025815260200180611f626025913960400191505060405180910390fd5b600081116103945760405162461bcd60e51b8152600401808060200182810382526022815260200180611ff86022913960400191505060405180910390fd5b60003390506000816001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156103d457600080fd5b505afa1580156103e8573d6000803e3d6000fd5b505050506040513d60208110156103fe57600080fd5b50516040805163821beaf560e01b815290519192506000916001600160a01b0385169163821beaf5916004808301926020929190829003018186803b15801561044657600080fd5b505afa15801561045a573d6000803e3d6000fd5b505050506040513d602081101561047057600080fd5b505190505b6000610483848385886110eb565b905084811061049557600094506104a2565b61049f858261159a565b94505b846104ad57506104b3565b50610475565b83156104bb57fe5b50505050565b6104c9611068565b6001600160a01b03166104da610879565b6001600160a01b031614610523576040805162461bcd60e51b8152602060048201819052602482015260008051602061201a833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b3360009081526001602052604081205460ff166105bb5760405162461bcd60e51b8152600401808060200182810382526025815260200180611f626025913960400191505060405180910390fd5b60003390506000816001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b1580156105fb57600080fd5b505afa15801561060f573d6000803e3d6000fd5b505050506040513d602081101561062557600080fd5b5051604080516370a0823160e01b81526001600160a01b0385811660048301529151929350600092918416916370a0823191602480820192602092909190829003018186803b15801561067757600080fd5b505afa15801561068b573d6000803e3d6000fd5b505050506040513d60208110156106a157600080fd5b50516040805163821beaf560e01b8152905191925060009182916001600160a01b0387169163821beaf591600480820192602092909190829003018186803b1580156106ec57600080fd5b505afa158015610700573d6000803e3d6000fd5b505050506040513d602081101561071657600080fd5b5051905060005b818110156107fe576000866001600160a01b031663ade37c13836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561076b57600080fd5b505afa15801561077f573d6000803e3d6000fd5b505050506040513d602081101561079557600080fd5b5051905060006107ae6001600160a01b038316896115fc565b905080156107f45760006107ca836001600160a01b0316611687565b509091506107e490506107dd83836116a5565b87906116fe565b95506107f087836116fe565b9650505b505060010161071d565b5082156108125761080f8284611758565b95505b505050505090565b3360009081526001602052604090205460ff166108685760405162461bcd60e51b8152600401808060200182810382526025815260200180611f626025913960400191505060405180910390fd5b61087183610307565b610302610b3c565b6000546001600160a01b031690565b3360009081526001602052604081205460ff166108d65760405162461bcd60e51b8152600401808060200182810382526025815260200180611f626025913960400191505060405180910390fd5b60003390506000816001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b15801561091657600080fd5b505afa15801561092a573d6000803e3d6000fd5b505050506040513d602081101561094057600080fd5b505160408051630572bf5f60e01b81526001600160a01b03871660048201529051919250600091829182917335c052bbf8338b06351782a565aa9aad173432ea91630572bf5f9160248083019260a0929190829003018186803b1580156109a657600080fd5b505afa1580156109ba573d6000803e3d6000fd5b505050506040513d60a08110156109d057600080fd5b508051606082015160809092015190945090925090508215610b0057836001600160a01b0316826001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2f57600080fd5b505afa158015610a43573d6000803e3d6000fd5b505050506040513d6020811015610a5957600080fd5b50516001600160a01b03161415610a7657509350610b3792505050565b836001600160a01b0316816001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610ab957600080fd5b505afa158015610acd573d6000803e3d6000fd5b505050506040513d6020811015610ae357600080fd5b50516001600160a01b03161415610b00579450610b379350505050565b60405162461bcd60e51b815260040180806020018281038252602981526020018061208b6029913960400191505060405180910390fd5b919050565b3360009081526001602052604090205460ff16610b8a5760405162461bcd60e51b8152600401808060200182810382526025815260200180611f626025913960400191505060405180910390fd5b60003390506000816001600160a01b0316636f307dc36040518163ffffffff1660e01b815260040160206040518083038186803b158015610bca57600080fd5b505afa158015610bde573d6000803e3d6000fd5b505050506040513d6020811015610bf457600080fd5b5051604080516370a0823160e01b81526001600160a01b0385811660048301529151929350600092918416916370a0823191602480820192602092909190829003018186803b158015610c4657600080fd5b505afa158015610c5a573d6000803e3d6000fd5b505050506040513d6020811015610c7057600080fd5b5051905080610c8157505050610ef6565b610c89611f03565b6000846001600160a01b031663821beaf56040518163ffffffff1660e01b815260040160206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d6020811015610cee57600080fd5b5051905080610d2e5760405162461bcd60e51b8152600401808060200182810382526025815260200180611fb26025913960400191505060405180910390fd5b60005b81811015610e6b576000866001600160a01b031663ade37c13836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610d7f57600080fd5b505afa158015610d93573d6000803e3d6000fd5b505050506040513d6020811015610da957600080fd5b505160408051631aca889d60e31b81526001600160a01b03808416600483015291519293509089169163d65444e891602480820192602092909190829003018186803b158015610df857600080fd5b505afa158015610e0c573d6000803e3d6000fd5b505050506040513d6020811015610e2257600080fd5b5051610e2e5750610e63565b6000610e3d88838860006117bf565b5090508460800151811115610e60576001600160a01b0382168552608085018190525b50505b600101610d31565b5081516001600160a01b031615610ef057846001600160a01b031663b4039d9e8360000151856040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b158015610ed757600080fd5b505af1158015610eeb573d6000803e3d6000fd5b505050505b50505050505b565b610f00611068565b6001600160a01b0316610f11610879565b6001600160a01b031614610f5a576040805162461bcd60e51b8152602060048201819052602482015260008051602061201a833981519152604482015290519081900360640190fd5b610f638161106c565b50565b610f6e611068565b6001600160a01b0316610f7f610879565b6001600160a01b031614610fc8576040805162461bcd60e51b8152602060048201819052602482015260008051602061201a833981519152604482015290519081900360640190fd5b6001600160a01b03811661100d5760405162461bcd60e51b8152600401808060200182810382526026815260200180611f3c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b03811660009081526001602052604090205460ff16156110c45760405162461bcd60e51b81526004018080602001828103825260298152602001806120626029913960400191505060405180910390fd5b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b60006110f5611f03565b600019606082015260005b85811015611385576000876001600160a01b031663ade37c13836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561114e57600080fd5b505afa158015611162573d6000803e3d6000fd5b505050506040513d602081101561117857600080fd5b5051604080516370a0823160e01b81526001600160a01b038b81166004830152915192935060009283928392908616916370a0823191602480820192602092909190829003018186803b1580156111ce57600080fd5b505afa1580156111e2573d6000803e3d6000fd5b505050506040513d60208110156111f857600080fd5b505190508061120a575050505061137d565b6000896001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561125957600080fd5b505afa15801561126d573d6000803e3d6000fd5b505050506040513d602081101561128357600080fd5b50519050600061129c6001600160a01b038716836118e2565b9050806112ae5750505050505061137d565b60006112ce60016112c86001600160a01b038a168e6118e2565b906116fe565b90506112db81858461197a565b95506112f06001600160a01b0388168761198f565b94505050505080600014156113075750505061137d565b60006113168b856000856117bf565b9150600090506113388361133284670de0b6b3a76400006116a5565b90611758565b90508660600151811015611368576001600160a01b03851687526060870181905260408701849052602087018390525b81611377575050505050611385565b50505050505b600101611100565b506000198160600151106113ca5760405162461bcd60e51b815260040180806020018281038252602881526020018061203a6028913960400191505060405180910390fd5b6000846001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561141957600080fd5b505afa15801561142d573d6000803e3d6000fd5b505050506040513d602081101561144357600080fd5b50518251604080850151815163f26a584560e01b81526001600160a01b039384166004820152602481019190915290519293509089169163f26a58459160448082019260009290919082900301818387803b1580156114a157600080fd5b505af11580156114b5573d6000803e3d6000fd5b505050506000856001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561150857600080fd5b505afa15801561151c573d6000803e3d6000fd5b505050506040513d602081101561153257600080fd5b50516020840151909150611546828461159a565b1461158b576040805162461bcd60e51b815260206004820152601060248201526f088cad8e8c240daeae6e840dac2e8c6d60831b604482015290519081900360640190fd5b50506020015195945050505050565b6000828211156115f1576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b600061168083846001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561164f57600080fd5b505afa158015611663573d6000803e3d6000fd5b505050506040513d602081101561167957600080fd5b505161198f565b9392505050565b600080600061169884600080611a1f565b9250925092509193909250565b6000826116b4575060006115f6565b828202828482816116c157fe5b04146116805760405162461bcd60e51b8152600401808060200182810382526021815260200180611fd76021913960400191505060405180910390fd5b600082820183811015611680576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008082116117ae576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816117b757fe5b049392505050565b60008083151583151514156118055760405162461bcd60e51b815260040180806020018281038252602b815260200180611f87602b913960400191505060405180910390fd5b6000611819866001600160a01b0316611687565b5050905080600014156118335750600091508190506118d9565b60006118496001600160a01b0388168787611a1f565b50909150600090506118646001600160a01b0389168a6115fc565b9050600061187282856116a5565b905060008815611897576118908461188a858c6116fe565b906116a5565b90506118ad565b87156118ab576118908461188a858b61159a565bfe5b818111156118c6576118bf818361159a565b96506118d3565b6118d0828261159a565b95505b50505050505b94509492505050565b6000816118f1575060006115f6565b6000836001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561192e57600080fd5b505af1158015611942573d6000803e3d6000fd5b505050506040513d602081101561195857600080fd5b505190506119728161133285670de0b6b3a76400006116a5565b949350505050565b60006119728461198a8585611ade565b611ade565b60008161199e575060006115f6565b6000836001600160a01b0316633ba0b9a96040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156119db57600080fd5b505af11580156119ef573d6000803e3d6000fd5b505050506040513d6020811015611a0557600080fd5b50519050611972670de0b6b3a764000061133285846116a5565b6000806000611a2f868686611af5565b8092508193505050611ad3670de0b6b3a7640000611332611abd896001600160a01b0316634322b7146040518163ffffffff1660e01b815260040160206040518083038186803b158015611a8257600080fd5b505afa158015611a96573d6000803e3d6000fd5b505050506040513d6020811015611aac57600080fd5b5051670de0b6b3a76400009061159a565b61188a670de0b6b3a764000061133288886116a5565b925093509350939050565b600081831015611aef5750816115f6565b50919050565b600080831580611b03575082155b611b46576040805162461bcd60e51b815260206004820152600f60248201526e42483a20494e564c445f44454c544160881b604482015290519081900360640190fd5b846001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611b8157600080fd5b505af1158015611b95573d6000803e3d6000fd5b505050506000856001600160a01b03166347bd37186040518163ffffffff1660e01b815260040160206040518083038186803b158015611bd457600080fd5b505afa158015611be8573d6000803e3d6000fd5b505050506040513d6020811015611bfe57600080fd5b50516040805163ad7a672f60e01b81529051919250600091611c7e9184916001600160a01b038b169163ad7a672f916004808301926020929190829003018186803b158015611c4c57600080fd5b505afa158015611c60573d6000803e3d6000fd5b505050506040513d6020811015611c7657600080fd5b5051906116fe565b90508515611c9357611c9081876116fe565b90505b8415611ca657611ca3818661159a565b90505b8015611cc757611cc28161133284670de0b6b3a76400006116a5565b611cca565b60005b925050506000856001600160a01b0316631aebf12f6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0957600080fd5b505afa158015611d1d573d6000803e3d6000fd5b505050506040513d6020811015611d3357600080fd5b50519050808211611db857611db18161133284896001600160a01b03166391b427456040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7f57600080fd5b505afa158015611d93573d6000803e3d6000fd5b505050506040513d6020811015611da957600080fd5b5051906116a5565b9250611eef565b611e286001876001600160a01b0316635b2b9d1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015611df657600080fd5b505afa158015611e0a573d6000803e3d6000fd5b505050506040513d6020811015611e2057600080fd5b50519061159a565b92506000611e57611e41670de0b6b3a76400008461159a565b611332670de0b6b3a764000061188a878761159a565b9050611e6384826116a5565b935050611eec670de0b6b3a7640000611332886001600160a01b03166391b427456040518163ffffffff1660e01b815260040160206040518083038186803b158015611eae57600080fd5b505afa158015611ec2573d6000803e3d6000fd5b505050506040513d6020811015611ed857600080fd5b505161188a87670de0b6b3a76400006116fe565b92505b8265ffffffffffff16925050935093915050565b6040518060a0016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373537570706c795661756c74537472617465677956313a204e4f545f415554484f52495a4544537570706c795661756c74537472617465677956313a204445504f5349545f584f525f5749544844524157537570706c795661756c74537472617465677956313a204e4f5f424f52524f5741424c4553536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77537570706c795661756c74537472617465677956313a205a45524f5f414d4f554e544f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572537570706c795661756c74537472617465677956313a20494e53554646494349454e545f43415348537570706c795661756c74537472617465677956313a20414c52454144595f415554484f52495a4544537570706c795661756c74537472617465677956313a20494e56414c49445f424f52524f5741424c45a26469706673582212207c4135ecbf69af6a2befe513749070032ecd1cb4ddbbe43fc4a0f814e867931764736f6c634300060c0033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.