ETH Price: $3,463.75 (+2.32%)
Gas: 4.74 Gwei

Token

DOLA IOU (DOLAIOU)
 

Overview

Max Total Supply

494,195.751392551903192835 DOLAIOU

Holders

37

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
18,970.086057080328383388 DOLAIOU

Value
$0.00
0x7afdd1ba1145e583fba788cc21da686e736a311c
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
DebtConverter

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : DebtConverter.sol
pragma solidity ^0.8.0;

import { IOracle } from "./interfaces/IOracle.sol";
import { ICToken } from "./interfaces/ICToken.sol";
import { ERC20 } from "./interfaces/ERC20.sol";
import { IERC20 } from "./interfaces/IERC20.sol";
import { IFeed } from "./interfaces/IFeed.sol";

contract DebtConverter is ERC20 {
    //Current amount of DOLA-denominated debt accrued by the DebtConverter contract.
    uint public outstandingDebt;

    //Cumulative amount of DOLA-denominated debt accrued by the DebtConverter contract over its lifetime.
    uint public cumDebt;

    //Cumulative amount of DOLA repaid to the DebtConverter contract over its lifetime.
    uint public cumDolaRepaid;

    //Exchange rate of DOLA IOUs to DOLA scaled by 1e18. Default is 1e18.
    //DOLA IOU amount * exchangeRateMantissa / 1e18 = DOLA amount received on redemption
    //Bad Debt $ amount * 1e18 / exchangeRateMantissa = DOLA IOUs received on conversion
    uint public exchangeRateMantissa = 1e18;

    //The amount that exchangeRateMantissa will increase every second. This is how “interest” is accrued.
    uint public exchangeRateIncreasePerSecond;

    //Timestamp of the last time `accrueInterest()` was called.
    uint public lastAccrueInterestTimestamp;

    //Current repayment epoch
    uint public repaymentEpoch;

    //anToken address => maximum price this contract will pay for 1 underlying of the anToken on a call to `convert()`
    //Make sure to use 18 decimals!
    //0 = no maximum price
    mapping(address => uint256) public maxConvertPrice;

    //user address => epoch => Conversion struct
    mapping(address => ConversionData[]) public conversions;
    
    //epoch => Repayment struct
    mapping(uint => RepaymentData) public repayments;

    //user address => bool. True if DOLA IOU transfers to this address are allowed, false by default.
    mapping(address => bool) public transferWhitelist;

    //Can perform repayments and set interest rates.
    address public owner;

    //Treasury address buying the debt.
    address public treasury;

    //Can set privileged roles and sweep tokens.
    address public governance;

    //Frontier master oracle.
    IOracle public immutable oracle;

    //DOLA contract
    address public constant DOLA = 0x865377367054516e17014CcdED1e7d814EDC9ce4;
    address public constant anEth = 0x697b4acAa24430F254224eB794d2a85ba1Fa1FB8;
    address public constant anYfi = 0xde2af899040536884e062D3a334F2dD36F34b4a4;
    address public constant anBtc = 0x17786f3813E6bA35343211bd8Fe18EC4de14F28b;

    //Errors
    error TransferToAddressNotWhitelisted();
    error OnlyOwner();
    error OnlyGovernance();
    error InsufficientDebtTokens(uint needed, uint actual);
    error InsufficientTreasuryFunds(uint needed, uint actual);
    error InvalidDebtToken();
    error DolaAmountLessThanMinOut(uint minOut, uint amount);
    error InsufficientDebtToBeRepaid(uint repayment, uint debt);
    error ConversionDoesNotExist();
    error ConversionEpochNotEqualToCurrentEpoch(uint conversionEpoch, uint currentEpoch);
    error ThatEpochIsInTheFuture();
    error ConversionHasNotBeenRedeemedBefore();

    //Events
    event NewOwner(address owner);
    event NewTreasury(address treasury);
    event NewGovernance(address governance);
    event NewTransferWhitelistAddress(address whitelistedAddr);
    event NewAnnualExchangeRateIncrease(uint increase);
    event NewMaxConvertPrice(address anToken, uint maxPrice);
    event Repayment(uint dolaAmount, uint epoch);
    event Redemption(address indexed user, uint dolaAmount);
    event Conversion(address indexed user, address indexed anToken, uint epoch, uint dolaAmount, uint underlyingAmount);

    struct RepaymentData {
        uint epoch;
        uint dolaAmount;
        uint pctDolaIOUsRedeemable;
    }

    struct ConversionData {
        uint lastEpochRedeemed;
        uint dolaIOUAmount;
        uint dolaIOUsRedeemed;
    }

    constructor(uint initialIncreasePerYear, address _owner, address _treasury, address _governance, address _oracle) ERC20("DOLA IOU", "DOLAIOU") {
        owner = _owner;
        treasury = _treasury;
        governance = _governance;
        oracle = IOracle(_oracle);
        lastAccrueInterestTimestamp = block.timestamp;
        exchangeRateIncreasePerSecond = initialIncreasePerYear / 365 days;
        emit NewAnnualExchangeRateIncrease(initialIncreasePerYear);
    }

    modifier onlyOwner() {
        if ( msg.sender != owner ) revert OnlyOwner();
        _;
    }

    modifier onlyGovernance() {
        if ( msg.sender != governance ) revert OnlyGovernance();
        _;
    }

    /*
     * @notice function for converting bad debt anTokens to DOLA IOU tokens.
     * @param anToken Address of the bad debt anToken to be converted
     * @param amount Amount of `token` to be converted. 0 = max
     * @param minOut Minimum DOLA amount worth of DOLA IOUs to be received. Will revert if actual amount is lower.
     */
    function convert(address anToken, uint amount, uint minOut) external {
        if (anToken != anYfi && anToken != anBtc && anToken != anEth) revert InvalidDebtToken();
        uint anTokenBal = IERC20(anToken).balanceOf(msg.sender);
        if (amount == 0) amount = anTokenBal;
        if (anTokenBal < amount) revert InsufficientDebtTokens(anTokenBal, amount);

        //Accrue interest so exchange rates are fresh
        accrueInterest();
        
        uint underlyingAmount = ICToken(anToken).balanceOfUnderlying(msg.sender) * amount / ICToken(anToken).balanceOf(msg.sender);
        uint underlyingPrice = oracle.getUnderlyingPrice(anToken);
        
        //Allows operator to set anBtc maxConvertPrice with 18 decimals like other tokens since we normalize it here.
        //This is necessary since underlyingAmount for btc is only 8 decimals, meaning we need 28 decimals in price to offset decimal division we do later
        //`oracle.getUnderlyingPrice()` already returns anBtc price normalized for underlying token decimals, so we use it by itself.
        uint maxConversionPrice = maxConvertPrice[anToken];
        if (anToken == anBtc) {
            maxConversionPrice *= 1e10;
        }
        
        //If underlying is currently worth more than maxConvertPrice[anToken], price becomes maxConvertPrice[anToken]
        if (maxConversionPrice != 0 && underlyingPrice > maxConversionPrice) {
            underlyingPrice = maxConversionPrice;
        }
        uint dolaValueOfDebt = (underlyingPrice * underlyingAmount) / (10 ** 18);
        uint dolaIOUsOwed = convertDolaToDolaIOUs(dolaValueOfDebt);

        if (dolaValueOfDebt < minOut) revert DolaAmountLessThanMinOut(minOut, dolaValueOfDebt);

        outstandingDebt += dolaValueOfDebt;
        cumDebt += dolaValueOfDebt;

        uint epoch = repaymentEpoch;
        ConversionData memory c;
        c.dolaIOUAmount = dolaIOUsOwed;
        c.lastEpochRedeemed = epoch;

        conversions[msg.sender].push(c);

        require(IERC20(anToken).transferFrom(msg.sender, treasury, amount), "failed to transfer anTokens");
        _mint(msg.sender, dolaIOUsOwed);

        emit Conversion(msg.sender, anToken, epoch, dolaValueOfDebt, underlyingAmount);
    }

    /*
     * @notice function for repaying DOLA to this contract. Only callable by owner.
     * @param amount Amount of DOLA to repay & transfer to this contract.
     */
    function repayment(uint amount) external onlyOwner {
        if(amount == 0) return;
        accrueInterest();
        uint _outstandingDebt = outstandingDebt;
        if (amount > _outstandingDebt) revert InsufficientDebtToBeRepaid(amount, _outstandingDebt);
        uint _epoch = repaymentEpoch;

        //Calculate redeemable DOLA ratio for this epoch
        uint pctDolaIOUsRedeemable = amount * 1e18 / _outstandingDebt;

        //Update debt state variables
        outstandingDebt -= amount;
        cumDolaRepaid += amount;

        //Store data from current epoch and update epoch state variables
        repayments[_epoch] = RepaymentData(_epoch, amount, pctDolaIOUsRedeemable);
        repaymentEpoch += 1;
        
        uint senderBalance = IERC20(DOLA).balanceOf(msg.sender);
        if(senderBalance >= amount){
            require(IERC20(DOLA).transferFrom(msg.sender, address(this), amount), "DOLA transfer failed");
        } else {
            revert InsufficientTreasuryFunds(amount, senderBalance);
        }

        emit Repayment(amount, _epoch);
    }

     /*
     * @notice Function for redeeming DOLA IOUs for DOLA. 
     * @param _conversion index of conversion to redeem for
     * @param _epoch repayment epoch to redeem DOLA from
     */
    function redeem(uint _conversion, uint _epoch) internal returns (uint) {
        uint redeemableDolaIOUs = getRedeemableDolaIOUsFor(msg.sender, _conversion, _epoch);
        conversions[msg.sender][_conversion].dolaIOUsRedeemed += redeemableDolaIOUs;
        return redeemableDolaIOUs;
    }

    /*
     * @notice Function wrapper for calling `redeem()`. Will redeem all redeemable epochs for given conversion unless an _endEpoch is provided
     * @param _conversion index of conversion to redeem for
     * @param _endEpoch the last repayment epoch that will be claimed in this call for the given conversion
     */
    function redeemConversion(uint _conversion, uint _endEpoch) public {
        if (_conversion > conversions[msg.sender].length) revert ConversionDoesNotExist();
        accrueInterest();
        ConversionData storage c = conversions[msg.sender][_conversion];
        uint lastEpochRedeemed = c.lastEpochRedeemed;

        uint totalDolaIOUsRedeemable;
        uint totalDolaRedeemable;

        if (_endEpoch > repaymentEpoch) revert ThatEpochIsInTheFuture();

        if (_endEpoch == 0) {
            _endEpoch = repaymentEpoch;
        }

        for (uint i = lastEpochRedeemed; i < _endEpoch;) {
            //Get redeemable DOLA IOUs for this epoch and add to running totals
            uint dolaIOUsRedeemable = redeem(_conversion, i);
            totalDolaIOUsRedeemable += dolaIOUsRedeemable;
            totalDolaRedeemable += convertDolaIOUsToDola(dolaIOUsRedeemable);

            //We keep the loop going
            unchecked { i++; }
        }

        c.lastEpochRedeemed = _endEpoch;

        //After loop breaks: burn DOLA IOUs, transfer DOLA & emit event.
        //This way we don't have to loop these naughty, costly calls
        if (totalDolaIOUsRedeemable > 0) {
            //Handles rounding errors. Will only allow max redemption equal to DOLA balance of this contract
            //User will be able to redeem using this conversion after another repayment to collect their dust
            uint dolaBal = IERC20(DOLA).balanceOf(address(this));
            if (totalDolaRedeemable > dolaBal) {
                //Subtract DOLA difference from dolaRedeemed on this conversion object
                //This way, the user will be able to claim their dust on the next repayment & call to `redeemConversion`
                c.dolaIOUsRedeemed -= convertDolaToDolaIOUs(totalDolaRedeemable - dolaBal);
                totalDolaRedeemable = dolaBal;
                totalDolaIOUsRedeemable = convertDolaToDolaIOUs(totalDolaRedeemable);
            }

            //If user does not have enough DOLA IOUs to fully redeem, will redeem remainder of IOUs
            if (totalDolaIOUsRedeemable > balanceOf(msg.sender)) {
                uint diff = totalDolaIOUsRedeemable - balanceOf(msg.sender);
                c.dolaIOUsRedeemed -= diff;
                totalDolaIOUsRedeemable = balanceOf(msg.sender);
                totalDolaRedeemable = convertDolaIOUsToDola(totalDolaIOUsRedeemable);
            }

            _burn(msg.sender, totalDolaIOUsRedeemable);
            require(IERC20(DOLA).transfer(msg.sender, totalDolaRedeemable), "DOLA transfer failed");
            
            emit Redemption(msg.sender, totalDolaRedeemable);
        }
    }

    /*
     * @notice Redeems all DOLA "dust" leftover from rounding errors.
     * @notice Only redeemable if conversion's lastEpochRedeemed is equal to current repaymentEpoch.
     * Simply call `redeemConversion()` to update your conversions' lastEpochRedeemed
     * @param _conversion index of conversion to redeem dust for
     */
    function redeemConversionDust(uint _conversion) public {
        ConversionData memory c = conversions[msg.sender][_conversion];
        if (c.lastEpochRedeemed != repaymentEpoch) revert ConversionEpochNotEqualToCurrentEpoch(c.lastEpochRedeemed, repaymentEpoch);
        if (c.dolaIOUsRedeemed == 0) revert ConversionHasNotBeenRedeemedBefore();
        accrueInterest();
        uint dolaIOUsLeftToRedeem = c.dolaIOUAmount - c.dolaIOUsRedeemed;
        uint dolaLeftToRedeem = convertDolaIOUsToDola(dolaIOUsLeftToRedeem);
        uint redeemableIOUsPct = dolaIOUsLeftToRedeem * 1e18 / c.dolaIOUsRedeemed;

        //1.2%
        uint dolaBal = IERC20(DOLA).balanceOf(address(this));
        if (redeemableIOUsPct <= .012e18 && dolaLeftToRedeem <= dolaBal) {
            conversions[msg.sender][_conversion].dolaIOUsRedeemed += dolaIOUsLeftToRedeem;

            _burn(msg.sender, dolaIOUsLeftToRedeem);
            require(IERC20(DOLA).transfer(msg.sender, dolaLeftToRedeem), "DOLA transfer failed");
            emit Redemption(msg.sender, dolaLeftToRedeem);
        }
    }

    function redeemAll(uint _conversion) external {
        redeemConversion(_conversion, 0);
        redeemConversionDust(_conversion);
    }

    /*
     * @notice function for accounting interest of DOLA IOU tokens. Called by convert(), repayment(), and redeem().
     * @dev only will apply rate increase once per block.
     */
    function accrueInterest() public {
        if(block.timestamp != lastAccrueInterestTimestamp && exchangeRateIncreasePerSecond > 0) {
            uint rateIncrease = (block.timestamp - lastAccrueInterestTimestamp) * exchangeRateIncreasePerSecond;
            exchangeRateMantissa += rateIncrease;
            uint newDebt = rateIncrease * totalSupply() / 1e18;
            cumDebt += newDebt;
            outstandingDebt  += newDebt;
            lastAccrueInterestTimestamp = block.timestamp;
        }
    }

    /*
     * @notice function for calculating redeemable DOLA IOUs of an account
     * @param _addr Address to view redeemable DOLA IOUs of
     * @param _conversion index of conversion to calculate redeemable DOLA IOUs for
     * @param _epoch repayment epoch to calculate redeemable DOLA IOUs of
     */
    function getRedeemableDolaIOUsFor(address _addr, uint _conversion, uint _epoch) public view returns (uint) {
        ConversionData memory c = conversions[_addr][_conversion];
        uint userRedeemedIOUs = c.dolaIOUsRedeemed;
        uint userConvertedIOUs = c.dolaIOUAmount;
        uint dolaIOUsRemaining = userConvertedIOUs - userRedeemedIOUs;

        uint totalDolaIOUsRedeemable = (repayments[_epoch].pctDolaIOUsRedeemable * userConvertedIOUs / 1e18);

        if (dolaIOUsRemaining >= totalDolaIOUsRedeemable) {
            return totalDolaIOUsRedeemable;
        } else {
            return dolaIOUsRemaining;
        }
    }

    /*
     * @notice function for calculating amount of DOLA equal to a given DOLA IOU amount.
     * @param dolaIOUs DOLA IOU amount to be converted to DOLA
     */
    function convertDolaIOUsToDola(uint dolaIOUs) public view returns (uint) {
        return dolaIOUs * exchangeRateMantissa / 1e18;
    }

    /*
     * @notice function for calculating amount of DOLA IOUs equal to a given DOLA amount.
     * @param dola DOLA amount to be converted to DOLA IOUs
     */
    function convertDolaToDolaIOUs(uint dola) public view returns (uint) {
        return dola * 1e18 / exchangeRateMantissa;
    }

    /*
     * @notice function for calculating amount of DOLA redeemable for an addresses' DOLA IOU balance
     * @param addr Address to return balance of
     */
    function balanceOfDola(address _addr) external view returns (uint) {
        return convertDolaIOUsToDola(balanceOf(_addr));
    }

    // Revert if `to` address is not whitelisted. Transfers between users are not enabled.
    function transfer(address to, uint amount) public override returns (bool) {
        if (!transferWhitelist[to]) revert TransferToAddressNotWhitelisted();

        return super.transfer(to, amount);
    }

    // Revert if `to` address is not whitelisted. Transfers between users are not enabled.
    function transferFrom(address from, address to, uint amount) public override returns (bool) {
        if (!transferWhitelist[to]) revert TransferToAddressNotWhitelisted();

        return super.transferFrom(from, to, amount);
    }

    /*
     * @notice function for transferring `amount` of `token` to the `treasury` address from this contract
     * @param token Address of the token to be transferred out of this contract
     * @param amount Amount of `token` to be transferred out of this contract, 0 = max
     */
    function sweepTokens(address token, uint amount) external onlyGovernance {
        if (amount == 0) { 
            require(IERC20(token).transfer(treasury, IERC20(token).balanceOf(address(this))), "Token transfer failed");
        } else {
            require(IERC20(token).transfer(treasury, amount), "Token transfer failed");
        }
    }

    /*
     * @notice function for setting rate at which `exchangeRateMantissa` increases every year
     * @param increasePerYear The amount `exchangeRateMantissa` will increase every year. 1e18 is the default exchange rate.
     */
    function setExchangeRateIncrease(uint increasePerYear) external onlyGovernance {
        accrueInterest();
        exchangeRateIncreasePerSecond = increasePerYear / 365 days;
        
        emit NewAnnualExchangeRateIncrease(increasePerYear);
    }

    /*
     * @notice function for setting maximum price this contract will pay for 1 underlying of the anToken
     * @param anToken address of the anToken to set maxConvertPrice[anToken]
     * @param maxPrice maximum price this contract will pay for 1 underlying of `anToken`
     */
    function setMaxConvertPrice(address anToken, uint maxPrice) external onlyGovernance {
        maxConvertPrice[anToken] = maxPrice;
        
        emit NewMaxConvertPrice(anToken, maxPrice);
    }

    /*
     * @notice function for setting owner address.
     * @param newOwner Address that will become the new owner of the contract.
     */
    function setOwner(address newOwner) external onlyGovernance {
        owner = newOwner;

        emit NewOwner(newOwner);
    }

    /*
     * @notice function for setting treasury address.
     * @param newTreasury Address that will be set as the new treasury of the contract.
     */
    function setTreasury(address newTreasury) external onlyGovernance {
        treasury = newTreasury;

        emit NewTreasury(newTreasury);
    }

    /*
     * @notice function for setting governance address.
     * @param newGovernance Address that will be set as the new treasury of the contract.
     */
    function setGovernance(address newGovernance) external onlyGovernance {
        governance = newGovernance;

        emit NewGovernance(newGovernance);
    }

    /*
     * @notice function for whitelisting IOU token transfers to certain addresses.
     * @param whitelistedAddress Address to be added to whitelist. IOU tokens will be able to be transferred to this address.
     */
    function whitelistTransferFor(address whitelistedAddress) external onlyGovernance {
        transferWhitelist[whitelistedAddress] = true;

        emit NewTransferWhitelistAddress(whitelistedAddress);
    }
}

File 2 of 8 : IOracle.sol
pragma solidity ^0.8.0;

struct FeedData {
    address addr;
    uint8 tokenDecimals;
}

interface IOracle {
    function setFeed(
        address cToken_,
        address feed_,
        uint8 tokenDecimals_
    ) external;

    function getUnderlyingPrice(address cToken_)
        external
        view
        returns (uint256);


}

File 3 of 8 : ICToken.sol
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.0;

/**
 * @title Compound's CToken Contract
 * @notice Abstract base for CTokens
 * @author Compound
 */
interface ICToken {
    function admin() external view returns (address);
    function adminHasRights() external view returns (bool);
    function fuseAdminHasRights() external view returns (bool);
    function symbol() external view returns (string memory);
    function comptroller() external view returns (address);
    function adminFeeMantissa() external view returns (uint256);
    function fuseFeeMantissa() external view returns (uint256);
    function reserveFactorMantissa() external view returns (uint256);
    function totalReserves() external view returns (uint);
    function totalAdminFees() external view returns (uint);
    function totalFuseFees() external view returns (uint);

    function isCToken() external view returns (bool);
    function isCEther() external view returns (bool);
    function decimals() external view returns (uint8);
    function underlying() external view returns (address);

    function balanceOf(address owner) external view returns (uint);
    function balanceOfUnderlying(address owner) external returns (uint);
    function borrowRatePerBlock() external view returns (uint);
    function supplyRatePerBlock() external view returns (uint);
    function totalBorrowsCurrent() external returns (uint);
    function borrowBalanceStored(address account) external view returns (uint);
    function exchangeRateStored() external view returns (uint);
    function getCash() external view returns (uint);

    function redeem(uint redeemTokens) external returns (uint);
    function redeemUnderlying(uint redeemAmount) external returns (uint);

    function mint() external payable;
    function mint(uint amount) external payable;
}

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

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./IERC20Metadata.sol";
import "./Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 5 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    function decimals() external view returns (uint8);
    /**
     * @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 6 of 8 : IFeed.sol
pragma solidity ^0.8.0;

interface IFeed {
    function decimals() external view returns (uint8);
    function latestAnswer() external view returns (uint);
}

File 7 of 8 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"initialIncreasePerYear","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_oracle","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ConversionDoesNotExist","type":"error"},{"inputs":[{"internalType":"uint256","name":"conversionEpoch","type":"uint256"},{"internalType":"uint256","name":"currentEpoch","type":"uint256"}],"name":"ConversionEpochNotEqualToCurrentEpoch","type":"error"},{"inputs":[],"name":"ConversionHasNotBeenRedeemedBefore","type":"error"},{"inputs":[{"internalType":"uint256","name":"minOut","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DolaAmountLessThanMinOut","type":"error"},{"inputs":[{"internalType":"uint256","name":"repayment","type":"uint256"},{"internalType":"uint256","name":"debt","type":"uint256"}],"name":"InsufficientDebtToBeRepaid","type":"error"},{"inputs":[{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"InsufficientDebtTokens","type":"error"},{"inputs":[{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"InsufficientTreasuryFunds","type":"error"},{"inputs":[],"name":"InvalidDebtToken","type":"error"},{"inputs":[],"name":"OnlyGovernance","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[],"name":"ThatEpochIsInTheFuture","type":"error"},{"inputs":[],"name":"TransferToAddressNotWhitelisted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"anToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dolaAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"underlyingAmount","type":"uint256"}],"name":"Conversion","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"increase","type":"uint256"}],"name":"NewAnnualExchangeRateIncrease","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"governance","type":"address"}],"name":"NewGovernance","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"anToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxPrice","type":"uint256"}],"name":"NewMaxConvertPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"whitelistedAddr","type":"address"}],"name":"NewTransferWhitelistAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"treasury","type":"address"}],"name":"NewTreasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"dolaAmount","type":"uint256"}],"name":"Redemption","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"dolaAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"Repayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOLA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accrueInterest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"anBtc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"anEth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"anYfi","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"balanceOfDola","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"conversions","outputs":[{"internalType":"uint256","name":"lastEpochRedeemed","type":"uint256"},{"internalType":"uint256","name":"dolaIOUAmount","type":"uint256"},{"internalType":"uint256","name":"dolaIOUsRedeemed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"anToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minOut","type":"uint256"}],"name":"convert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"dolaIOUs","type":"uint256"}],"name":"convertDolaIOUsToDola","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"dola","type":"uint256"}],"name":"convertDolaToDolaIOUs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cumDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cumDolaRepaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangeRateIncreasePerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRateMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"},{"internalType":"uint256","name":"_conversion","type":"uint256"},{"internalType":"uint256","name":"_epoch","type":"uint256"}],"name":"getRedeemableDolaIOUsFor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastAccrueInterestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxConvertPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"outstandingDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conversion","type":"uint256"}],"name":"redeemAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conversion","type":"uint256"},{"internalType":"uint256","name":"_endEpoch","type":"uint256"}],"name":"redeemConversion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conversion","type":"uint256"}],"name":"redeemConversionDust","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"repayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"repaymentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"repayments","outputs":[{"internalType":"uint256","name":"epoch","type":"uint256"},{"internalType":"uint256","name":"dolaAmount","type":"uint256"},{"internalType":"uint256","name":"pctDolaIOUsRedeemable","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"increasePerYear","type":"uint256"}],"name":"setExchangeRateIncrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newGovernance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"anToken","type":"address"},{"internalType":"uint256","name":"maxPrice","type":"uint256"}],"name":"setMaxConvertPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sweepTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"transferWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"whitelistedAddress","type":"address"}],"name":"whitelistTransferFor","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052670de0b6b3a76400006008553480156200001d57600080fd5b50604051620028fb380380620028fb833981016040819052620000409162000200565b6040805180820182526008815267444f4c4120494f5560c01b602080830191825283518085019094526007845266444f4c41494f5560c81b9084015281519192916200008f916003916200013d565b508051620000a59060049060208401906200013d565b5050601080546001600160a01b038088166001600160a01b0319928316179092556011805487841690831617905560128054868416921691909117905582166080525042600a55620000fc6301e133808662000267565b6009556040518581527f532b572ec7f2fb50ee995e74dde73c5fad725b87ef042f5c533a67c311f8b0559060200160405180910390a15050505050620002c6565b8280546200014b906200028a565b90600052602060002090601f0160209004810192826200016f5760008555620001ba565b82601f106200018a57805160ff1916838001178555620001ba565b82800160010185558215620001ba579182015b82811115620001ba5782518255916020019190600101906200019d565b50620001c8929150620001cc565b5090565b5b80821115620001c85760008155600101620001cd565b80516001600160a01b0381168114620001fb57600080fd5b919050565b600080600080600060a086880312156200021957600080fd5b855194506200022b60208701620001e3565b93506200023b60408701620001e3565b92506200024b60608701620001e3565b91506200025b60808701620001e3565b90509295509295909350565b6000826200028557634e487b7160e01b600052601260045260246000fd5b500490565b600181811c908216806200029f57607f821691505b602082108103620002c057634e487b7160e01b600052602260045260246000fd5b50919050565b608051612612620002e9600039600081816104b6015261122e01526126126000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c80637dc0d1d011610167578063a9059cbb116100ce578063dd62ed3e11610087578063dd62ed3e14610623578063dec6603614610636578063e318613e14610649578063e8dbf27114610652578063f0048bcf1461065b578063f0f442601461067657600080fd5b8063a9059cbb146105a9578063a9a2026d146105bc578063aa46db8c146105d7578063ab033ea9146105ea578063b2d37cb8146105fd578063b3cbec781461061057600080fd5b806392c592d01161012057806392c592d01461053357806395d89b411461054e578063a44ec1bc14610556578063a457c2d71461055f578063a6afed9514610572578063a85f37611461057a57600080fd5b80637dc0d1d0146104b15780637ffbe241146104d85780638bcb461e146104fb5780638c0369681461050e5780638da5cb5b146105175780638de76af61461052a57600080fd5b8063376ef9ac1161020b57806361d027b3116101c457806361d027b31461041c5780636310c7221461042f5780636737b31e1461044257806370a08231146104555780637136a7a61461047e5780637775085c1461049157600080fd5b8063376ef9ac146103b457806339509351146103c757806355120d01146103da57806356a5c553146103e35780635983947e146103f65780635aa6e6751461040957600080fd5b806318160ddd1161025d57806318160ddd1461033157806323b872dd1461033957806330dfd73c1461034c578063313ce5671461037f578063345486c21461038e578063345678d7146103a157600080fd5b806306f94a0d1461029a57806306fdde03146102b65780630740e2d8146102cb578063095ea7b3146102f957806313af40351461031c575b600080fd5b6102a360055481565b6040519081526020015b60405180910390f35b6102be610689565b6040516102ad919061230a565b6102de6102d936600461237b565b61071b565b604080519384526020840192909252908201526060016102ad565b61030c61030736600461237b565b61075d565b60405190151581526020016102ad565b61032f61032a3660046123a5565b610775565b005b6002546102a3565b61030c6103473660046123c0565b6107f5565b61036773de2af899040536884e062d3a334f2dd36f34b4a481565b6040516001600160a01b0390911681526020016102ad565b604051601281526020016102ad565b61032f61039c3660046123fc565b610843565b61032f6103af3660046123fc565b6108b7565b61032f6103c2366004612415565b610b82565b61030c6103d536600461237b565b610e75565b6102a360065481565b61032f6103f136600461237b565b610e97565b6102a3610404366004612437565b610f1a565b601254610367906001600160a01b031681565b601154610367906001600160a01b031681565b61032f61043d366004612437565b610fe1565b61032f6104503660046123fc565b611509565b6102a36104633660046123a5565b6001600160a01b031660009081526020819052604090205490565b61032f61048c3660046123fc565b6117a2565b6102a361049f3660046123a5565b600c6020526000908152604090205481565b6103677f000000000000000000000000000000000000000000000000000000000000000081565b61030c6104e63660046123a5565b600f6020526000908152604090205460ff1681565b6102a36105093660046123fc565b6117b6565b6102a3600a5481565b601054610367906001600160a01b031681565b6102a3600b5481565b61036773865377367054516e17014ccded1e7d814edc9ce481565b6102be6117de565b6102a360095481565b61030c61056d36600461237b565b6117ed565b61032f611873565b6102de6105883660046123fc565b600e6020526000908152604090208054600182015460029092015490919083565b61030c6105b736600461237b565b611926565b6103677317786f3813e6ba35343211bd8fe18ec4de14f28b81565b61032f6105e53660046123a5565b611969565b61032f6105f83660046123a5565b6119e8565b6102a361060b3660046123a5565b611a61565b6102a361061e3660046123fc565b611a7f565b6102a361063136600461246a565b611a98565b61032f61064436600461237b565b611ac3565b6102a360085481565b6102a360075481565b61036773697b4acaa24430f254224eb794d2a85ba1fa1fb881565b61032f6106843660046123a5565b611c77565b6060600380546106989061249d565b80601f01602080910402602001604051908101604052809291908181526020018280546106c49061249d565b80156107115780601f106106e657610100808354040283529160200191610711565b820191906000526020600020905b8154815290600101906020018083116106f457829003601f168201915b5050505050905090565b600d602052816000526040600020818154811061073757600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b60003361076b818585611cf0565b5060019392505050565b6012546001600160a01b031633146107a0576040516354348f0360e01b815260040160405180910390fd5b601080546001600160a01b0319166001600160a01b0383169081179091556040519081527f3edd90e7770f06fafde38004653b33870066c33bfc923ff6102acd601f85dfbc906020015b60405180910390a150565b6001600160a01b0382166000908152600f602052604081205460ff1661082e5760405163eaaf1d0d60e01b815260040160405180910390fd5b610839848484611e15565b90505b9392505050565b6012546001600160a01b0316331461086e576040516354348f0360e01b815260040160405180910390fd5b610876611873565b6108846301e13380826124ed565b6009556040518181527f532b572ec7f2fb50ee995e74dde73c5fad725b87ef042f5c533a67c311f8b055906020016107ea565b336000908152600d602052604081208054839081106108d8576108d861250f565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050600b5481600001511461094a578051600b5460405163309766e760e01b8152600481019290925260248201526044015b60405180910390fd5b806040015160000361096f576040516384d6352f60e01b815260040160405180910390fd5b610977611873565b60008160400151826020015161098d9190612525565b9050600061099a82611a7f565b90506000836040015183670de0b6b3a76400006109b7919061253c565b6109c191906124ed565b6040516370a0823160e01b815230600482015290915060009073865377367054516e17014ccded1e7d814edc9ce4906370a0823190602401602060405180830381865afa158015610a16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3a919061255b565b9050662aa1efb94e00008211158015610a535750808311155b15610b7a57336000908152600d60205260409020805485919088908110610a7c57610a7c61250f565b90600052602060002090600302016002016000828254610a9c9190612574565b90915550610aac90503385611e2e565b60405163a9059cbb60e01b81523360048201526024810184905273865377367054516e17014ccded1e7d814edc9ce49063a9059cbb906044016020604051808303816000875af1158015610b04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b28919061258c565b610b445760405162461bcd60e51b8152600401610941906125ae565b60405183815233907fe6c82503aaaa3db78b70f183901ae8668918f895b3982b2c851cf2ffe0c6c6399060200160405180910390a25b505050505050565b336000908152600d6020526040902054821115610bb25760405163124b414560e11b815260040160405180910390fd5b610bba611873565b336000908152600d60205260408120805484908110610bdb57610bdb61250f565b90600052602060002090600302019050600081600001549050600080600b54851115610c1a5760405163bdcd01d960e01b815260040160405180910390fd5b84600003610c2857600b5494505b825b85811015610c6a576000610c3e8883611f74565b9050610c4a8185612574565b9350610c5581611a7f565b610c5f9084612574565b925050600101610c2a565b508484558115610b7a576040516370a0823160e01b815230600482015260009073865377367054516e17014ccded1e7d814edc9ce4906370a0823190602401602060405180830381865afa158015610cc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cea919061255b565b905080821115610d2a57610d016105098284612525565b856002016000828254610d149190612525565b92505081905550809150610d27826117b6565b92505b33600090815260208190526040902054831115610d955733600090815260208190526040812054610d5b9085612525565b905080866002016000828254610d719190612525565b9091555050336000908152602081905260409020549350610d9184611a7f565b9250505b610d9f3384611e2e565b60405163a9059cbb60e01b81523360048201526024810183905273865377367054516e17014ccded1e7d814edc9ce49063a9059cbb906044016020604051808303816000875af1158015610df7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1b919061258c565b610e375760405162461bcd60e51b8152600401610941906125ae565b60405182815233907fe6c82503aaaa3db78b70f183901ae8668918f895b3982b2c851cf2ffe0c6c6399060200160405180910390a250505050505050565b60003361076b818585610e888383611a98565b610e929190612574565b611cf0565b6012546001600160a01b03163314610ec2576040516354348f0360e01b815260040160405180910390fd5b6001600160a01b0382166000818152600c6020908152604091829020849055815192835282018390527f0a6aa551bb8923b5bfe9b5f657c1b3b0b9f5bd31e6ffc6bdbc8f0c0f7ab26324910160405180910390a15050565b6001600160a01b0383166000908152600d60205260408120805482919085908110610f4757610f4761250f565b60009182526020808320604080516060810182526003909402909101805484526001810154928401839052600201549083018190529193509091610f8b8383612525565b6000878152600e602052604081206002015491925090670de0b6b3a764000090610fb690859061253c565b610fc091906124ed565b9050808210610fd557945061083c9350505050565b50935061083c92505050565b6001600160a01b03831673de2af899040536884e062d3a334f2dd36f34b4a41480159061102b57506001600160a01b0383167317786f3813e6ba35343211bd8fe18ec4de14f28b14155b801561105457506001600160a01b03831673697b4acaa24430f254224eb794d2a85ba1fa1fb814155b1561107257604051631bf8591b60e01b815260040160405180910390fd5b6040516370a0823160e01b81523360048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa1580156110b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110dd919061255b565b9050826000036110eb578092505b82811015611116576040516343469fe360e11b81526004810182905260248101849052604401610941565b61111e611873565b6040516370a0823160e01b81523360048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015611165573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611189919061255b565b604051633af9e66960e01b815233600482015285906001600160a01b03881690633af9e669906024016020604051808303816000875af11580156111d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f5919061255b565b6111ff919061253c565b61120991906124ed565b60405163fc57d4df60e01b81526001600160a01b0387811660048301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063fc57d4df90602401602060405180830381865afa158015611275573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611299919061255b565b6001600160a01b0387166000818152600c60205260409020549192507317786f3813e6ba35343211bd8fe18ec4de14f28a19016112e2576112df6402540be4008261253c565b90505b80158015906112f057508082115b156112f9578091505b6000670de0b6b3a764000061130e858561253c565b61131891906124ed565b90506000611325826117b6565b90508682101561135257604051633941da8760e21b81526004810188905260248101839052604401610941565b81600560008282546113649190612574565b92505081905550816006600082825461137d9190612574565b9091555050600b54604080516060810182526000818301818152602080840187815286855233808552600d8352868520805460018082018355918752939095208651600390940201928355905193820193909355905160029091015560115492516323b872dd60e01b815260048101919091526001600160a01b039283166024820152604481018c905290918c16906323b872dd906064016020604051808303816000875af1158015611434573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611458919061258c565b6114a45760405162461bcd60e51b815260206004820152601b60248201527f6661696c656420746f207472616e7366657220616e546f6b656e7300000000006044820152606401610941565b6114ae3384611fd5565b60408051838152602081018690529081018890526001600160a01b038c169033907fca8f2844955319e2604584606a3bb5822636ba390bf98cc78a8e7aa4b726b72f9060600160405180910390a35050505050505050505050565b6010546001600160a01b0316331461153457604051635fc483c560e01b815260040160405180910390fd5b801561179f57611542611873565b600554808211156115705760405163d3eb684d60e01b81526004810183905260248101829052604401610941565b600b5460008261158885670de0b6b3a764000061253c565b61159291906124ed565b905083600560008282546115a69190612525565b9250508190555083600760008282546115bf9190612574565b90915550506040805160608101825283815260208082018781528284018581526000878152600e90935293822092518355516001808401919091559251600290920191909155600b8054909190611617908490612574565b90915550506040516370a0823160e01b815233600482015260009073865377367054516e17014ccded1e7d814edc9ce4906370a0823190602401602060405180830381865afa15801561166e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611692919061255b565b905084811061173e576040516323b872dd60e01b81523360048201523060248201526044810186905273865377367054516e17014ccded1e7d814edc9ce4906323b872dd906064016020604051808303816000875af11580156116f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171d919061258c565b6117395760405162461bcd60e51b8152600401610941906125ae565b611761565b604051635e27369760e11b81526004810186905260248101829052604401610941565b60408051868152602081018590527f2c9d9cc70928793d02c32c3d61239600059608e1dc2f6ed832bef97ef8a59826910160405180910390a1505050505b50565b6117ad816000610b82565b61179f816108b7565b6008546000906117ce83670de0b6b3a764000061253c565b6117d891906124ed565b92915050565b6060600480546106989061249d565b600033816117fb8286611a98565b90508381101561185b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610941565b6118688286868403611cf0565b506001949350505050565b600a54421415801561188757506000600954115b15611924576000600954600a544261189f9190612525565b6118a9919061253c565b905080600860008282546118bd9190612574565b9091555060009050670de0b6b3a76400006118d760025490565b6118e1908461253c565b6118eb91906124ed565b905080600660008282546118ff9190612574565b9250508190555080600560008282546119189190612574565b909155505042600a5550505b565b6001600160a01b0382166000908152600f602052604081205460ff1661195f5760405163eaaf1d0d60e01b815260040160405180910390fd5b61083c83836120b4565b6012546001600160a01b03163314611994576040516354348f0360e01b815260040160405180910390fd5b6001600160a01b0381166000818152600f6020908152604091829020805460ff1916600117905590519182527f755b2eeb0bbcb2e5b13120195a111205be4f3ce0e308940e0b4906069203c2d891016107ea565b6012546001600160a01b03163314611a13576040516354348f0360e01b815260040160405180910390fd5b601280546001600160a01b0319166001600160a01b0383169081179091556040519081527f4f386975ea1c2f7cf1845b08bee00626fbb624ecad16254d63d9bb9ba86526de906020016107ea565b6001600160a01b0381166000908152602081905260408120546117d8905b6000670de0b6b3a7640000600854836117ce919061253c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6012546001600160a01b03163314611aee576040516354348f0360e01b815260040160405180910390fd5b80600003611c24576011546040516370a0823160e01b81523060048201526001600160a01b038481169263a9059cbb9291169083906370a0823190602401602060405180830381865afa158015611b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6d919061255b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611bb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bdc919061258c565b611c205760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610941565b5050565b60115460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529083169063a9059cbb906044016020604051808303816000875af1158015611bb8573d6000803e3d6000fd5b6012546001600160a01b03163314611ca2576040516354348f0360e01b815260040160405180910390fd5b601180546001600160a01b0319166001600160a01b0383169081179091556040519081527fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea086906020016107ea565b6001600160a01b038316611d525760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610941565b6001600160a01b038216611db35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610941565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600033611e238582856120c2565b61186885858561213c565b6001600160a01b038216611e8e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610941565b6001600160a01b03821660009081526020819052604090205481811015611f025760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610941565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611f31908490612525565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611e08565b600080611f82338585610f1a565b336000908152600d602052604090208054919250829186908110611fa857611fa861250f565b90600052602060002090600302016002016000828254611fc89190612574565b9091555090949350505050565b6001600160a01b03821661202b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610941565b806002600082825461203d9190612574565b90915550506001600160a01b0382166000908152602081905260408120805483929061206a908490612574565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60003361076b81858561213c565b60006120ce8484611a98565b9050600019811461213657818110156121295760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610941565b6121368484848403611cf0565b50505050565b6001600160a01b0383166121a05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610941565b6001600160a01b0382166122025760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610941565b6001600160a01b0383166000908152602081905260409020548181101561227a5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610941565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906122b1908490612574565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516122fd91815260200190565b60405180910390a3612136565b600060208083528351808285015260005b818110156123375785810183015185820160400152820161231b565b81811115612349576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461237657600080fd5b919050565b6000806040838503121561238e57600080fd5b6123978361235f565b946020939093013593505050565b6000602082840312156123b757600080fd5b61083c8261235f565b6000806000606084860312156123d557600080fd5b6123de8461235f565b92506123ec6020850161235f565b9150604084013590509250925092565b60006020828403121561240e57600080fd5b5035919050565b6000806040838503121561242857600080fd5b50508035926020909101359150565b60008060006060848603121561244c57600080fd5b6124558461235f565b95602085013595506040909401359392505050565b6000806040838503121561247d57600080fd5b6124868361235f565b91506124946020840161235f565b90509250929050565b600181811c908216806124b157607f821691505b6020821081036124d157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008261250a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600082821015612537576125376124d7565b500390565b6000816000190483118215151615612556576125566124d7565b500290565b60006020828403121561256d57600080fd5b5051919050565b60008219821115612587576125876124d7565b500190565b60006020828403121561259e57600080fd5b8151801515811461083c57600080fd5b6020808252601490820152731113d310481d1c985b9cd9995c8819985a5b195960621b60408201526060019056fea26469706673582212200995d62999055ad575d424c94c65c353b6c338c28267cde9b445e90733929f0364736f6c634300080d0033000000000000000000000000000000000000000000000000006a94d74f4300000000000000000000000000009d5df30f475cea915b1ed4c0cca59255c897b61b0000000000000000000000009d5df30f475cea915b1ed4c0cca59255c897b61b000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b000000000000000000000000e8929afd47064efd36a7fb51da3f8c5eb40c4cb4

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102955760003560e01c80637dc0d1d011610167578063a9059cbb116100ce578063dd62ed3e11610087578063dd62ed3e14610623578063dec6603614610636578063e318613e14610649578063e8dbf27114610652578063f0048bcf1461065b578063f0f442601461067657600080fd5b8063a9059cbb146105a9578063a9a2026d146105bc578063aa46db8c146105d7578063ab033ea9146105ea578063b2d37cb8146105fd578063b3cbec781461061057600080fd5b806392c592d01161012057806392c592d01461053357806395d89b411461054e578063a44ec1bc14610556578063a457c2d71461055f578063a6afed9514610572578063a85f37611461057a57600080fd5b80637dc0d1d0146104b15780637ffbe241146104d85780638bcb461e146104fb5780638c0369681461050e5780638da5cb5b146105175780638de76af61461052a57600080fd5b8063376ef9ac1161020b57806361d027b3116101c457806361d027b31461041c5780636310c7221461042f5780636737b31e1461044257806370a08231146104555780637136a7a61461047e5780637775085c1461049157600080fd5b8063376ef9ac146103b457806339509351146103c757806355120d01146103da57806356a5c553146103e35780635983947e146103f65780635aa6e6751461040957600080fd5b806318160ddd1161025d57806318160ddd1461033157806323b872dd1461033957806330dfd73c1461034c578063313ce5671461037f578063345486c21461038e578063345678d7146103a157600080fd5b806306f94a0d1461029a57806306fdde03146102b65780630740e2d8146102cb578063095ea7b3146102f957806313af40351461031c575b600080fd5b6102a360055481565b6040519081526020015b60405180910390f35b6102be610689565b6040516102ad919061230a565b6102de6102d936600461237b565b61071b565b604080519384526020840192909252908201526060016102ad565b61030c61030736600461237b565b61075d565b60405190151581526020016102ad565b61032f61032a3660046123a5565b610775565b005b6002546102a3565b61030c6103473660046123c0565b6107f5565b61036773de2af899040536884e062d3a334f2dd36f34b4a481565b6040516001600160a01b0390911681526020016102ad565b604051601281526020016102ad565b61032f61039c3660046123fc565b610843565b61032f6103af3660046123fc565b6108b7565b61032f6103c2366004612415565b610b82565b61030c6103d536600461237b565b610e75565b6102a360065481565b61032f6103f136600461237b565b610e97565b6102a3610404366004612437565b610f1a565b601254610367906001600160a01b031681565b601154610367906001600160a01b031681565b61032f61043d366004612437565b610fe1565b61032f6104503660046123fc565b611509565b6102a36104633660046123a5565b6001600160a01b031660009081526020819052604090205490565b61032f61048c3660046123fc565b6117a2565b6102a361049f3660046123a5565b600c6020526000908152604090205481565b6103677f000000000000000000000000e8929afd47064efd36a7fb51da3f8c5eb40c4cb481565b61030c6104e63660046123a5565b600f6020526000908152604090205460ff1681565b6102a36105093660046123fc565b6117b6565b6102a3600a5481565b601054610367906001600160a01b031681565b6102a3600b5481565b61036773865377367054516e17014ccded1e7d814edc9ce481565b6102be6117de565b6102a360095481565b61030c61056d36600461237b565b6117ed565b61032f611873565b6102de6105883660046123fc565b600e6020526000908152604090208054600182015460029092015490919083565b61030c6105b736600461237b565b611926565b6103677317786f3813e6ba35343211bd8fe18ec4de14f28b81565b61032f6105e53660046123a5565b611969565b61032f6105f83660046123a5565b6119e8565b6102a361060b3660046123a5565b611a61565b6102a361061e3660046123fc565b611a7f565b6102a361063136600461246a565b611a98565b61032f61064436600461237b565b611ac3565b6102a360085481565b6102a360075481565b61036773697b4acaa24430f254224eb794d2a85ba1fa1fb881565b61032f6106843660046123a5565b611c77565b6060600380546106989061249d565b80601f01602080910402602001604051908101604052809291908181526020018280546106c49061249d565b80156107115780601f106106e657610100808354040283529160200191610711565b820191906000526020600020905b8154815290600101906020018083116106f457829003601f168201915b5050505050905090565b600d602052816000526040600020818154811061073757600080fd5b600091825260209091206003909102018054600182015460029092015490935090915083565b60003361076b818585611cf0565b5060019392505050565b6012546001600160a01b031633146107a0576040516354348f0360e01b815260040160405180910390fd5b601080546001600160a01b0319166001600160a01b0383169081179091556040519081527f3edd90e7770f06fafde38004653b33870066c33bfc923ff6102acd601f85dfbc906020015b60405180910390a150565b6001600160a01b0382166000908152600f602052604081205460ff1661082e5760405163eaaf1d0d60e01b815260040160405180910390fd5b610839848484611e15565b90505b9392505050565b6012546001600160a01b0316331461086e576040516354348f0360e01b815260040160405180910390fd5b610876611873565b6108846301e13380826124ed565b6009556040518181527f532b572ec7f2fb50ee995e74dde73c5fad725b87ef042f5c533a67c311f8b055906020016107ea565b336000908152600d602052604081208054839081106108d8576108d861250f565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820154815250509050600b5481600001511461094a578051600b5460405163309766e760e01b8152600481019290925260248201526044015b60405180910390fd5b806040015160000361096f576040516384d6352f60e01b815260040160405180910390fd5b610977611873565b60008160400151826020015161098d9190612525565b9050600061099a82611a7f565b90506000836040015183670de0b6b3a76400006109b7919061253c565b6109c191906124ed565b6040516370a0823160e01b815230600482015290915060009073865377367054516e17014ccded1e7d814edc9ce4906370a0823190602401602060405180830381865afa158015610a16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3a919061255b565b9050662aa1efb94e00008211158015610a535750808311155b15610b7a57336000908152600d60205260409020805485919088908110610a7c57610a7c61250f565b90600052602060002090600302016002016000828254610a9c9190612574565b90915550610aac90503385611e2e565b60405163a9059cbb60e01b81523360048201526024810184905273865377367054516e17014ccded1e7d814edc9ce49063a9059cbb906044016020604051808303816000875af1158015610b04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b28919061258c565b610b445760405162461bcd60e51b8152600401610941906125ae565b60405183815233907fe6c82503aaaa3db78b70f183901ae8668918f895b3982b2c851cf2ffe0c6c6399060200160405180910390a25b505050505050565b336000908152600d6020526040902054821115610bb25760405163124b414560e11b815260040160405180910390fd5b610bba611873565b336000908152600d60205260408120805484908110610bdb57610bdb61250f565b90600052602060002090600302019050600081600001549050600080600b54851115610c1a5760405163bdcd01d960e01b815260040160405180910390fd5b84600003610c2857600b5494505b825b85811015610c6a576000610c3e8883611f74565b9050610c4a8185612574565b9350610c5581611a7f565b610c5f9084612574565b925050600101610c2a565b508484558115610b7a576040516370a0823160e01b815230600482015260009073865377367054516e17014ccded1e7d814edc9ce4906370a0823190602401602060405180830381865afa158015610cc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cea919061255b565b905080821115610d2a57610d016105098284612525565b856002016000828254610d149190612525565b92505081905550809150610d27826117b6565b92505b33600090815260208190526040902054831115610d955733600090815260208190526040812054610d5b9085612525565b905080866002016000828254610d719190612525565b9091555050336000908152602081905260409020549350610d9184611a7f565b9250505b610d9f3384611e2e565b60405163a9059cbb60e01b81523360048201526024810183905273865377367054516e17014ccded1e7d814edc9ce49063a9059cbb906044016020604051808303816000875af1158015610df7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1b919061258c565b610e375760405162461bcd60e51b8152600401610941906125ae565b60405182815233907fe6c82503aaaa3db78b70f183901ae8668918f895b3982b2c851cf2ffe0c6c6399060200160405180910390a250505050505050565b60003361076b818585610e888383611a98565b610e929190612574565b611cf0565b6012546001600160a01b03163314610ec2576040516354348f0360e01b815260040160405180910390fd5b6001600160a01b0382166000818152600c6020908152604091829020849055815192835282018390527f0a6aa551bb8923b5bfe9b5f657c1b3b0b9f5bd31e6ffc6bdbc8f0c0f7ab26324910160405180910390a15050565b6001600160a01b0383166000908152600d60205260408120805482919085908110610f4757610f4761250f565b60009182526020808320604080516060810182526003909402909101805484526001810154928401839052600201549083018190529193509091610f8b8383612525565b6000878152600e602052604081206002015491925090670de0b6b3a764000090610fb690859061253c565b610fc091906124ed565b9050808210610fd557945061083c9350505050565b50935061083c92505050565b6001600160a01b03831673de2af899040536884e062d3a334f2dd36f34b4a41480159061102b57506001600160a01b0383167317786f3813e6ba35343211bd8fe18ec4de14f28b14155b801561105457506001600160a01b03831673697b4acaa24430f254224eb794d2a85ba1fa1fb814155b1561107257604051631bf8591b60e01b815260040160405180910390fd5b6040516370a0823160e01b81523360048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa1580156110b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110dd919061255b565b9050826000036110eb578092505b82811015611116576040516343469fe360e11b81526004810182905260248101849052604401610941565b61111e611873565b6040516370a0823160e01b81523360048201526000906001600160a01b038616906370a0823190602401602060405180830381865afa158015611165573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611189919061255b565b604051633af9e66960e01b815233600482015285906001600160a01b03881690633af9e669906024016020604051808303816000875af11580156111d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f5919061255b565b6111ff919061253c565b61120991906124ed565b60405163fc57d4df60e01b81526001600160a01b0387811660048301529192506000917f000000000000000000000000e8929afd47064efd36a7fb51da3f8c5eb40c4cb4169063fc57d4df90602401602060405180830381865afa158015611275573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611299919061255b565b6001600160a01b0387166000818152600c60205260409020549192507317786f3813e6ba35343211bd8fe18ec4de14f28a19016112e2576112df6402540be4008261253c565b90505b80158015906112f057508082115b156112f9578091505b6000670de0b6b3a764000061130e858561253c565b61131891906124ed565b90506000611325826117b6565b90508682101561135257604051633941da8760e21b81526004810188905260248101839052604401610941565b81600560008282546113649190612574565b92505081905550816006600082825461137d9190612574565b9091555050600b54604080516060810182526000818301818152602080840187815286855233808552600d8352868520805460018082018355918752939095208651600390940201928355905193820193909355905160029091015560115492516323b872dd60e01b815260048101919091526001600160a01b039283166024820152604481018c905290918c16906323b872dd906064016020604051808303816000875af1158015611434573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611458919061258c565b6114a45760405162461bcd60e51b815260206004820152601b60248201527f6661696c656420746f207472616e7366657220616e546f6b656e7300000000006044820152606401610941565b6114ae3384611fd5565b60408051838152602081018690529081018890526001600160a01b038c169033907fca8f2844955319e2604584606a3bb5822636ba390bf98cc78a8e7aa4b726b72f9060600160405180910390a35050505050505050505050565b6010546001600160a01b0316331461153457604051635fc483c560e01b815260040160405180910390fd5b801561179f57611542611873565b600554808211156115705760405163d3eb684d60e01b81526004810183905260248101829052604401610941565b600b5460008261158885670de0b6b3a764000061253c565b61159291906124ed565b905083600560008282546115a69190612525565b9250508190555083600760008282546115bf9190612574565b90915550506040805160608101825283815260208082018781528284018581526000878152600e90935293822092518355516001808401919091559251600290920191909155600b8054909190611617908490612574565b90915550506040516370a0823160e01b815233600482015260009073865377367054516e17014ccded1e7d814edc9ce4906370a0823190602401602060405180830381865afa15801561166e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611692919061255b565b905084811061173e576040516323b872dd60e01b81523360048201523060248201526044810186905273865377367054516e17014ccded1e7d814edc9ce4906323b872dd906064016020604051808303816000875af11580156116f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171d919061258c565b6117395760405162461bcd60e51b8152600401610941906125ae565b611761565b604051635e27369760e11b81526004810186905260248101829052604401610941565b60408051868152602081018590527f2c9d9cc70928793d02c32c3d61239600059608e1dc2f6ed832bef97ef8a59826910160405180910390a1505050505b50565b6117ad816000610b82565b61179f816108b7565b6008546000906117ce83670de0b6b3a764000061253c565b6117d891906124ed565b92915050565b6060600480546106989061249d565b600033816117fb8286611a98565b90508381101561185b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610941565b6118688286868403611cf0565b506001949350505050565b600a54421415801561188757506000600954115b15611924576000600954600a544261189f9190612525565b6118a9919061253c565b905080600860008282546118bd9190612574565b9091555060009050670de0b6b3a76400006118d760025490565b6118e1908461253c565b6118eb91906124ed565b905080600660008282546118ff9190612574565b9250508190555080600560008282546119189190612574565b909155505042600a5550505b565b6001600160a01b0382166000908152600f602052604081205460ff1661195f5760405163eaaf1d0d60e01b815260040160405180910390fd5b61083c83836120b4565b6012546001600160a01b03163314611994576040516354348f0360e01b815260040160405180910390fd5b6001600160a01b0381166000818152600f6020908152604091829020805460ff1916600117905590519182527f755b2eeb0bbcb2e5b13120195a111205be4f3ce0e308940e0b4906069203c2d891016107ea565b6012546001600160a01b03163314611a13576040516354348f0360e01b815260040160405180910390fd5b601280546001600160a01b0319166001600160a01b0383169081179091556040519081527f4f386975ea1c2f7cf1845b08bee00626fbb624ecad16254d63d9bb9ba86526de906020016107ea565b6001600160a01b0381166000908152602081905260408120546117d8905b6000670de0b6b3a7640000600854836117ce919061253c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6012546001600160a01b03163314611aee576040516354348f0360e01b815260040160405180910390fd5b80600003611c24576011546040516370a0823160e01b81523060048201526001600160a01b038481169263a9059cbb9291169083906370a0823190602401602060405180830381865afa158015611b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b6d919061255b565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611bb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bdc919061258c565b611c205760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610941565b5050565b60115460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018390529083169063a9059cbb906044016020604051808303816000875af1158015611bb8573d6000803e3d6000fd5b6012546001600160a01b03163314611ca2576040516354348f0360e01b815260040160405180910390fd5b601180546001600160a01b0319166001600160a01b0383169081179091556040519081527fafa147634b29e2c7bd53ce194256b9f41cfb9ba3036f2b822fdd1d965beea086906020016107ea565b6001600160a01b038316611d525760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610941565b6001600160a01b038216611db35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610941565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b600033611e238582856120c2565b61186885858561213c565b6001600160a01b038216611e8e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610941565b6001600160a01b03821660009081526020819052604090205481811015611f025760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610941565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611f31908490612525565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611e08565b600080611f82338585610f1a565b336000908152600d602052604090208054919250829186908110611fa857611fa861250f565b90600052602060002090600302016002016000828254611fc89190612574565b9091555090949350505050565b6001600160a01b03821661202b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610941565b806002600082825461203d9190612574565b90915550506001600160a01b0382166000908152602081905260408120805483929061206a908490612574565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b60003361076b81858561213c565b60006120ce8484611a98565b9050600019811461213657818110156121295760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610941565b6121368484848403611cf0565b50505050565b6001600160a01b0383166121a05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610941565b6001600160a01b0382166122025760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610941565b6001600160a01b0383166000908152602081905260409020548181101561227a5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610941565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906122b1908490612574565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516122fd91815260200190565b60405180910390a3612136565b600060208083528351808285015260005b818110156123375785810183015185820160400152820161231b565b81811115612349576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461237657600080fd5b919050565b6000806040838503121561238e57600080fd5b6123978361235f565b946020939093013593505050565b6000602082840312156123b757600080fd5b61083c8261235f565b6000806000606084860312156123d557600080fd5b6123de8461235f565b92506123ec6020850161235f565b9150604084013590509250925092565b60006020828403121561240e57600080fd5b5035919050565b6000806040838503121561242857600080fd5b50508035926020909101359150565b60008060006060848603121561244c57600080fd5b6124558461235f565b95602085013595506040909401359392505050565b6000806040838503121561247d57600080fd5b6124868361235f565b91506124946020840161235f565b90509250929050565b600181811c908216806124b157607f821691505b6020821081036124d157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008261250a57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600082821015612537576125376124d7565b500390565b6000816000190483118215151615612556576125566124d7565b500290565b60006020828403121561256d57600080fd5b5051919050565b60008219821115612587576125876124d7565b500190565b60006020828403121561259e57600080fd5b8151801515811461083c57600080fd5b6020808252601490820152731113d310481d1c985b9cd9995c8819985a5b195960621b60408201526060019056fea26469706673582212200995d62999055ad575d424c94c65c353b6c338c28267cde9b445e90733929f0364736f6c634300080d0033

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

000000000000000000000000000000000000000000000000006a94d74f4300000000000000000000000000009d5df30f475cea915b1ed4c0cca59255c897b61b0000000000000000000000009d5df30f475cea915b1ed4c0cca59255c897b61b000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b000000000000000000000000e8929afd47064efd36a7fb51da3f8c5eb40c4cb4

-----Decoded View---------------
Arg [0] : initialIncreasePerYear (uint256): 30000000000000000
Arg [1] : _owner (address): 0x9D5Df30F475CEA915b1ed4C0CCa59255C897b61B
Arg [2] : _treasury (address): 0x9D5Df30F475CEA915b1ed4C0CCa59255C897b61B
Arg [3] : _governance (address): 0x926dF14a23BE491164dCF93f4c468A50ef659D5B
Arg [4] : _oracle (address): 0xE8929AFd47064EfD36A7fB51dA3F8C5eb40c4cb4

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000006a94d74f430000
Arg [1] : 0000000000000000000000009d5df30f475cea915b1ed4c0cca59255c897b61b
Arg [2] : 0000000000000000000000009d5df30f475cea915b1ed4c0cca59255c897b61b
Arg [3] : 000000000000000000000000926df14a23be491164dcf93f4c468a50ef659d5b
Arg [4] : 000000000000000000000000e8929afd47064efd36a7fb51da3f8c5eb40c4cb4


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.