Contract 0x3e8b82326Ff5f2f10da8CEa117bD44343ccb9c26 7

 
Txn Hash Method
Block
From
To
Value
0x805410d4a24433dff3ef2411f79d25238a4ad6ccda24a9deef26dbd2eed0197bMint1095631382023-09-14 20:57:3313 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0002590213958
0x6d95853ebb2ff3d1a39de9e408e57db069e29bc2f82c42fb22db7792eba6744cMint1095631362023-09-14 20:57:2913 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0012516693958
0xdaedcfe125734b07cb633999ab54165b7d930ee554590fa62b7eae4aac0ee02dMint1092607372023-09-07 20:57:3120 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000916565031.500000053
0xb5d196d476eae244487e6261c95c38ff83841cd11705c3d3a46bbd1ccdd0eabeMint1092607352023-09-07 20:57:2720 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000916565031.500000053
0x78eed07686049a8fc1ae985eeb37896a5ebb1995ee72542bb1a9972c1035e6bfMint1092607342023-09-07 20:57:2520 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000920548221.500000052
0x1356c54055a07b23ccb5bf815099a437e6359ac174c15407c15821dad13ccbc7Mint1089583372023-08-31 20:57:3127 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000407126580.100000069
0x5dc24cc8a0a96ff5fe380b05c0bc5febd96514b7bb9f9e3864f3ae5af6076346Mint1089583352023-08-31 20:57:2727 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.000041978590.10000006
0x7cba769e8ced437fbb43cc5eaf7c3513255dbbf40aebc41cfe3adc439ea0ac60Mint1086559372023-08-24 20:57:3134 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.000026422280.100001109
0x50a24314397ccd51da8b064e8b0a5082e353d28d909db5237fa65e511ddb8ae5Mint1086559362023-08-24 20:57:2934 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000387277170.100001112
0x05683de1bde5bda1043f11eed73070b46c51a2eec76dc04859b34bec545d3108Mint1086559352023-08-24 20:57:2734 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.000026422280.100001122
0x74ad6fb858b9a5a31339d32212e65d1a2c02a7f29df427a0ddf88f6ba87c1be2Mint1086559342023-08-24 20:57:2534 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.000026422280.100001132
0xd4e3f919fb7b3cdd030183dbbfd3a0c9d95079bdb284e092e5b7312934eb588dMint1083535372023-08-17 20:57:3141 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000686364470.100002415
0x7ce703bf5c1db87e041c4cbf1c8a1606f7a833eb67910db554189aededcadad9Mint1083535352023-08-17 20:57:2741 days 18 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000688964420.100002438
0x7b676fc8a15758e8c69c906a3e6677834112b021ab8591ca3079fb8d4b7903f9Mint1080545862023-08-10 22:52:2948 days 16 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000255215550.100000057
0xd7854dc22353ea68d7743f7b278b7e20dc5038eeb5d707a48c083793beb0908cMint1080545852023-08-10 22:52:2748 days 16 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000256595850.100000057
0x263ff2a1bbd7b9499c69fcc16ee4f6b3a6381a144ccbe42b24321535f108658aMint1080529122023-08-10 21:56:4148 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000348439220.100000054
0x96526464a1cacc78f874fa269d4282dd618826c4fbb9da679ca61507bf80905dMint1080529112023-08-10 21:56:3948 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000350385650.100000054
0x90d6b5e5fa1933815a1a0743a17f826c972aab1a41d362da72dac54a51da548cMint1080529092023-08-10 21:56:3548 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000350385650.100000054
0x107c43e9350e78dced347b964e7507c5b736ca8b47c3a3a1cd6ff43e229b685bMint1080529082023-08-10 21:56:3348 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000350385650.100000054
0x5bc6a834bb6857c5dd49b7d1aed9355059f2689c9e6c6d7dc45842427b1a2560Mint1080529072023-08-10 21:56:3148 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000350385650.100000054
0x60072c75dee0082f9fa76a6804ffaa49a56f3d78e9b001b268e91804726e8786Mint1080529062023-08-10 21:56:2948 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000349370110.100000054
0x26bcbbaeaab97e4930d238e1ada1cc9c32919a9830b07168c0cdff436408411cMint1080528152023-08-10 21:53:2748 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000343782910.100000056
0x499a96bfb41b52fb89a31fb5fd8adf83c530f0974f3ce4bfbeef305e1f6b7b1cMint1080519762023-08-10 21:25:2948 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000331679960.100000058
0x3f36084822c1ce4f4aa9340971d4d13b86ecc921ac259f8b059ae98173d4aecfMint1080519752023-08-10 21:25:2748 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000333524610.100000057
0x728cf324bf5713f6059a36b51d3d5ac4967581e5b88f1822cd2cabc8baa2b3eaMint1080519732023-08-10 21:25:2348 days 17 hrs ago0x32c90dcfc4bc427eebe04a008e30797c00521bb0 IN  0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH0.0000327642290.100000058
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xc2358c5533fa1bdede78f4806a4f84c64250ef8cfddfb7f6103e772d484122a21074463372023-07-27 20:57:3162 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0x835aabc45cfa91040885e3a3eb5ca1112895c00f21eb508f169c70d3fdab55cd1074463362023-07-27 20:57:2962 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 Kwenta: KWENTA Token0 ETH
0x835aabc45cfa91040885e3a3eb5ca1112895c00f21eb508f169c70d3fdab55cd1074463362023-07-27 20:57:2962 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 0x6e56a5d49f775ba08041e28030bc7826b13489e00 ETH
0x835aabc45cfa91040885e3a3eb5ca1112895c00f21eb508f169c70d3fdab55cd1074463362023-07-27 20:57:2962 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 Kwenta: KWENTA Token0 ETH
0x835aabc45cfa91040885e3a3eb5ca1112895c00f21eb508f169c70d3fdab55cd1074463362023-07-27 20:57:2962 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 Kwenta: KWENTA Token0 ETH
0x835aabc45cfa91040885e3a3eb5ca1112895c00f21eb508f169c70d3fdab55cd1074463362023-07-27 20:57:2962 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 Kwenta: KWENTA Token0 ETH
0x835aabc45cfa91040885e3a3eb5ca1112895c00f21eb508f169c70d3fdab55cd1074463362023-07-27 20:57:2962 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 0x7e2a9aecdb007e060ba8b98f7ed5706c9c02b4f20 ETH
0x835aabc45cfa91040885e3a3eb5ca1112895c00f21eb508f169c70d3fdab55cd1074463362023-07-27 20:57:2962 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 0x7e2a9aecdb007e060ba8b98f7ed5706c9c02b4f20 ETH
0x835aabc45cfa91040885e3a3eb5ca1112895c00f21eb508f169c70d3fdab55cd1074463362023-07-27 20:57:2962 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0xf9b978c0efe42f09a00f846cdc9cf2046d088a597288c5f47853c143395580cc1074463352023-07-27 20:57:2762 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0x2af9ad3af82064e6f55f755ff71c72a4c297ee0ba1d4a5db10df30d1398328301074463342023-07-27 20:57:2562 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0x6adfe4945853fe5ad0c4868d00706c8eb3ae37a36bbf22d66a00240fa80075a01074463332023-07-27 20:57:2362 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0xf568631e6a253bed69b35c32247a69089aabd490beecf5af1c5860898c269b131074463322023-07-27 20:57:2162 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0xc7174612f43c485cf626144588cc68fb20616c3ebc361edf91a76db5646f8ee51071439372023-07-20 20:57:3169 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0x99a3d70be25b0899532f0828a13b1670a8cbd578b01592f6e0593833fe66cb7e1071439362023-07-20 20:57:2969 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 Kwenta: KWENTA Token0 ETH
0x99a3d70be25b0899532f0828a13b1670a8cbd578b01592f6e0593833fe66cb7e1071439362023-07-20 20:57:2969 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 0x6e56a5d49f775ba08041e28030bc7826b13489e00 ETH
0x99a3d70be25b0899532f0828a13b1670a8cbd578b01592f6e0593833fe66cb7e1071439362023-07-20 20:57:2969 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 Kwenta: KWENTA Token0 ETH
0x99a3d70be25b0899532f0828a13b1670a8cbd578b01592f6e0593833fe66cb7e1071439362023-07-20 20:57:2969 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 Kwenta: KWENTA Token0 ETH
0x99a3d70be25b0899532f0828a13b1670a8cbd578b01592f6e0593833fe66cb7e1071439362023-07-20 20:57:2969 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 Kwenta: KWENTA Token0 ETH
0x99a3d70be25b0899532f0828a13b1670a8cbd578b01592f6e0593833fe66cb7e1071439362023-07-20 20:57:2969 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 0x7e2a9aecdb007e060ba8b98f7ed5706c9c02b4f20 ETH
0x99a3d70be25b0899532f0828a13b1670a8cbd578b01592f6e0593833fe66cb7e1071439362023-07-20 20:57:2969 days 18 hrs ago 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c26 0x7e2a9aecdb007e060ba8b98f7ed5706c9c02b4f20 ETH
0x99a3d70be25b0899532f0828a13b1670a8cbd578b01592f6e0593833fe66cb7e1071439362023-07-20 20:57:2969 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0x77a35db0f1d6d88468b9a94e2853b3097c701e90c58725e87491dcd94a26a93d1071439352023-07-20 20:57:2769 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0x9cb623d47343491d6f5dcba0a2b17b41f0ce340a63d3631dedc094cfeb87caf71071439342023-07-20 20:57:2569 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
0x086c19eb805cdac9299ad621ac8457677e67882f4b1c058feed278ea6ee2e6861071439332023-07-20 20:57:2369 days 18 hrs ago 0x9b0e3bf1117528421bd60f4a1ae54e3891b07bd9 0x3e8b82326ff5f2f10da8cea117bd44343ccb9c260 ETH
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
SupplySchedule

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 17 : SupplySchedule.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Inheritance
import "./utils/Owned.sol";
import "./interfaces/ISupplySchedule.sol";

// Libraries
import "./libraries/SafeDecimalMath.sol";
import "./libraries/Math.sol";

// Internal references
import "./interfaces/IERC20.sol";
import "./interfaces/IKwenta.sol";
import "./interfaces/IStakingRewards.sol";
import "./interfaces/IMultipleMerkleDistributor.sol";

// https://docs.synthetix.io/contracts/source/contracts/supplyschedule
contract SupplySchedule is Owned, ISupplySchedule {
    using SafeDecimalMath for uint;
    using Math for uint;

    IKwenta public kwenta;
    IStakingRewards public stakingRewards;
    IMultipleMerkleDistributor public tradingRewards;

    // Time of the last inflation supply mint event
    uint public lastMintEvent;

    // Counter for number of weeks since the start of supply inflation
    uint public weekCounter;

    // The number of KWENTA rewarded to the caller of Kwenta.mint()
    uint public minterReward = 1e18;

    uint public constant INITIAL_SUPPLY = 313373e18;

    // Initial Supply * 240% Initial Inflation Rate / 52 weeks.
    uint public constant INITIAL_WEEKLY_SUPPLY = INITIAL_SUPPLY * 240 / 100 / 52;

    // Max KWENTA rewards for minter
    uint public constant MAX_MINTER_REWARD = 20 * 1e18;

    // How long each inflation period is before mint can be called
    uint public constant MINT_PERIOD_DURATION = 1 weeks;

    uint public immutable inflationStartDate;
    uint public constant MINT_BUFFER = 1 days;
    uint8 public constant SUPPLY_DECAY_START = 2; // Supply decay starts on the 2nd week of rewards
    uint8 public constant SUPPLY_DECAY_END = 208; // Inclusive of SUPPLY_DECAY_END week.

    // Weekly percentage decay of inflationary supply
    uint public constant DECAY_RATE = 20500000000000000; // 2.05% weekly

    // Percentage growth of terminal supply per annum
    uint public constant TERMINAL_SUPPLY_RATE_ANNUAL = 10000000000000000; // 1.0% pa

    uint public treasuryDiversion = 2000; // 20% to treasury
    uint public tradingRewardsDiversion = 2000;

    // notice treasury address may change
    address public treasuryDAO;

    /* ========== EVENTS ========== */
    
    /**
     * @notice Emitted when the inflationary supply is minted
     **/
    event SupplyMinted(uint supplyMinted, uint numberOfWeeksIssued, uint lastMintEvent);

    /**
     * @notice Emitted when the KWENTA minter reward amount is updated
     **/
    event MinterRewardUpdated(uint newRewardAmount);

    /**
     * @notice Emitted when setKwenta is called changing the Kwenta Proxy address
     **/
    event KwentaUpdated(address newAddress);

    /**
     * @notice Emitted when treasury inflation share is changed
     **/
    event TreasuryDiversionUpdated(uint newPercentage);

    /**
     * @notice Emitted when trading rewards inflation share is changed
     **/
    event TradingRewardsDiversionUpdated(uint newPercentage);

    /**
     * @notice Emitted when StakingRewards is changed
     **/
    event StakingRewardsUpdated(address newAddress);

    /**
     * @notice Emitted when TradingRewards is changed
     **/
    event TradingRewardsUpdated(address newAddress);

    /**
     * @notice Emitted when treasuryDAO address is changed
     **/
    event TreasuryDAOSet(address treasuryDAO);

    constructor(
        address _owner,
        address _treasuryDAO
    ) Owned(_owner) {
        treasuryDAO = _treasuryDAO;

        inflationStartDate = block.timestamp; // inflation starts as soon as the contract is deployed.
        lastMintEvent = block.timestamp;
        weekCounter = 0;
    }

    // ========== VIEWS ==========

    /**
     * @return The amount of KWENTA mintable for the inflationary supply
     */
    function mintableSupply() override public view returns (uint) {
        uint totalAmount;

        if (!isMintable()) {
            return totalAmount;
        }

        uint remainingWeeksToMint = weeksSinceLastIssuance();

        uint currentWeek = weekCounter;

        // Calculate total mintable supply from exponential decay function
        // The decay function stops after week 208
        while (remainingWeeksToMint > 0) {
            currentWeek++;

            if (currentWeek < SUPPLY_DECAY_START) {
                // If current week is before supply decay we add initial supply to mintableSupply
                totalAmount = totalAmount + INITIAL_WEEKLY_SUPPLY;
                remainingWeeksToMint--;
            } else if (currentWeek <= SUPPLY_DECAY_END) {
                // if current week before supply decay ends we add the new supply for the week
                // diff between current week and (supply decay start week - 1)
                uint decayCount = currentWeek - (SUPPLY_DECAY_START - 1);

                totalAmount = totalAmount + tokenDecaySupplyForWeek(decayCount);
                remainingWeeksToMint--;
            } else {
                // Terminal supply is calculated on the total supply of Kwenta including any new supply
                // We can compound the remaining week's supply at the fixed terminal rate
                uint totalSupply = IERC20(kwenta).totalSupply();
                uint currentTotalSupply = totalSupply + totalAmount;

                totalAmount = totalAmount + terminalInflationSupply(currentTotalSupply, remainingWeeksToMint);
                remainingWeeksToMint = 0;
            }
        }

        return totalAmount;
    }

    /**
     * @return A unit amount of decaying inflationary supply from the INITIAL_WEEKLY_SUPPLY
     * @dev New token supply reduces by the decay rate each week calculated as supply = INITIAL_WEEKLY_SUPPLY * ()
     */
    function tokenDecaySupplyForWeek(uint counter) public pure returns (uint) {
        // Apply exponential decay function to number of weeks since
        // start of inflation smoothing to calculate diminishing supply for the week.
        uint effectiveDecay = (SafeDecimalMath.unit() - DECAY_RATE).powDecimal(counter);
        uint supplyForWeek = INITIAL_WEEKLY_SUPPLY.multiplyDecimal(effectiveDecay);

        return supplyForWeek;
    }

    /**
     * @return A unit amount of terminal inflation supply
     * @dev Weekly compound rate based on number of weeks
     */
    function terminalInflationSupply(uint totalSupply, uint numOfWeeks) public pure returns (uint) {
        // rate = (1 + weekly rate) ^ num of weeks
        uint effectiveCompoundRate = (SafeDecimalMath.unit() + (TERMINAL_SUPPLY_RATE_ANNUAL / 52)).powDecimal(numOfWeeks);

        // return Supply * (effectiveRate - 1) for extra supply to issue based on number of weeks
        return totalSupply.multiplyDecimal(effectiveCompoundRate - SafeDecimalMath.unit());
    }

    /**
     * @dev Take timeDiff in seconds (Dividend) and MINT_PERIOD_DURATION as (Divisor)
     * @return Calculate the numberOfWeeks since last mint rounded down to 1 week
     */
    function weeksSinceLastIssuance() public view returns (uint) {
        // Get weeks since lastMintEvent
        // If lastMintEvent not set or 0, then start from inflation start date.
        uint timeDiff = block.timestamp - lastMintEvent;
        return timeDiff / MINT_PERIOD_DURATION;
    }

    /**
     * @return boolean whether the MINT_PERIOD_DURATION (7 days)
     * has passed since the lastMintEvent.
     * */
    function isMintable() override public view returns (bool) {
        return block.timestamp - lastMintEvent > MINT_PERIOD_DURATION;
    }

    // ========== MUTATIVE FUNCTIONS ==========

    /**
     * @notice Record the mint event from Kwenta by incrementing the inflation
     * week counter for the number of weeks minted (probabaly always 1)
     * and store the time of the event.
     * @param supplyMinted the amount of KWENTA the total supply was inflated by.
     * */
    function recordMintEvent(uint supplyMinted) internal returns (bool) {
        uint numberOfWeeksIssued = weeksSinceLastIssuance();

        // add number of weeks minted to weekCounter
        weekCounter = weekCounter + numberOfWeeksIssued;

        // Update mint event to latest week issued (start date + number of weeks issued * seconds in week)
        // 1 day time buffer is added so inflation is minted after feePeriod closes
        lastMintEvent = inflationStartDate + (weekCounter * MINT_PERIOD_DURATION) + MINT_BUFFER;

        emit SupplyMinted(supplyMinted, numberOfWeeksIssued, lastMintEvent);
        return true;
    }

    /**
     * @notice Mints new inflationary supply weekly
     * New KWENTA is distributed between the minter, treasury, and StakingRewards contract
     * */
    function mint() override external {
        require(address(stakingRewards) != address(0), "Staking rewards not set");
        require(address(tradingRewards) != address(0), "Trading rewards not set");

        uint supplyToMint = mintableSupply();
        require(supplyToMint > 0, "No supply is mintable");

        // record minting event before mutation to token supply
        recordMintEvent(supplyToMint);

        uint amountToDistribute = supplyToMint - minterReward;
        uint amountToTreasury = amountToDistribute * treasuryDiversion / 10000;
        uint amountToTradingRewards = amountToDistribute * tradingRewardsDiversion / 10000;
        uint amountToStakingRewards = amountToDistribute - amountToTreasury - amountToTradingRewards;

        kwenta.mint(treasuryDAO, amountToTreasury);
        kwenta.mint(address(tradingRewards), amountToTradingRewards);
        kwenta.mint(address(stakingRewards), amountToStakingRewards);
        stakingRewards.notifyRewardAmount(amountToStakingRewards);
        kwenta.mint(msg.sender, minterReward);
    }

    // ========== SETTERS ========== */

    /**
     * @notice Set the Kwenta should it ever change.
     * SupplySchedule requires Kwenta address as it has the authority
     * to record mint event.
     * */
    function setKwenta(IKwenta _kwenta) external onlyOwner {
        require(address(_kwenta) != address(0), "Address cannot be 0");
        kwenta = _kwenta;
        emit KwentaUpdated(address(kwenta));
    }

    /**
     * @notice Sets the reward amount of KWENTA for the caller of the public
     * function Kwenta.mint().
     * This incentivises anyone to mint the inflationary supply and the mintr
     * Reward will be deducted from the inflationary supply and sent to the caller.
     * @param amount the amount of KWENTA to reward the minter.
     * */
    function setMinterReward(uint amount) external onlyOwner {
        require(amount <= MAX_MINTER_REWARD, "SupplySchedule: Reward cannot exceed max minter reward");
        minterReward = amount;
        emit MinterRewardUpdated(minterReward);
    }

    function setTreasuryDiversion(uint _treasuryDiversion) override external onlyOwner {
        require(_treasuryDiversion + tradingRewardsDiversion < 10000, "SupplySchedule: Cannot be more than 100%");
        treasuryDiversion = _treasuryDiversion;
        emit TreasuryDiversionUpdated(_treasuryDiversion);
    }

    function setTradingRewardsDiversion(uint _tradingRewardsDiversion) override external onlyOwner {
        require(_tradingRewardsDiversion + treasuryDiversion < 10000, "SupplySchedule: Cannot be more than 100%");
        tradingRewardsDiversion = _tradingRewardsDiversion;
        emit TradingRewardsDiversionUpdated(_tradingRewardsDiversion);
    }

    function setStakingRewards(address _stakingRewards) override external onlyOwner {
        require(_stakingRewards != address(0), "SupplySchedule: Invalid Address");
        stakingRewards = IStakingRewards(_stakingRewards);
        emit StakingRewardsUpdated(_stakingRewards);
    }

    function setTradingRewards(address _tradingRewards) override external onlyOwner {
        require(_tradingRewards != address(0), "SupplySchedule: Invalid Address");
        tradingRewards = IMultipleMerkleDistributor(_tradingRewards);
        emit TradingRewardsUpdated(_tradingRewards);
    }

    /// @notice set treasuryDAO address
    /// @dev only owner may change address
    function setTreasuryDAO(address _treasuryDAO) external onlyOwner {
        require(_treasuryDAO != address(0), "SupplySchedule: Zero Address");
        treasuryDAO = _treasuryDAO;
        emit TreasuryDAOSet(treasuryDAO);
    }
}

File 2 of 17 : Owned.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// https://docs.synthetix.io/contracts/source/contracts/owned
contract Owned {
    address public owner;
    address public nominatedOwner;

    constructor(address _owner) {
        require(_owner != address(0), "Owner address cannot be 0");
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}

File 3 of 17 : ISupplySchedule.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.24;

interface ISupplySchedule {
    // Views
    function mintableSupply() external view returns (uint);

    function isMintable() external view returns (bool);

    // Mutative functions

    function mint() external;

    function setTreasuryDiversion(uint _treasuryDiversion) external;

    function setTradingRewardsDiversion(uint _tradingRewardsDiversion) external;
    
    function setStakingRewards(address _stakingRewards) external;

    function setTradingRewards(address _tradingRewards) external;
}

File 4 of 17 : SafeDecimalMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// https://docs.synthetix.io/contracts/source/libraries/safedecimalmath
library SafeDecimalMath {
    /* Number of decimal places in the representations. */
    uint8 public constant decimals = 18;
    uint8 public constant highPrecisionDecimals = 27;

    /* The number representing 1.0. */
    uint256 public constant UNIT = 10**uint256(decimals);

    /* The number representing 1.0 for higher fidelity numbers. */
    uint256 public constant PRECISE_UNIT = 10**uint256(highPrecisionDecimals);
    uint256 private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR =
        10**uint256(highPrecisionDecimals - decimals);

    /**
     * @return Provides an interface to UNIT.
     */
    function unit() external pure returns (uint256) {
        return UNIT;
    }

    /**
     * @return Provides an interface to PRECISE_UNIT.
     */
    function preciseUnit() external pure returns (uint256) {
        return PRECISE_UNIT;
    }

    /**
     * @return The result of multiplying x and y, interpreting the operands as fixed-point
     * decimals.
     *
     * @dev A unit factor is divided out after the product of x and y is evaluated,
     * so that product must be less than 2**256. As this is an integer division,
     * the internal division always rounds down. This helps save on gas. Rounding
     * is more expensive on gas.
     */
    function multiplyDecimal(uint256 x, uint256 y)
        internal
        pure
        returns (uint256)
    {
        /* Divide by UNIT to remove the extra factor introduced by the product. */
        return (x * y) / UNIT;
    }

    /**
     * @return The result of safely dividing x and y. The return value is a high
     * precision decimal.
     *
     * @dev y is divided after the product of x and the standard precision unit
     * is evaluated, so the product of x and UNIT must be less than 2**256. As
     * this is an integer division, the result is always rounded down.
     * This helps save on gas. Rounding is more expensive on gas.
     */
    function divideDecimal(uint256 x, uint256 y)
        internal
        pure
        returns (uint256)
    {
        /* Reintroduce the UNIT factor that will be divided out by y. */
        return (x * UNIT) / y;
    }

    /**
     * @dev Convert a standard decimal representation to a high precision one.
     */
    function decimalToPreciseDecimal(uint256 i)
        internal
        pure
        returns (uint256)
    {
        return i * UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR;
    }

    /**
     * @dev Convert a high precision decimal to a standard decimal representation.
     */
    function preciseDecimalToDecimal(uint256 i)
        internal
        pure
        returns (uint256)
    {
        uint256 quotientTimesTen = i /
            (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10);

        if (quotientTimesTen % 10 >= 5) {
            quotientTimesTen += 10;
        }

        return quotientTimesTen / 10;
    }

    // Computes `a - b`, setting the value to 0 if b > a.
    function floorsub(uint256 a, uint256 b) internal pure returns (uint256) {
        return b >= a ? 0 : a - b;
    }
}

File 5 of 17 : Math.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// Libraries
import "./SafeDecimalMath.sol";

// https://docs.synthetix.io/contracts/source/libraries/math
library Math {
    using SafeDecimalMath for uint;

    /**
     * @dev Uses "exponentiation by squaring" algorithm where cost is 0(logN)
     * vs 0(N) for naive repeated multiplication.
     * Calculates x^n with x as fixed-point and n as regular unsigned int.
     * Calculates to 18 digits of precision with SafeDecimalMath.unit()
     */
    function powDecimal(uint x, uint n) internal pure returns (uint) {
        // https://mpark.github.io/programming/2014/08/18/exponentiation-by-squaring/

        uint result = SafeDecimalMath.unit();
        while (n > 0) {
            if (n % 2 != 0) {
                result = result.multiplyDecimal(x);
            }
            x = x.multiplyDecimal(x);
            n /= 2;
        }
        return result;
    }
}

File 6 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0 <0.9.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);
}

File 7 of 17 : IKwenta.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IKwenta is IERC20 {

    function mint(address account, uint amount) external;

    function burn(uint amount) external;

    function setSupplySchedule(address _supplySchedule) external;

}

File 8 of 17 : IStakingRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IStakingRewards {
    /// VIEWS
    // token state
    function totalSupply() external view returns (uint256);
    // staking state
    function balanceOf(address account) external view returns (uint256);
    function escrowedBalanceOf(address account) external view returns (uint256);
    function nonEscrowedBalanceOf(address account) external view returns (uint256);
    // rewards
    function getRewardForDuration() external view returns (uint256);
    function rewardPerToken() external view returns (uint256);
    function lastTimeRewardApplicable() external view returns (uint256);
    function earned(address account) external view returns (uint256);

    /// MUTATIVE
    // Staking/Unstaking
    function stake(uint256 amount) external;
    function unstake(uint256 amount) external;
    function stakeEscrow(address account, uint256 amount) external;
    function unstakeEscrow(address account, uint256 amount) external;
    function exit() external;
    // claim rewards
    function getReward() external;
    // settings
    function notifyRewardAmount(uint256 reward) external;
    function setRewardsDuration(uint256 _rewardsDuration) external;
    // pausable
    function pauseStakingRewards() external;
    function unpauseStakingRewards() external;
    // misc.
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external;
}

File 9 of 17 : IMultipleMerkleDistributor.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.0;

// Allows anyone to claim a token if they exist in a merkle root.
interface IMultipleMerkleDistributor {
    /// @notice data structure for aggregating multiple claims
    struct Claims {
        uint256 index;
        address account;
        uint256 amount;
        bytes32[] merkleProof;
        uint256 epoch;
    }

    /// @notice event is triggered whenever a call to `claim` succeeds
    event Claimed(
        uint256 index,
        address account,
        uint256 amount,
        uint256 epoch
    );

    /// @notice event is triggered whenever a new merkle root is added
    event MerkleRootAdded(uint256 epoch);

    /// @return escrow for tokens claimed
    function rewardEscrow() external view returns (address);

    /// @return token to be distributed (KWENTA)
    function token() external view returns (address);

    // @return the merkle root of the merkle tree containing account balances available to claim
    function merkleRoots(uint256) external view returns (bytes32);

    /// @notice determine if indexed claim has been claimed
    /// @param index: used for claim managment
    /// @param epoch: distribution index number
    /// @return true if indexed claim has been claimed
    function isClaimed(uint256 index, uint256 epoch)
        external
        view
        returns (bool);

    /// @notice attempt to claim as `account` and escrow KWENTA for `account`
    /// @param index: used for merkle tree managment and verification
    /// @param account: address used for escrow entry
    /// @param amount: $KWENTA amount to be escrowed
    /// @param merkleProof: off-chain generated proof of merkle tree inclusion
    /// @param epoch: distribution index number
    function claim(
        uint256 index,
        address account,
        uint256 amount,
        bytes32[] calldata merkleProof,
        uint256 epoch
    ) external;

    /// @notice function that aggregates multiple claims
    /// @param claims: array of valid claims
    function claimMultiple(Claims[] calldata claims) external;
}

File 10 of 17 : SupplySchedule.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.6.0;

import "../contracts/SupplySchedule.sol";

contract $SupplySchedule is SupplySchedule {
    constructor(address _owner, address _treasuryDAO) SupplySchedule(_owner, _treasuryDAO) {}

    function $recordMintEvent(uint256 supplyMinted) external returns (bool) {
        return super.recordMintEvent(supplyMinted);
    }
}

File 11 of 17 : IERC20.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.6.0;

import "../../contracts/interfaces/IERC20.sol";

abstract contract $IERC20 is IERC20 {
    constructor() {}
}

File 12 of 17 : IKwenta.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.6.0;

import "../../contracts/interfaces/IKwenta.sol";

abstract contract $IKwenta is IKwenta {
    constructor() {}
}

File 13 of 17 : IMultipleMerkleDistributor.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.6.0;

import "../../contracts/interfaces/IMultipleMerkleDistributor.sol";

abstract contract $IMultipleMerkleDistributor is IMultipleMerkleDistributor {
    constructor() {}
}

File 14 of 17 : IStakingRewards.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.6.0;

import "../../contracts/interfaces/IStakingRewards.sol";

abstract contract $IStakingRewards is IStakingRewards {
    constructor() {}
}

File 15 of 17 : ISupplySchedule.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.6.0;

import "../../contracts/interfaces/ISupplySchedule.sol";

abstract contract $ISupplySchedule is ISupplySchedule {
    constructor() {}
}

File 16 of 17 : Math.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.6.0;

import "../../contracts/libraries/Math.sol";

contract $Math {
    constructor() {}

    function $powDecimal(uint256 x,uint256 n) external pure returns (uint256) {
        return Math.powDecimal(x,n);
    }
}

File 17 of 17 : Owned.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.6.0;

import "../../contracts/utils/Owned.sol";

contract $Owned is Owned {
    constructor(address _owner) Owned(_owner) {}
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {
    "contracts/libraries/SafeDecimalMath.sol": {
      "SafeDecimalMath": "0x7e2a9aecdb007e060ba8b98f7ed5706c9c02b4f2"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_treasuryDAO","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"KwentaUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newRewardAmount","type":"uint256"}],"name":"MinterRewardUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"StakingRewardsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"supplyMinted","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numberOfWeeksIssued","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastMintEvent","type":"uint256"}],"name":"SupplyMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPercentage","type":"uint256"}],"name":"TradingRewardsDiversionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"TradingRewardsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasuryDAO","type":"address"}],"name":"TreasuryDAOSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPercentage","type":"uint256"}],"name":"TreasuryDiversionUpdated","type":"event"},{"inputs":[],"name":"DECAY_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_WEEKLY_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINTER_REWARD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_BUFFER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_PERIOD_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPLY_DECAY_END","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUPPLY_DECAY_START","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TERMINAL_SUPPLY_RATE_ANNUAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"inflationStartDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kwenta","outputs":[{"internalType":"contract IKwenta","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastMintEvent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IKwenta","name":"_kwenta","type":"address"}],"name":"setKwenta","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinterReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingRewards","type":"address"}],"name":"setStakingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tradingRewards","type":"address"}],"name":"setTradingRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tradingRewardsDiversion","type":"uint256"}],"name":"setTradingRewardsDiversion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryDAO","type":"address"}],"name":"setTreasuryDAO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryDiversion","type":"uint256"}],"name":"setTreasuryDiversion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingRewards","outputs":[{"internalType":"contract IStakingRewards","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"numOfWeeks","type":"uint256"}],"name":"terminalInflationSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"counter","type":"uint256"}],"name":"tokenDecaySupplyForWeek","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"tradingRewards","outputs":[{"internalType":"contract IMultipleMerkleDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingRewardsDiversion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryDAO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryDiversion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weekCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weeksSinceLastIssuance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a0604052670de0b6b3a76400006007556107d06008556107d06009553480156200002957600080fd5b5060405162001920380380620019208339810160408190526200004c9162000152565b816001600160a01b038116620000a85760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f74206265203000000000000000604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a150600a80546001600160a01b0319166001600160a01b03929092169190911790555042608081905260055560006006556200018a565b80516001600160a01b03811681146200014d57600080fd5b919050565b600080604083850312156200016657600080fd5b620001718362000135565b9150620001816020840162000135565b90509250929050565b608051611773620001ad600039600081816102ef01526112e801526117736000f3fe608060405234801561001057600080fd5b506004361061025c5760003560e01c806379ba509711610145578063badef30a116100bd578063cc5c095c1161008c578063dbd3a6a711610071578063dbd3a6a7146104a0578063df5a9fc1146104a8578063f9fad053146104b257600080fd5b8063cc5c095c1461048f578063d3bd4bde1461049757600080fd5b8063badef30a1461046c578063bccdd03014610474578063be1ff71e1461047d578063be801f011461048657600080fd5b80639bdd7ac711610114578063a46eddcf116100f9578063a46eddcf14610433578063ad18e97e14610446578063b3b2bcc01461045957600080fd5b80639bdd7ac7146104175780639df92eb71461042057600080fd5b806379ba5097146103e15780637c060557146103e95780638da5cb5b146103f15780639034802b1461040457600080fd5b806346872a23116101d857806353a47bb7116101a7578063689fccc61161018c578063689fccc6146103a85780636fb83a57146103bb578063758b19d3146103ce57600080fd5b806353a47bb71461036a57806364b87a701461039557600080fd5b806346872a231461032257806346b45af71461032c5780634ae26521146103445780634e070f501461035757600080fd5b8063238fb77f1161022f578063255420641161021457806325542064146102dc57806326f75e05146102ea5780632ff2e9dc1461031157600080fd5b8063238fb77f146102af578063251330f1146102c257600080fd5b80631249c58b146102615780631627540c1461026b5780631de40e491461027e57806322af2bab1461029f575b600080fd5b6102696104c5565b005b6102696102793660046114d2565b61086b565b61028c6648d4a431e5400081565b6040519081526020015b60405180910390f35b61028c6801158e460913d0000081565b6102696102bd3660046114d2565b6108c8565b6102ca600281565b60405160ff9091168152602001610296565b61028c662386f26fc1000081565b61028c7f000000000000000000000000000000000000000000000000000000000000000081565b61028c69425bfbffaab01654000081565b61028c6201518081565b610334610974565b6040519015158152602001610296565b6102696103523660046114ef565b61098e565b61028c6103653660046114ef565b610a4a565b60015461037d906001600160a01b031681565b6040516001600160a01b039091168152602001610296565b60035461037d906001600160a01b031681565b6102696103b63660046114ef565b610b28565b6102696103c93660046114d2565b610bd4565b6102696103dc3660046114d2565b610c80565b610269610d2c565b6102ca60d081565b60005461037d906001600160a01b031681565b60025461037d906001600160a01b031681565b61028c60075481565b61026961042e3660046114ef565b610e1e565b6102696104413660046114d2565b610eca565b600a5461037d906001600160a01b031681565b61028c610467366004611521565b610f76565b61028c6110b1565b61028c60085481565b61028c60095481565b61028c60055481565b61028c6110e1565b61028c60065481565b61028c611289565b61028c62093a8081565b60045461037d906001600160a01b031681565b6003546001600160a01b03166105225760405162461bcd60e51b815260206004820152601760248201527f5374616b696e672072657761726473206e6f742073657400000000000000000060448201526064015b60405180910390fd5b6004546001600160a01b031661057a5760405162461bcd60e51b815260206004820152601760248201527f54726164696e672072657761726473206e6f74207365740000000000000000006044820152606401610519565b60006105846110e1565b9050600081116105d65760405162461bcd60e51b815260206004820152601560248201527f4e6f20737570706c79206973206d696e7461626c6500000000000000000000006044820152606401610519565b6105df816112af565b506000600754826105f09190611679565b9050600061271060085483610605919061165a565b61060f919061155b565b9050600061271060095484610624919061165a565b61062e919061155b565b905060008161063d8486611679565b6106479190611679565b600254600a546040516340c10f1960e01b81526001600160a01b0391821660048201526024810187905292935016906340c10f1990604401600060405180830381600087803b15801561069957600080fd5b505af11580156106ad573d6000803e3d6000fd5b5050600254600480546040516340c10f1960e01b81526001600160a01b03918216928101929092526024820187905290911692506340c10f199150604401600060405180830381600087803b15801561070557600080fd5b505af1158015610719573d6000803e3d6000fd5b50506002546003546040516340c10f1960e01b81526001600160a01b03918216600482015260248101869052911692506340c10f199150604401600060405180830381600087803b15801561076d57600080fd5b505af1158015610781573d6000803e3d6000fd5b50506003546040517f3c6b16ab000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b039091169250633c6b16ab9150602401600060405180830381600087803b1580156107e457600080fd5b505af11580156107f8573d6000803e3d6000fd5b50506002546007546040516340c10f1960e01b815233600482015260248101919091526001600160a01b0390911692506340c10f199150604401600060405180830381600087803b15801561084c57600080fd5b505af1158015610860573d6000803e3d6000fd5b505050505050505050565b610873611364565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce22906020015b60405180910390a150565b6108d0611364565b6001600160a01b0381166109265760405162461bcd60e51b815260206004820152601f60248201527f537570706c795363686564756c653a20496e76616c69642041646472657373006044820152606401610519565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f2600f737e588eec1a845714266bf64b2f65c9d3f624e452a2b64611c33108ab0906020016108bd565b600062093a80600554426109889190611679565b11905090565b610996611364565b6801158e460913d00000811115610a155760405162461bcd60e51b815260206004820152603660248201527f537570706c795363686564756c653a205265776172642063616e6e6f7420657860448201527f63656564206d6178206d696e74657220726577617264000000000000000000006064820152608401610519565b60078190556040518181527f036e0c635f8b7d9314bb6f2a577046108ef0f8b5e3869fbd29fd5a448ed99d30906020016108bd565b600080610ae5836648d4a431e54000737e2a9aecdb007e060ba8b98f7ed5706c9c02b4f263907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015610a9d57600080fd5b505af4158015610ab1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad59190611508565b610adf9190611679565b906113e6565b90506000610b208260346064610b0669425bfbffaab01654000060f061165a565b610b10919061155b565b610b1a919061155b565b906114b0565b949350505050565b610b30611364565b61271060085482610b419190611543565b10610b9f5760405162461bcd60e51b815260206004820152602860248201527f537570706c795363686564756c653a2043616e6e6f74206265206d6f7265207460448201526768616e203130302560c01b6064820152608401610519565b60098190556040518181527f3a6b6f816fda56a9f48af157a6f60d156254bc01c34e04fd31583013fb00a67f906020016108bd565b610bdc611364565b6001600160a01b038116610c325760405162461bcd60e51b815260206004820152601f60248201527f537570706c795363686564756c653a20496e76616c69642041646472657373006044820152606401610519565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f551390b523f91b5d9df0281cbb04db779545fbfa265f5fcde47668f4d4e16006906020016108bd565b610c88611364565b6001600160a01b038116610cde5760405162461bcd60e51b815260206004820152601360248201527f416464726573732063616e6e6f742062652030000000000000000000000000006044820152606401610519565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fc81d567f41a0910d7cd4117a2960e9fbdf9a232a48e6b6fc94033ac6c4db7aa4906020016108bd565b6001546001600160a01b03163314610dac5760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527f2063616e20616363657074206f776e65727368697000000000000000000000006064820152608401610519565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b610e26611364565b61271060095482610e379190611543565b10610e955760405162461bcd60e51b815260206004820152602860248201527f537570706c795363686564756c653a2043616e6e6f74206265206d6f7265207460448201526768616e203130302560c01b6064820152608401610519565b60088190556040518181527f57a9cd79e547e62257530ed181309acb795c4e6aab927735a3e2afe2ac4d9309906020016108bd565b610ed2611364565b6001600160a01b038116610f285760405162461bcd60e51b815260206004820152601c60248201527f537570706c795363686564756c653a205a65726f2041646472657373000000006044820152606401610519565b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527fd780e06c55efd6b3157e8c26704d2fd7bd2750bd9d0e71d2e5f675572dfad7a2906020016108bd565b60008061101583610f8f6034662386f26fc1000061155b565b737e2a9aecdb007e060ba8b98f7ed5706c9c02b4f263907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b158015610fd357600080fd5b505af4158015610fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100b9190611508565b610adf9190611543565b90506110a7737e2a9aecdb007e060ba8b98f7ed5706c9c02b4f263907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b15801561105e57600080fd5b505af4158015611072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110969190611508565b6110a09083611679565b85906114b0565b9150505b92915050565b603460646110ca69425bfbffaab01654000060f061165a565b6110d4919061155b565b6110de919061155b565b81565b6000806110ec610974565b6110f557919050565b60006110ff611289565b6006549091505b81156112815780611116816116ca565b915050600281101561116d576034606461113b69425bfbffaab01654000060f061165a565b611145919061155b565b61114f919061155b565b6111599084611543565b925081611165816116b3565b925050611106565b60d081116111ba57600061118360016002611690565b6111909060ff1683611679565b905061119b81610a4a565b6111a59085611543565b9350826111b1816116b3565b93505050611106565b600254604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b15801561121857600080fd5b505afa15801561122c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112509190611508565b9050600061125e8583611543565b905061126a8185610f76565b6112749086611543565b9450600093505050611106565b509092915050565b6000806005544261129a9190611679565b90506112a962093a808261155b565b91505090565b6000806112ba611289565b9050806006546112ca9190611543565b600681905562015180906112e29062093a809061165a565b61130c907f0000000000000000000000000000000000000000000000000000000000000000611543565b6113169190611543565b6005819055604080518581526020810184905280820192909252517feae287c62f1ff4911334dee03f631d5dded5284b1b03ea7bc1d6282916c7249f9181900360600190a150600192915050565b6000546001600160a01b031633146113e45760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201527f6f726d207468697320616374696f6e00000000000000000000000000000000006064820152608401610519565b565b600080737e2a9aecdb007e060ba8b98f7ed5706c9c02b4f263907af6c06040518163ffffffff1660e01b815260040160206040518083038186803b15801561142d57600080fd5b505af4158015611441573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114659190611508565b90505b82156114a9576114796002846116e5565b1561148b5761148881856114b0565b90505b61149584806114b0565b93506114a260028461155b565b9250611468565b9392505050565b60006114be6012600a6115b2565b6114c8838561165a565b6114a9919061155b565b6000602082840312156114e457600080fd5b81356114a981611725565b60006020828403121561150157600080fd5b5035919050565b60006020828403121561151a57600080fd5b5051919050565b6000806040838503121561153457600080fd5b50508035926020909101359150565b60008219821115611556576115566116f9565b500190565b60008261156a5761156a61170f565b500490565b600181815b808511156115aa578160001904821115611590576115906116f9565b8085161561159d57918102915b93841c9390800290611574565b509250929050565b60006114a983836000826115c8575060016110ab565b816115d5575060006110ab565b81600181146115eb57600281146115f557611611565b60019150506110ab565b60ff841115611606576116066116f9565b50506001821b6110ab565b5060208310610133831016604e8410600b8410161715611634575081810a6110ab565b61163e838361156f565b8060001904821115611652576116526116f9565b029392505050565b6000816000190483118215151615611674576116746116f9565b500290565b60008282101561168b5761168b6116f9565b500390565b600060ff821660ff8416808210156116aa576116aa6116f9565b90039392505050565b6000816116c2576116c26116f9565b506000190190565b60006000198214156116de576116de6116f9565b5060010190565b6000826116f4576116f461170f565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461173a57600080fd5b5056fea26469706673582212208efeb14274172d55c44f2b76ea3b2d6ce5836c90f6445369e117a24c874a67e864736f6c63430008070033000000000000000000000000e029c32d412972c5f3d107da6d6ecf8f1c1e788c00000000000000000000000082d2242257115351899894ef384f779b5ba8c695

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

000000000000000000000000e029c32d412972c5f3d107da6d6ecf8f1c1e788c00000000000000000000000082d2242257115351899894ef384f779b5ba8c695

-----Decoded View---------------
Arg [0] : _owner (address): 0xe029c32d412972C5F3D107DA6d6eCF8F1C1E788C
Arg [1] : _treasuryDAO (address): 0x82d2242257115351899894eF384f779b5ba8c695

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000e029c32d412972c5f3d107da6d6ecf8f1c1e788c
Arg [1] : 00000000000000000000000082d2242257115351899894ef384f779b5ba8c695


Block Transaction Difficulty Gas Used Reward
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.