Contract
0x3e8b82326Ff5f2f10da8CEa117bD44343ccb9c26
7
Contract Overview
Balance:
0 ETH
EtherValue:
$0.00
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
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 Name:
SupplySchedule
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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); } }
// 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); }
// 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; }
// 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; } }
// 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; } }
// 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); }
// 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; }
// 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; }
// 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; }
// 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); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; import "../../contracts/interfaces/IERC20.sol"; abstract contract $IERC20 is IERC20 { constructor() {} }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; import "../../contracts/interfaces/IKwenta.sol"; abstract contract $IKwenta is IKwenta { constructor() {} }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; import "../../contracts/interfaces/IMultipleMerkleDistributor.sol"; abstract contract $IMultipleMerkleDistributor is IMultipleMerkleDistributor { constructor() {} }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; import "../../contracts/interfaces/IStakingRewards.sol"; abstract contract $IStakingRewards is IStakingRewards { constructor() {} }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; import "../../contracts/interfaces/ISupplySchedule.sol"; abstract contract $ISupplySchedule is ISupplySchedule { constructor() {} }
// 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); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; import "../../contracts/utils/Owned.sol"; contract $Owned is Owned { constructor(address _owner) Owned(_owner) {} }
{ "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
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
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
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.