Contract 0xf211F94Ec24344C00480Ada131bc51A219A96fb1

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc955f5b42d0a052cba71a2192cd230480d93069acdda3810c4f6ff5846afea83Set Bond Paramet...149975192022-05-21 18:44:1913 hrs 3 mins ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.0012054927.5
0x9ce04bdbb058e75bc5a520ba7d30839a9d01203377352d39bcb417d7302dfe79Bond149807612022-05-21 9:23:5522 hrs 23 mins ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.003986647527.5
0x0897852007ccd0be8c62183bc7d7a9e003d6db6a302cafc379c8977fe0b09350Claim Rewards149803632022-05-21 9:10:3722 hrs 36 mins ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.002652072527.5
0xc2c4fb0fef4b6619c932001465302e444afda952cac27db4bbb6902d870fde0dSet Asset149796042022-05-21 8:45:1123 hrs 2 mins ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.001029132527.5
0x11500326b343907cd276cc2f42451f0db188c584d83765d26f4ffea8be857afeSet Asset149795602022-05-21 8:43:4323 hrs 3 mins ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.001028802527.5
0x2f0ff5b049b15b37d3c41293a51d13ec09058b9ba7758f4f5ab6c9dda7a20809Bond146958152022-05-14 18:51:017 days 12 hrs ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.006436787527.5
0x358c34887726fb4d08d3f4744ef7c54f3436961346ef7c97ba2be023044421e2Bond146939372022-05-14 17:48:337 days 13 hrs ago0x27cd3c4d4cb2b7739297ef39d5ce0640bbe8e648 IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.000644321 26.5
0xe0fa8185a747999bcfee75013ffbf48282e34ec286a79c55f6832bf666a778d5Set Asset146888262022-05-14 14:58:207 days 16 hrs ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.00093587525
0x4306c612405859e1181acf583930578a9e3a8b108b59d1f6489cd98581fc613dSet Asset146878632022-05-14 14:26:017 days 17 hrs ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.00285557525
0xd0a6973ad84745b40f2c4746e48590d2d60ecfd5dacbd259650e9118a9d39a01Set Asset146878262022-05-14 14:24:477 days 17 hrs ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  0xf211f94ec24344c00480ada131bc51a219a96fb10 AVAX0.00285557525
0x393642e583406a27fccd4b456d14f35575b58e4151507069cf18bd2af2ffd4d60x60806040146813252022-05-14 10:48:057 days 20 hrs ago0xb711eb61b1903ef44b89c42bb5c00abf4f6bc32b IN  Create: RebateTreasury0 AVAX0.04512562525
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RebateTreasury

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 4 : RebateTreasury.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@openzeppelin/contracts-0.8/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts-0.8/access/Ownable.sol";

interface IOracle {
    function update() external;
    function consult(address _token, uint256 _amountIn) external view returns (uint144 amountOut);
    function twap(address _token, uint256 _amountIn) external view returns (uint144 _amountOut);
}

interface ITreasury {
    function epoch() external view returns (uint256);
}

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;
}

contract RebateTreasury is Ownable {

    struct Asset {
        bool isAdded;
        uint256 multiplier;
        address oracle;
        bool isLP;
        address pair;
    }

    struct VestingSchedule {
        uint256 amount;
        uint256 period;
        uint256 end;
        uint256 claimed;
        uint256 lastClaimed;
    }

    IERC20 public Tomb;
    IOracle public TombOracle;
    ITreasury public Treasury;

    mapping (address => Asset) public assets;
    mapping (address => VestingSchedule) public vesting;

    uint256 public bondThreshold = 20 * 1e4;
    uint256 public bondFactor = 12 * 1e4;
    uint256 public secondaryThreshold = 40 * 1e4;
    uint256 public secondaryFactor = 20 * 1e4;

    uint256 public bondVesting = 7 days;
    uint256 public totalVested = 0;

    uint256 public lastBuyback;
    uint256 public buybackAmount = 10 * 1e4;

    address public constant WFTM = 0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664;
    uint256 public constant DENOMINATOR = 1e6;

    /*
     * ---------
     * MODIFIERS
     * ---------
     */
    
    // Only allow a function to be called with a bondable asset

    modifier onlyAsset(address token) {
        require(assets[token].isAdded, "RebateTreasury: token is not a bondable asset");
        _;
    }

    /*
     * ------------------
     * EXTERNAL FUNCTIONS
     * ------------------
     */

    // Initialize parameters

    constructor(address tomb, address tombOracle, address treasury) {
        Tomb = IERC20(tomb);
        TombOracle = IOracle(tombOracle);
        Treasury = ITreasury(treasury);
    }
    
    // Bond asset for discounted Tomb at bond rate

    function bond(address token, uint256 amount) external onlyAsset(token) {
        require(amount > 0, "RebateTreasury: invalid bond amount");
        uint256 tombAmount = getTombReturn(token, amount);
        require(tombAmount <= Tomb.balanceOf(address(this)) - totalVested, "RebateTreasury: insufficient tomb balance");

        IERC20(token).transferFrom(msg.sender, address(this), amount);
        _claimVested(msg.sender);

        VestingSchedule storage schedule = vesting[msg.sender];
        schedule.amount = schedule.amount - schedule.claimed + tombAmount;
        schedule.period = bondVesting;
        schedule.end = block.timestamp + bondVesting;
        schedule.claimed = 0;
        schedule.lastClaimed = block.timestamp;
        totalVested += tombAmount;
    }

    // Claim available Tomb rewards from bonding

    function claimRewards() external {
        _claimVested(msg.sender);
    }

    /*
     * --------------------
     * RESTRICTED FUNCTIONS
     * --------------------
     */
    
    // Set Tomb token

    function setTomb(address tomb) external onlyOwner {
        Tomb = IERC20(tomb);
    }

    // Set Tomb oracle

    function setTombOracle(address oracle) external onlyOwner {
        TombOracle = IOracle(oracle);
    }

    // Set Tomb treasury

    function setTreasury(address treasury) external onlyOwner {
        Treasury = ITreasury(treasury);
    }
    
    // Set bonding parameters of token
    
    function setAsset(
        address token,
        bool isAdded,
        uint256 multiplier,
        address oracle,
        bool isLP,
        address pair
    ) external onlyOwner {
        assets[token].isAdded = isAdded;
        assets[token].multiplier = multiplier;
        assets[token].oracle = oracle;
        assets[token].isLP = isLP;
        assets[token].pair = pair;
    }

    // Set bond pricing parameters

    function setBondParameters(
        uint256 primaryThreshold,
        uint256 primaryFactor,
        uint256 secondThreshold,
        uint256 secondFactor,
        uint256 vestingPeriod
    ) external onlyOwner {
        bondThreshold = primaryThreshold;
        bondFactor = primaryFactor;
        secondaryThreshold = secondThreshold;
        secondaryFactor = secondFactor;
        bondVesting = vestingPeriod;
    }

    // Redeem assets for buyback under peg

    function redeemAssetsForBuyback(address[] calldata tokens) external onlyOwner {
        require(getTombPrice() < 1e18, "RebateTreasury: unable to buy back");
        uint256 epoch = Treasury.epoch();
        require(lastBuyback != epoch, "RebateTreasury: already bought back");
        lastBuyback = epoch;

        for (uint256 t = 0; t < tokens.length; t ++) {
            require(assets[tokens[t]].isAdded, "RebateTreasury: invalid token");
            IERC20 Token = IERC20(tokens[t]);
            Token.transfer(owner(), Token.balanceOf(address(this)) * buybackAmount / DENOMINATOR);
        }
    }

    /*
     * ------------------
     * INTERNAL FUNCTIONS
     * ------------------
     */

    function _claimVested(address account) internal {
        VestingSchedule storage schedule = vesting[account];
        if (schedule.amount == 0 || schedule.amount == schedule.claimed) return;
        if (block.timestamp <= schedule.lastClaimed || schedule.lastClaimed >= schedule.end) return;

        uint256 duration = (block.timestamp > schedule.end ? schedule.end : block.timestamp) - schedule.lastClaimed;
        uint256 claimable = schedule.amount * duration / schedule.period;
        if (claimable == 0) return;

        schedule.claimed += claimable;
        schedule.lastClaimed = block.timestamp > schedule.end ? schedule.end : block.timestamp;
        totalVested -= claimable;
        Tomb.transfer(account, claimable);
    }

    /*
     * --------------
     * VIEW FUNCTIONS
     * --------------
     */

    // Calculate Tomb return of bonding amount of token

    function getTombReturn(address token, uint256 amount) public view onlyAsset(token) returns (uint256) {
        uint256 tombPrice = getTombPrice();
        uint256 tokenPrice = getTokenPrice(token);
        uint256 bondPremium = getBondPremium();
        return amount * tokenPrice * (bondPremium + DENOMINATOR) * assets[token].multiplier / (DENOMINATOR * DENOMINATOR) / tombPrice;
    }

    // Calculate premium for bonds based on bonding curve

    function getBondPremium() public view returns (uint256) {
        uint256 tombPrice = getTombPrice();
        if (tombPrice < 1e18) return 0;

        uint256 tombPremium = tombPrice * DENOMINATOR / 1e18 - DENOMINATOR;
        if (tombPremium < bondThreshold) return 0;
        if (tombPremium <= secondaryThreshold) {
            return (tombPremium - bondThreshold) * bondFactor / DENOMINATOR;
        } else {
            uint256 primaryPremium = (secondaryThreshold - bondThreshold) * bondFactor / DENOMINATOR;
            return primaryPremium + (tombPremium - secondaryThreshold) * secondaryFactor / DENOMINATOR;
        }
    }

    // Get TOMB price from Oracle

    function getTombPrice() public view returns (uint256) {
        return TombOracle.consult(address(Tomb), 1e18);
    }

    // Get token price from Oracle

    function getTokenPrice(address token) public view onlyAsset(token) returns (uint256) {
        Asset memory asset = assets[token];
        IOracle Oracle = IOracle(asset.oracle);
        if (!asset.isLP) {
            return Oracle.consult(token, 1e18);
        }

        IUniswapV2Pair Pair = IUniswapV2Pair(asset.pair);
        uint256 totalPairSupply = Pair.totalSupply();
        address token0 = Pair.token0();
        address token1 = Pair.token1();
        (uint256 reserve0, uint256 reserve1,) = Pair.getReserves();

        if (token1 == WFTM) {
            uint256 tokenPrice = Oracle.consult(token0, 1e18);
            return tokenPrice * reserve0 / totalPairSupply +
                   reserve1 * 1e18 / totalPairSupply;
        } else {
            uint256 tokenPrice = Oracle.consult(token1, 1e18);
            return tokenPrice * reserve1 / totalPairSupply +
                   reserve0 * 1e18 / totalPairSupply;
        }
    }

    // Get claimable vested Tomb for account
    function claimableTomb(address account) external view returns (uint256) {
        VestingSchedule memory schedule = vesting[account];
        if (block.timestamp <= schedule.lastClaimed || schedule.lastClaimed >= schedule.end) return 0;
        uint256 duration = (block.timestamp > schedule.end ? schedule.end : block.timestamp) - schedule.lastClaimed;
        return schedule.amount * duration / schedule.period;
    }
}

File 2 of 4 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 3 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^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 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) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"tomb","type":"address"},{"internalType":"address","name":"tombOracle","type":"address"},{"internalType":"address","name":"treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Tomb","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TombOracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Treasury","outputs":[{"internalType":"contract ITreasury","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WFTM","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assets","outputs":[{"internalType":"bool","name":"isAdded","type":"bool"},{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"address","name":"oracle","type":"address"},{"internalType":"bool","name":"isLP","type":"bool"},{"internalType":"address","name":"pair","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"bond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bondFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bondThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bondVesting","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buybackAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimableTomb","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBondPremium","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTombPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getTombReturn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastBuyback","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"redeemAssetsForBuyback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secondaryFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"secondaryThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"isAdded","type":"bool"},{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"address","name":"oracle","type":"address"},{"internalType":"bool","name":"isLP","type":"bool"},{"internalType":"address","name":"pair","type":"address"}],"name":"setAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"primaryThreshold","type":"uint256"},{"internalType":"uint256","name":"primaryFactor","type":"uint256"},{"internalType":"uint256","name":"secondThreshold","type":"uint256"},{"internalType":"uint256","name":"secondFactor","type":"uint256"},{"internalType":"uint256","name":"vestingPeriod","type":"uint256"}],"name":"setBondParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tomb","type":"address"}],"name":"setTomb","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oracle","type":"address"}],"name":"setTombOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalVested","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vesting","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"period","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"claimed","type":"uint256"},{"internalType":"uint256","name":"lastClaimed","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405262030d406006556201d4c060075562061a8060085562030d4060095562093a80600a556000600b55620186a0600d553480156200004057600080fd5b5060405162001cf838038062001cf883398101604081905262000063916200011e565b6200006e33620000b1565b600180546001600160a01b039485166001600160a01b03199182161790915560028054938516938216939093179092556003805491909316911617905562000168565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200011957600080fd5b919050565b6000806000606084860312156200013457600080fd5b6200013f8462000101565b92506200014f6020850162000101565b91506200015f6040850162000101565b90509250925092565b611b8080620001786000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c8063918f86741161010f578063d02641a0116100a2578063f0f4426011610071578063f0f44260146103eb578063f11b8188146103fe578063f2fde38b14610487578063f4cdce3c1461049a57600080fd5b8063d02641a014610361578063d411401d14610374578063db0a9c3d1461037d578063e388c4231461038657600080fd5b8063a4006c8d116100de578063a4006c8d14610320578063a515366a14610333578063bf855e8714610346578063c74b60d01461034e57600080fd5b8063918f8674146102e75780639235f197146102f157806399a2faaf146102fa5780639f882bd51461030d57600080fd5b80635f390ec0116101875780636d0d6692116101565780636d0d6692146102a8578063715018a6146102bb57806375be5ae1146102c35780638da5cb5b146102d657600080fd5b80635f390ec01461027057806363fd7f491461028357806367f77e9b1461028c5780636ca0ad951461029557600080fd5b806333920e29116101c357806333920e2914610241578063372500ab1461024a5780633dd788a114610254578063563df32f1461025d57600080fd5b806309bb4f92146101ea578063199cbc541461020557806321dbe8761461020e575b600080fd5b6101f26104ad565b6040519081526020015b60405180910390f35b6101f2600b5481565b61022973a7d7079b0fead91f3e65f86e8915cb59c1a4c66481565b6040516001600160a01b0390911681526020016101fc565b6101f2600a5481565b61025261054d565b005b6101f2600c5481565b600354610229906001600160a01b031681565b61025261027e36600461188f565b610558565b6101f260065481565b6101f260095481565b6101f26102a33660046117a9565b6108ee565b600154610229906001600160a01b031681565b6102526109b7565b6102526102d13660046117a9565b6109eb565b6000546001600160a01b0316610229565b6101f2620f424081565b6101f260085481565b6102526103083660046119b3565b610a37565b61025261031b3660046117ea565b610a78565b6101f261032e366004611863565b610b14565b610252610341366004611863565b610be7565b6101f2610e7a565b61025261035c3660046117a9565b610f84565b6101f261036f3660046117a9565b610fd0565b6101f260075481565b6101f2600d5481565b6103c36103943660046117a9565b600560205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a0016101fc565b6102526103f93660046117a9565b6114cb565b61044f61040c3660046117a9565b600460205260009081526040902080546001820154600283015460039093015460ff9283169391926001600160a01b0380841693600160a01b9004909116911685565b60408051951515865260208601949094526001600160a01b03928316938501939093521515606084015216608082015260a0016101fc565b6102526104953660046117a9565b611517565b600254610229906001600160a01b031681565b600254600154604051633ddac95360e01b81526001600160a01b039182166004820152670de0b6b3a764000060248201526000929190911690633ddac9539060440160206040518083038186803b15801561050757600080fd5b505afa15801561051b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053f9190611971565b6001600160901b0316905090565b610556336115b2565b565b6000546001600160a01b0316331461058b5760405162461bcd60e51b815260040161058290611a3b565b60405180910390fd5b670de0b6b3a764000061059c6104ad565b106105f45760405162461bcd60e51b815260206004820152602260248201527f52656261746554726561737572793a20756e61626c6520746f20627579206261604482015261636b60f01b6064820152608401610582565b6003546040805163900cf0cf60e01b815290516000926001600160a01b03169163900cf0cf916004808301926020929190829003018186803b15801561063957600080fd5b505afa15801561064d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610671919061199a565b905080600c5414156106d15760405162461bcd60e51b815260206004820152602360248201527f52656261746554726561737572793a20616c726561647920626f75676874206260448201526261636b60e81b6064820152608401610582565b600c81905560005b828110156108e857600460008585848181106106f7576106f7611b11565b905060200201602081019061070c91906117a9565b6001600160a01b0316815260208101919091526040016000205460ff166107755760405162461bcd60e51b815260206004820152601d60248201527f52656261746554726561737572793a20696e76616c696420746f6b656e0000006044820152606401610582565b600084848381811061078957610789611b11565b905060200201602081019061079e91906117a9565b9050806001600160a01b031663a9059cbb6107c16000546001600160a01b031690565b600d546040516370a0823160e01b8152306004820152620f424091906001600160a01b038716906370a082319060240160206040518083038186803b15801561080957600080fd5b505afa15801561081d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610841919061199a565b61084b9190611aaa565b6108559190611a88565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561089b57600080fd5b505af11580156108af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d39190611904565b505080806108e090611ae0565b9150506106d9565b50505050565b6001600160a01b0381166000908152600560209081526040808320815160a081018352815481526001820154938101939093526002810154918301919091526003810154606083015260040154608082018190524211158061095857508060400151816080015110155b156109665750600092915050565b600081608001518260400151421161097e5742610984565b82604001515b61098e9190611ac9565b905081602001518183600001516109a59190611aaa565b6109af9190611a88565b949350505050565b6000546001600160a01b031633146109e15760405162461bcd60e51b815260040161058290611a3b565b610556600061173d565b6000546001600160a01b03163314610a155760405162461bcd60e51b815260040161058290611a3b565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610a615760405162461bcd60e51b815260040161058290611a3b565b600694909455600792909255600855600955600a55565b6000546001600160a01b03163314610aa25760405162461bcd60e51b815260040161058290611a3b565b6001600160a01b039586166000908152600460205260409020805460ff191695151595909517855560018501939093556002840180549286166001600160a81b031990931692909217600160a01b91151591909102179055600390910180546001600160a01b03191691909216179055565b6001600160a01b038216600090815260046020526040812054839060ff16610b4e5760405162461bcd60e51b8152600401610582906119ee565b6000610b586104ad565b90506000610b6586610fd0565b90506000610b71610e7a565b905082610b81620f424080611aaa565b6001600160a01b038916600090815260046020526040902060010154610baa620f424085611a70565b610bb4868b611aaa565b610bbe9190611aaa565b610bc89190611aaa565b610bd29190611a88565b610bdc9190611a88565b979650505050505050565b6001600160a01b038216600090815260046020526040902054829060ff16610c215760405162461bcd60e51b8152600401610582906119ee565b60008211610c7d5760405162461bcd60e51b815260206004820152602360248201527f52656261746554726561737572793a20696e76616c696420626f6e6420616d6f6044820152621d5b9d60ea1b6064820152608401610582565b6000610c898484610b14565b600b546001546040516370a0823160e01b815230600482015292935090916001600160a01b03909116906370a082319060240160206040518083038186803b158015610cd457600080fd5b505afa158015610ce8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0c919061199a565b610d169190611ac9565b811115610d775760405162461bcd60e51b815260206004820152602960248201527f52656261746554726561737572793a20696e73756666696369656e7420746f6d604482015268622062616c616e636560b81b6064820152608401610582565b6040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038516906323b872dd90606401602060405180830381600087803b158015610dc557600080fd5b505af1158015610dd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfd9190611904565b50610e07336115b2565b336000908152600560205260409020600381015481548391610e2891611ac9565b610e329190611a70565b8155600a5460018201819055610e489042611a70565b6002820155600060038201819055426004830155600b8054849290610e6e908490611a70565b90915550505050505050565b600080610e856104ad565b9050670de0b6b3a7640000811015610e9f57600091505090565b6000620f4240670de0b6b3a7640000610eb88285611aaa565b610ec29190611a88565b610ecc9190611ac9565b9050600654811015610ee15760009250505090565b6008548111610f1a57620f424060075460065483610eff9190611ac9565b610f099190611aaa565b610f139190611a88565b9250505090565b6000620f4240600754600654600854610f339190611ac9565b610f3d9190611aaa565b610f479190611a88565b9050620f424060095460085484610f5e9190611ac9565b610f689190611aaa565b610f729190611a88565b610f7c9082611a70565b935050505090565b6000546001600160a01b03163314610fae5760405162461bcd60e51b815260040161058290611a3b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038116600090815260046020526040812054829060ff1661100a5760405162461bcd60e51b8152600401610582906119ee565b6001600160a01b03808416600090815260046020908152604091829020825160a081018452815460ff908116151582526001830154938201939093526002820154808616948201859052600160a01b900490921615156060830181905260039091015490931660808201529161111357604051633ddac95360e01b81526001600160a01b038681166004830152670de0b6b3a76400006024830152821690633ddac9539060440160206040518083038186803b1580156110c957600080fd5b505afa1580156110dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111019190611971565b6001600160901b0316935050506114c5565b6000826080015190506000816001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561115757600080fd5b505afa15801561116b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118f919061199a565b90506000826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156111cc57600080fd5b505afa1580156111e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120491906117cd565b90506000836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561124157600080fd5b505afa158015611255573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127991906117cd565b9050600080856001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156112b757600080fd5b505afa1580156112cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ef9190611921565b506001600160701b0391821693501690506001600160a01b03831673a7d7079b0fead91f3e65f86e8915cb59c1a4c664141561140757604051633ddac95360e01b81526001600160a01b038581166004830152670de0b6b3a7640000602483015260009190891690633ddac9539060440160206040518083038186803b15801561137857600080fd5b505afa15801561138c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b09190611971565b6001600160901b03169050856113ce83670de0b6b3a7640000611aaa565b6113d89190611a88565b866113e38584611aaa565b6113ed9190611a88565b6113f79190611a70565b9a505050505050505050506114c5565b604051633ddac95360e01b81526001600160a01b038481166004830152670de0b6b3a7640000602483015260009190891690633ddac9539060440160206040518083038186803b15801561145a57600080fd5b505afa15801561146e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114929190611971565b6001600160901b03169050856114b084670de0b6b3a7640000611aaa565b6114ba9190611a88565b866113e38484611aaa565b50919050565b6000546001600160a01b031633146114f55760405162461bcd60e51b815260040161058290611a3b565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146115415760405162461bcd60e51b815260040161058290611a3b565b6001600160a01b0381166115a65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610582565b6115af8161173d565b50565b6001600160a01b0381166000908152600560205260409020805415806115dc575060038101548154145b156115e5575050565b80600401544211158061160057508060020154816004015410155b15611609575050565b60008160040154826002015442116116215742611627565b82600201545b6116319190611ac9565b90506000826001015482846000015461164a9190611aaa565b6116549190611a88565b9050806116615750505050565b808360030160008282546116759190611a70565b90915550506002830154421161168b5742611691565b82600201545b836004018190555080600b60008282546116ab9190611ac9565b909155505060015460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b1580156116fe57600080fd5b505af1158015611712573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117369190611904565b5050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160701b03811681146117a457600080fd5b919050565b6000602082840312156117bb57600080fd5b81356117c681611b27565b9392505050565b6000602082840312156117df57600080fd5b81516117c681611b27565b60008060008060008060c0878903121561180357600080fd5b863561180e81611b27565b9550602087013561181e81611b3c565b945060408701359350606087013561183581611b27565b9250608087013561184581611b3c565b915060a087013561185581611b27565b809150509295509295509295565b6000806040838503121561187657600080fd5b823561188181611b27565b946020939093013593505050565b600080602083850312156118a257600080fd5b823567ffffffffffffffff808211156118ba57600080fd5b818501915085601f8301126118ce57600080fd5b8135818111156118dd57600080fd5b8660208260051b85010111156118f257600080fd5b60209290920196919550909350505050565b60006020828403121561191657600080fd5b81516117c681611b3c565b60008060006060848603121561193657600080fd5b61193f8461178d565b925061194d6020850161178d565b9150604084015163ffffffff8116811461196657600080fd5b809150509250925092565b60006020828403121561198357600080fd5b81516001600160901b03811681146117c657600080fd5b6000602082840312156119ac57600080fd5b5051919050565b600080600080600060a086880312156119cb57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6020808252602d908201527f52656261746554726561737572793a20746f6b656e206973206e6f742061206260408201526c1bdb9918589b1948185cdcd95d609a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611a8357611a83611afb565b500190565b600082611aa557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611ac457611ac4611afb565b500290565b600082821015611adb57611adb611afb565b500390565b6000600019821415611af457611af4611afb565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03811681146115af57600080fd5b80151581146115af57600080fdfea2646970667358221220ff3b09d896d0739b0201e92024e10b1e294aee848a94ad7c08f9f0b7e356d3dc64736f6c63430008070033000000000000000000000000395908aeb53d33a9b8ac35e148e9805d34a555d3000000000000000000000000afe7090d0d6467f0ae65c3bd0a72f3f63573e6ee000000000000000000000000db8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000395908aeb53d33a9b8ac35e148e9805d34a555d3000000000000000000000000afe7090d0d6467f0ae65c3bd0a72f3f63573e6ee000000000000000000000000db8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd

-----Decoded View---------------
Arg [0] : tomb (address): 0x395908aeb53d33a9b8ac35e148e9805d34a555d3
Arg [1] : tombOracle (address): 0xafe7090d0d6467f0ae65c3bd0a72f3f63573e6ee
Arg [2] : treasury (address): 0xdb8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000395908aeb53d33a9b8ac35e148e9805d34a555d3
Arg [1] : 000000000000000000000000afe7090d0d6467f0ae65c3bd0a72f3f63573e6ee
Arg [2] : 000000000000000000000000db8618e899fd9fa4b8e6dbd1e00bca89e4daf9cd


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.