Contract 0x1C19f7ba3AF3262b802AD7b5e54D0dE82f19b55A

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x74f984558c1cfb9c74c00a52face2d9c9a6606cb334db5ae35bafd4f1f9c6506Update505136062022-11-06 0:15:4729 days 37 mins ago0xfb50d336124f7189ecacb0144e8977240e8a00f3 IN  0x1c19f7ba3af3262b802ad7b5e54d0de82f19b55a0 FTM0.095055839999
0x136af16ce53617756de99cbb7f8b563b6e6dd56b7e57d472a9c820677796959fUpdate501970212022-10-29 1:19:4636 days 23 hrs ago0xfb50d336124f7189ecacb0144e8977240e8a00f3 IN  0x1c19f7ba3af3262b802ad7b5e54d0de82f19b55a0 FTM0.0022150341
0x9d052ef081be37d43b4a7c4e5f58a0c9343bb8e131868ffc32deacdad6f62363Update478121252022-09-26 19:47:0769 days 5 hrs ago0xfb50d336124f7189ecacb0144e8977240e8a00f3 IN  0x1c19f7ba3af3262b802ad7b5e54d0de82f19b55a0 FTM0.000249676502
0x36ed37cddb345268eb63a85cdd16ad9fad1ade050f90db0e2832769b16a5772a0x60806040476823022022-09-25 2:56:3970 days 21 hrs agoKanpeki: Deployer IN  Create: KAOracle0 FTM0.001356860124
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x36ed37cddb345268eb63a85cdd16ad9fad1ade050f90db0e2832769b16a5772a476823022022-09-25 2:56:3970 days 21 hrs ago Kanpeki: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KAOracle

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : KAOracle.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.7.6;
pragma abicoder v2;

import { Math } from "oz-3.4/math/Math.sol";
import { SafeMath } from "oz-3.4/math/SafeMath.sol";
import { ReentrancyGuard } from "oz-3.4/utils/ReentrancyGuard.sol";
import { UniswapV2OracleLibrary as UniOracleLib } from "@uniswap/v2-periphery/contracts/libraries/UniswapV2OracleLibrary.sol";
import { FixedPoint } from "@uniswap/lib/contracts/libraries/FixedPoint.sol";
import { IUniswapV2Pair as IUniPair } from "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";


interface IContractRegistry
{
  function oracle () external view returns (address);

  function stakingManager () external view returns (address);

  function rewardManager () external view returns (address);

  function borrowManager () external view returns (address);
}

interface IOracle
{
  function convertToUSD (address fromToken, uint256 amount) external view returns (uint256);
}

interface IStakingManager
{
  struct Config
  {
    bool stakable;
    uint112 minForDeposits;
    uint112 minForDebts;
    uint256 lastPriceInUSD;
  }

  struct Stake
  {
    uint32 unstakableTimestamp;
    uint112 expected;
    uint112 amount;
  }


  function getConfig () external view returns (Config memory);

  function getStakesOf (address account) external view returns (Stake memory, Stake memory);

  function isDiscountedForDebts (address account) external view returns (bool);


  function updateConfig (Config calldata config) external;

}

interface IRewardManager
{
  function updateLastPrice (uint256 price) external;
}

interface IBorrowManager
{
  struct Debt
  {
    uint16 interestRate;
    uint24 durationInSecs;
    uint32 startTimestamp;
    address borrower;
    address token;
    address collateralToken;
    uint128 amount;
    uint128 collateral;
  }

  function getDebtsOf (address borrower) external view returns (bytes32[] memory);

  function getDebt (bytes32 debtID) external view returns (Debt memory);
}

interface IKAOracle
{
  function canUpdate (address account) external view returns (bool);

  function convertToKAE (uint256 amount) external view returns (uint256);

  function lastTimestamp () external view returns (uint256);

  function lastPrice () external view returns (uint256);
}

contract KAOracle is IKAOracle, ReentrancyGuard
{
  using FixedPoint for *;
  using SafeMath for uint256;


  IContractRegistry private constant _REGISTRY = IContractRegistry(0x06Eeb1B35361687f10909902AD4704AC7d09e0E7);
  IUniPair private constant _PAIR = IUniPair(0xE6C2DB69dCDA38A8f56feAfC0229E6f039E5d5E2);

  address private constant _WFTM = 0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83;

  uint256 private constant _GAP = 24 hours;


  uint256 private _lastCumulativePrice;
  uint256 private _avgPrice;

  uint32 private _lastTimestamp;


  event Update(address updater, uint256 price);


  constructor ()
  {
    (,, _lastTimestamp) = _PAIR.getReserves();
    _lastCumulativePrice = _PAIR.price1CumulativeLast();
  }


  function _lastPrice () internal view returns (uint256)
  {
    return _avgPrice == 0 ? 0 : Math.max(1e18, IOracle(_REGISTRY.oracle()).convertToUSD(_WFTM, _avgPrice));
  }

  function _canUpdate (address account) internal view returns (bool)
  {
    IBorrowManager borrower = IBorrowManager(_REGISTRY.borrowManager());


    bytes32[] memory debts = borrower.getDebtsOf(account);

    if (debts.length == 0)
    {
      return false;
    }


    IStakingManager mgr = IStakingManager(_REGISTRY.stakingManager());
    (, IStakingManager.Stake memory stake) = mgr.getStakesOf(account);

    uint256 unstakable = stake.unstakableTimestamp;
    uint256 start = borrower.getDebt(debts[debts.length.sub(1)]).startTimestamp;


    return mgr.isDiscountedForDebts(account) && uint256(stake.amount) >= uint256(mgr.getConfig().minForDebts).mul(2) && unstakable > block.timestamp && unstakable.sub(block.timestamp) >= 45 days && block.timestamp.sub(start) <= 2 weeks;
  }

  function canUpdate (address account) public override view returns (bool)
  {
    return _canUpdate(account);
  }

  function update () external nonReentrant
  {
    require(msg.sender == tx.origin, "inhuman");
    require(_canUpdate(msg.sender), "bad updater");


    (, uint256 cumulativePrice, uint32 timestamp) = UniOracleLib.currentCumulativePrices(address(_PAIR));
    uint32 elapsed = timestamp - _lastTimestamp;

    require(elapsed >= _GAP, "!elapsed");


    _avgPrice = FixedPoint.uq112x112(uint224((cumulativePrice - _lastCumulativePrice) / elapsed)).mul(1e18).decode144();

    require(_avgPrice > 0, "bad update");


    _lastCumulativePrice = cumulativePrice;
    _lastTimestamp = timestamp;


    emit Update(msg.sender, _avgPrice);


    uint256 price = _lastPrice();


    IRewardManager(_REGISTRY.rewardManager()).updateLastPrice(price);

    IStakingManager(_REGISTRY.stakingManager()).updateConfig(IStakingManager.Config
    ({
      stakable: true,
      lastPriceInUSD: price,
      minForDebts: uint112(uint256(1250e18).mul(1e18).div(price)),
      minForDeposits: uint112(uint256(2250e18).mul(1e18).div(price))
    }));
  }


  function _convertToKAE (uint256 amount) internal view returns (uint256)
  {
    uint256 price = _lastPrice();


    return price == 0 ? 0 : amount.mul(1e18).div(price);
  }

  function convertToKAE (uint256 amount) public override view returns (uint256)
  {
    return _convertToKAE(amount);
  }

  function lastTimestamp () external override view returns (uint256)
  {
    return _lastTimestamp;
  }

  function lastPrice () external override view returns (uint256)
  {
    return _lastPrice();
  }
}

File 2 of 7 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 3 of 7 : SafeMath.sol
// 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;
    }
}

File 4 of 7 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 7 : UniswapV2OracleLibrary.sol
pragma solidity >=0.5.0;

import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
import '@uniswap/lib/contracts/libraries/FixedPoint.sol';

// library with helper methods for oracles that are concerned with computing average prices
library UniswapV2OracleLibrary {
    using FixedPoint for *;

    // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
    function currentBlockTimestamp() internal view returns (uint32) {
        return uint32(block.timestamp % 2 ** 32);
    }

    // produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
    function currentCumulativePrices(
        address pair
    ) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) {
        blockTimestamp = currentBlockTimestamp();
        price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();
        price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();

        // if time has elapsed since the last update on the pair, mock the accumulated price values
        (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = IUniswapV2Pair(pair).getReserves();
        if (blockTimestampLast != blockTimestamp) {
            // subtraction overflow is desired
            uint32 timeElapsed = blockTimestamp - blockTimestampLast;
            // addition overflow is desired
            // counterfactual
            price0Cumulative += uint(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;
            // counterfactual
            price1Cumulative += uint(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;
        }
    }
}

File 6 of 7 : FixedPoint.sol
pragma solidity >=0.4.0;

// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
    // range: [0, 2**112 - 1]
    // resolution: 1 / 2**112
    struct uq112x112 {
        uint224 _x;
    }

    // range: [0, 2**144 - 1]
    // resolution: 1 / 2**112
    struct uq144x112 {
        uint _x;
    }

    uint8 private constant RESOLUTION = 112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 x) internal pure returns (uq112x112 memory) {
        return uq112x112(uint224(x) << RESOLUTION);
    }

    // encodes a uint144 as a UQ144x112
    function encode144(uint144 x) internal pure returns (uq144x112 memory) {
        return uq144x112(uint256(x) << RESOLUTION);
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) {
        require(x != 0, 'FixedPoint: DIV_BY_ZERO');
        return uq112x112(self._x / uint224(x));
    }

    // multiply a UQ112x112 by a uint, returning a UQ144x112
    // reverts on overflow
    function mul(uq112x112 memory self, uint y) internal pure returns (uq144x112 memory) {
        uint z;
        require(y == 0 || (z = uint(self._x) * y) / y == uint(self._x), "FixedPoint: MULTIPLICATION_OVERFLOW");
        return uq144x112(z);
    }

    // returns a UQ112x112 which represents the ratio of the numerator to the denominator
    // equivalent to encode(numerator).div(denominator)
    function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) {
        require(denominator > 0, "FixedPoint: DIV_BY_ZERO");
        return uq112x112((uint224(numerator) << RESOLUTION) / denominator);
    }

    // decode a UQ112x112 into a uint112 by truncating after the radix point
    function decode(uq112x112 memory self) internal pure returns (uint112) {
        return uint112(self._x >> RESOLUTION);
    }

    // decode a UQ144x112 into a uint144 by truncating after the radix point
    function decode144(uq144x112 memory self) internal pure returns (uint144) {
        return uint144(self._x >> RESOLUTION);
    }
}

File 7 of 7 : IUniswapV2Pair.sol
pragma solidity >=0.5.0;

interface IUniswapV2Pair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint 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 (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"updater","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Update","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"canUpdate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convertToKAE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50600160008190555073e6c2db69dcda38a8f56feafc0229e6f039e5d5e26001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156200006857600080fd5b505afa1580156200007d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000a391906200016c565b6003805463ffffffff191663ffffffff92909216919091179055505060408051635a3d549360e01b8152905173e6c2db69dcda38a8f56feafc0229e6f039e5d5e291635a3d5493916004808301926020929190829003018186803b1580156200010b57600080fd5b505afa15801562000120573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001469190620001c0565b600155620001d9565b80516001600160701b03811681146200016757600080fd5b919050565b60008060006060848603121562000181578283fd5b6200018c846200014f565b92506200019c602085016200014f565b9150604084015163ffffffff81168114620001b5578182fd5b809150509250925092565b600060208284031215620001d2578081fd5b5051919050565b61149c80620001e96000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063053f14da1461005c57806319d8ac611461007a578063a2e6204514610082578063e73872b91461008c578063f8c9340d146100ac575b600080fd5b6100646100bf565b6040516100719190611310565b60405180910390f35b6100646100ce565b61008a6100da565b005b61009f61009a366004611051565b610507565b6040516100719190611305565b6100646100ba3660046112a8565b61051a565b60006100c9610525565b905090565b60035463ffffffff1690565b60026000541415610132576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260005533321461015f5760405162461bcd60e51b815260040161015690611360565b60405180910390fd5b61016833610665565b6101845760405162461bcd60e51b815260040161015690611319565b6000806101a473e6c2db69dcda38a8f56feafc0229e6f039e5d5e2610ab7565b600354919450925063ffffffff908116830391506201518090821610156101dd5760405162461bcd60e51b81526004016101569061133e565b61022161021c670de0b6b3a764000060405180602001604052808563ffffffff1660015489038161020a57fe5b046001600160e01b0316905290610c86565b610d06565b71ffffffffffffffffffffffffffffffffffff1660028190556102565760405162461bcd60e51b815260040161015690611381565b60018390556003805463ffffffff191663ffffffff84161790556002546040517f5f66d2a93b609bc6596b75c6dbb0e4f3f7cafd4b3b617157ff304d1076e58375916102a4913391906112ec565b60405180910390a160006102b6610525565b90507306eeb1b35361687f10909902ad4704ac7d09e0e76001600160a01b0316630f4ef8a66040518163ffffffff1660e01b815260040160206040518083038186803b15801561030557600080fd5b505afa158015610319573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033d919061106d565b6001600160a01b031663d5c44898826040518263ffffffff1660e01b81526004016103689190611310565b600060405180830381600087803b15801561038257600080fd5b505af1158015610396573d6000803e3d6000fd5b505050507306eeb1b35361687f10909902ad4704ac7d09e0e76001600160a01b03166322828cc26040518163ffffffff1660e01b815260040160206040518083038186803b1580156103e757600080fd5b505afa1580156103fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061041f919061106d565b6001600160a01b03166339492476604051806080016040528060011515815260200161046f85610469670de0b6b3a76400006879f905c6fd34e80000610d0d90919063ffffffff16565b90610d6d565b6001600160701b0316815260200161049c856104696843c33c193756480000670de0b6b3a7640000610d0d565b6001600160701b03168152602001848152506040518263ffffffff1660e01b81526004016104ca91906113a5565b600060405180830381600087803b1580156104e457600080fd5b505af11580156104f8573d6000803e3d6000fd5b50506001600055505050505050565b600061051282610665565b90505b919050565b600061051282610dd4565b600060025460001461065f5761065a670de0b6b3a76400007306eeb1b35361687f10909902ad4704ac7d09e0e76001600160a01b0316637dc0d1d06040518163ffffffff1660e01b815260040160206040518083038186803b15801561058a57600080fd5b505afa15801561059e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c2919061106d565b6001600160a01b031663f08a25ed7321be370d5312f44cb42ce377bc9b8a0cef1a4c836002546040518363ffffffff1660e01b81526004016106059291906112ec565b60206040518083038186803b15801561061d57600080fd5b505afa158015610631573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065591906112c0565b610e0b565b6100c9565b50600090565b6000807306eeb1b35361687f10909902ad4704ac7d09e0e76001600160a01b031663829057e36040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b557600080fd5b505afa1580156106c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ed919061106d565b90506000816001600160a01b03166346c96175856040518263ffffffff1660e01b815260040161071d91906112d8565b60006040518083038186803b15801561073557600080fd5b505afa158015610749573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107719190810190611089565b905080516000141561078857600092505050610515565b60007306eeb1b35361687f10909902ad4704ac7d09e0e76001600160a01b03166322828cc26040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d757600080fd5b505afa1580156107eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080f919061106d565b90506000816001600160a01b031663fafc08c4876040518263ffffffff1660e01b815260040161083f91906112d8565b60c06040518083038186803b15801561085757600080fd5b505afa15801561086b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088f9190611274565b9150506000816000015163ffffffff1690506000856001600160a01b031663dff01deb866108c860018951610e2290919063ffffffff16565b815181106108d257fe5b60200260200101516040518263ffffffff1660e01b81526004016108f69190611310565b6101006040518083038186803b15801561090f57600080fd5b505afa158015610923573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094791906111b6565b6040015163ffffffff169050836001600160a01b031663e3a549ad896040518263ffffffff1660e01b815260040161097f91906112d8565b60206040518083038186803b15801561099757600080fd5b505afa1580156109ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cf919061112a565b8015610a705750610a5f6002856001600160a01b031663c3f909d46040518163ffffffff1660e01b815260040160806040518083038186803b158015610a1457600080fd5b505afa158015610a28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4c9190611144565b604001516001600160701b031690610d0d565b83604001516001600160701b031610155b8015610a7b57504282115b8015610a935750623b5380610a908342610e22565b10155b8015610aab575062127500610aa84283610e22565b11155b98975050505050505050565b6000806000610ac4610e7f565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b158015610aff57600080fd5b505afa158015610b13573d6000803e3d6000fd5b505050506040513d6020811015610b2957600080fd5b505160408051635a3d549360e01b815290519194506001600160a01b03861691635a3d549391600480820192602092909190829003018186803b158015610b6f57600080fd5b505afa158015610b83573d6000803e3d6000fd5b505050506040513d6020811015610b9957600080fd5b505160408051630240bc6b60e21b81529051919350600091829182916001600160a01b03891691630902f1ac916004808301926060929190829003018186803b158015610be557600080fd5b505afa158015610bf9573d6000803e3d6000fd5b505050506040513d6060811015610c0f57600080fd5b5080516020820151604090920151909450909250905063ffffffff80821690851614610c7c5780840363ffffffff8116610c498486610e89565b516001600160e01b031602969096019563ffffffff8116610c6a8585610e89565b516001600160e01b0316029590950194505b5050509193909250565b610c8e610f39565b6000821580610cb457505082516001600160e01b031682810290838281610cb157fe5b04145b610cef5760405162461bcd60e51b81526004018080602001828103825260238152602001806114446023913960400191505060405180910390fd5b604080516020810190915290815290505b92915050565b5160701c90565b600082610d1c57506000610d00565b82820282848281610d2957fe5b0414610d665760405162461bcd60e51b81526004018080602001828103825260218152602001806114236021913960400191505060405180910390fd5b9392505050565b6000808211610dc3576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610dcc57fe5b049392505050565b600080610ddf610525565b90508015610e0257610dfd8161046985670de0b6b3a7640000610d0d565b610d66565b60009392505050565b600081831015610e1b5781610d66565b5090919050565b600082821115610e79576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b63ffffffff421690565b610e91610f4c565b6000826001600160701b031611610eef576040805162461bcd60e51b815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f000000000000000000604482015290519081900360640190fd5b6040805160208101909152806001600160701b0384166dffffffffffffffffffffffffffff60701b607087901b1681610f2457fe5b046001600160e01b0316815250905092915050565b6040518060200160405280600081525090565b60408051602081019091526000815290565b80516105158161140a565b8051801515811461051557600080fd5b600060608284031215610f8a578081fd5b6040516060810181811067ffffffffffffffff82111715610fa757fe5b604052905080610fb68361103d565b8152610fc460208401610fe1565b6020820152610fd560408401610fe1565b60408201525092915050565b80516001600160701b038116811461051557600080fd5b80516fffffffffffffffffffffffffffffffff8116811461051557600080fd5b805161ffff8116811461051557600080fd5b805162ffffff8116811461051557600080fd5b805163ffffffff8116811461051557600080fd5b600060208284031215611062578081fd5b8135610d668161140a565b60006020828403121561107e578081fd5b8151610d668161140a565b6000602080838503121561109b578182fd5b825167ffffffffffffffff808211156110b2578384fd5b818501915085601f8301126110c5578384fd5b8151818111156110d157fe5b83810291506110e18483016113e6565b8181528481019084860184860187018a10156110fb578788fd5b8795505b8386101561111d5780518352600195909501949186019186016110ff565b5098975050505050505050565b60006020828403121561113b578081fd5b610d6682610f69565b600060808284031215611155578081fd5b6040516080810181811067ffffffffffffffff8211171561117257fe5b60405261117e83610f69565b815261118c60208401610fe1565b602082015261119d60408401610fe1565b6040820152606083015160608201528091505092915050565b60006101008083850312156111c9578182fd5b6040519081019067ffffffffffffffff821181831017156111e657fe5b816040526111f384611018565b81526112016020850161102a565b60208201526112126040850161103d565b604082015261122360608501610f5e565b606082015261123460808501610f5e565b608082015261124560a08501610f5e565b60a082015261125660c08501610ff8565b60c082015261126760e08501610ff8565b60e0820152949350505050565b60008060c08385031215611286578081fd5b6112908484610f79565b915061129f8460608501610f79565b90509250929050565b6000602082840312156112b9578081fd5b5035919050565b6000602082840312156112d1578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b6020808252600b908201526a3130b2103ab83230ba32b960a91b604082015260600190565b60208082526008908201526708595b185c1cd95960c21b604082015260600190565b60208082526007908201526634b7343ab6b0b760c91b604082015260600190565b6020808252600a90820152696261642075706461746560b01b604082015260600190565b600060808201905082511515825260208301516001600160701b03808216602085015280604086015116604085015250506060830151606083015292915050565b60405181810167ffffffffffffffff8111828210171561140257fe5b604052919050565b6001600160a01b038116811461141f57600080fd5b5056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774669786564506f696e743a204d554c5449504c49434154494f4e5f4f564552464c4f57a2646970667358221220bb48f801ca28e62ab684f1428ede42ed469a8d8bb0e57532d73b1b6566d5fa8a64736f6c63430007060033

Block Transaction Gas Used Reward
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
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.