ETH Price: $3,388.04 (+1.20%)
Gas: 4.44 Gwei

Token

Kiru (KIRU)
 

Overview

Max Total Supply

998,389,268,805.072890533836440561 KIRU

Holders

1,018

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
297,478,315.020678641850026232 KIRU

Value
$0.00
0xd1ae75cea234ee32bd04fb873997f90d82c6d2f7
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:
Kiru

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 100000000 runs

Other Settings:
paris EvmVersion
File 1 of 1 : Kiru.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.26; 

/*
  * Welcome to Kiru Land.
  *
  *//**
  * @title Kiru 👼🏻
  *
  * @author Kiru
  *
  * @notice Kiru is an efficient contract for the Kiru tokenized bonding curve.
  *         Unification of the asset and it's canonical market under a single
  *         contract allows for precise control over the market-making strategy,
  *         fully automated.
  *
  *            ::::                                       °      ::::
  *         :::        .           ------------             .        :::
  *        ::               °     |...       ° | - - - - ◓             ::
  *        :             o        |   ...  .   |                        :
  *        ::          .          |  °   ...   |                       ::
  *         :::         ◓ - - - - |   .     ...|                     :::
  *            ::::                ------------                  ::::
  *
  * @dev Jita market, the bonding-curve of the Kiru token, executes buys and
  *      sells with different dynamics to optimise for price volatility on buys
  *      and deep liquidity on sells.
  *      Driven by the skew factor α(t), Jita binds price appreciation to
  *      uniform volume.
  */
contract Kiru {

    //////////////////////////////////////////////////////////////
    /////////////////////////// State ////////////////////////////
    //////////////////////////////////////////////////////////////

    /*
     *                                                      -===:                                        
     *                                            :-*%%%#**#@@@@@@%#-.                                   
     *                                        .+#@@@@@@@@@@@%#%@@@@@@@%*:                                
     *                                       +%@@@@@@@@@@@%%@@%#%@@@@@@%%%#:                             
     *                                     +%@@@@@@@@@%%%@@@@@%###@@%##%%@@@#                            
     *                                   =#@@@%%%@@@@@@@@@@@@%####%###**%@@@@@*                          
     *                                  -%@@@%@@@@@@@@@@@@@%##*##*##****%@@@@@@@+                        
     *                                 -#@%%@@@%@@@@@@@@@%######**#**###%%@@@@@@@+                       
     *                                .#@%%@%##@@@@@@@@%#**#%%%#****##**#%@@@@@@@@=                      
     *                                +%%#%%#%@@@@@@@%%#***#@@@@%#*###**#%@@@@@@@@@-                     
     *                               .*#*##%@@@@@@@%##**#%%@@@@@@@%@@@%#*#%%@@@@%%@@-                    
     *                               .+***%@@@@@@@%#*+=.   :#@@@@@@+. .=+*#%@@@@@#%@@-                   
     *                     =#%#*:    *#*#%@@@@@@%#**+:  :*%%%@@@@@%.=*=-:+#%%%@@@%*#%=                   
     *                  =@@@@@@@@@%**####@@@@@%#*+*+    :=+@@@@@@@%  :%# -*#%%@@@%==#-                   
     *                -%@@@@@@@@@@@@##%##@@@@%#****.  .   -@@@@@@@@. .@@*=+#%%%@@%--=                    
     *              :%@@@@@@@@@@%@%#%%%##%@@@%*+*##-#*-..:*@@@@@@@@=:+@@%++*#%%@@%::.                    
     *             +@@@@@@@@@@%=:=#%%###*#%@%#*==*##%-.  .+@@@@@@%%:-#@%=+#*#%%@@-                       
     *            +@@@@@@@@@@@=  :*##**#***##***+=+*#*+==*@@@@%%%@@@@@#+=*###%%@*                        
     *           +@@@@@@@@@@@+   :*#*+*#*****##***+==*#%@@@@@#+*@@@%*+=+*%%##%%@#.                       
     *          =@@@@@@@@@@@#.   :**-.+#*****#**##+=---==+#%%%%%#*===++*#%####%@@@:                      
     *         =@@@@@@@@@@@@*     =*:  **=-+*+*+++*##++**+==+*+=-=+*#**###=+*##%@@%:                     
     *        -@@@@@@@@@@@@#       -.   -:      :*@@@@#++*%@@@%##+=++=*#%+ -*#+*@@@=                     
     *       :%@@@@@@@@@@@@#                    :+%@@@@%#++%@@*+##+-..+%*  -*#..*@@@:                    
     *      :%@@@@@@@@@@@@@#                     -+#%@@@@%*++#*+#%%+:.:*=  -#*+ :%@@:                    
     *     :%@@@@@@@@@@@@@@#                    .=##++#@@@@%*+=+%@@%+:     -*+  :%@#.                    
     *    .%@@%%@@@%@@@@@@@#                    =#%%%*++%@@@@%*+*%@@%=.    ::   :%#:                     
     *    .%@-.=@@@%@@@@@@@%:                  -*%%@@@%*+*%@@@@%+=%@@%=         :#+                      
     *    .+.   *@@##@@@%@@@*                 :+#%@@@@@@%*+*%@@@%++%@@%=        :+:                      
     *          .#@*:*@@%@@@*.                -*%@@@@@#*#%#*=+##*#++#%%#**+----                          
     *           .*+.=@@%+%@*.                -*%@@@@@*=*@@*=+---=*+%@@@%#%@@@@@#.                       
     *                =%*.-%%=            .-++=+#@@@@@%++%@%+=.   -#@@@@*%@@##@@@*.                      
     *                 .:  .**           -*%%#+=#@@@@@@#+#@@@*.   @@@@#*@@%*##+@@@%:                     
     *                                   =##=---+%@@@@@@*#@@@*.   @@@@#*@@%*##+@@@@-                     
     *                                   =**--**+#@@@@@%+*@@@*.   @@@@#*@@%*##+@@@@-                     
     *                                   =##+-*##*#@@@%*=*%%*:    @@@@**@@%*%%+@@@@-                     
     *                                   .====-*#%%%%#+=*##+:     .=****#@@%%%%@@%=                      
     *                                          :=+*+:.....        .=*###%@@@@@@@=                       
     *                                                               .+#*+*%%%%:                         
     *                                                                                                   
     *//**
     * @notice The Magical Token.
     */
    string public constant name = "Kiru";
    string public constant symbol = "KIRU";
    uint8 public constant decimals = 18;

    mapping(address => uint) private _balanceOf; // slot 0

    mapping(address => mapping(address => uint)) private _allowance; // slot 1

    uint cumulatedFees; // slot 2

    uint256 _totalSupply; // slot 3

    /**
      * @notice The initial skew factor α(0) scaled by 1e6
      */
    uint immutable ALPHA_INIT;
    /**
      * @notice The slash factor ϕ scaled by 1e6
      */
    uint immutable PHI_FACTOR;
    /**
      * @notice The initial reserve of KIRU R₁(0)
      */
    uint immutable R1_INIT;
    /**
      * @notice Buyback address
      */
    address public immutable TREASURY;

    /**
      * @notice constant storage slots
      */
    bytes32 immutable SELF_BALANCE_SLOT;
    bytes32 immutable TREASURY_BALANCE_SLOT;
    bytes32 immutable BURN_BALANCE_SLOT;

    /**
      * @notice event signatures
      */
    bytes32 constant TRANSFER_EVENT_SIG = keccak256("Transfer(address,address,uint256)");
    bytes32 constant APPROVAL_EVENT_SIG = keccak256("Approval(address,address,uint256)");
    bytes32 constant BUY_EVENT_SIG = keccak256("Buy(address,uint256,uint256,uint256,uint256)");
    bytes32 constant SELL_EVENT_SIG = keccak256("Sell(address,uint256,uint256,uint256,uint256)");


    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
    event Buy(address indexed chad, uint amountIn, uint amountOut, uint r0, uint r1);
    event Sell(address indexed jeet, uint amountIn, uint amountOut, uint r0, uint r1);

    //////////////////////////////////////////////////////////////
    //////////////////////// Constructor /////////////////////////
    //////////////////////////////////////////////////////////////

    /**
      * @notice t=0 state
      */
    constructor(
      uint _alpha,
      uint _phi, 
      uint _r1Init, 
      uint _supply,
      address _treasury
      ) payable {
        ALPHA_INIT = _alpha;
        PHI_FACTOR =  _phi;
        R1_INIT = _r1Init / 2;
        TREASURY = _treasury;
        _totalSupply = _supply;

        bytes32 _SELF_BALANCE_SLOT;
        bytes32 _TREASURY_BALANCE_SLOT;

        assembly {
            let ptr := mload(0x40)
            /*
             * Load balanceOf[address(this)] slot
             */
            mstore(ptr, address())
            mstore(add(ptr, 0x20), 0)
            _SELF_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * Load balanceOf[_treasury] slot
             */
            mstore(ptr, _treasury)
            _TREASURY_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * Set the initial balances
             */
            sstore(_SELF_BALANCE_SLOT, _r1Init)
            sstore(_TREASURY_BALANCE_SLOT, sub(_supply, _r1Init))
        }
        /*
         * set constants
         */
        SELF_BALANCE_SLOT = _SELF_BALANCE_SLOT;
        TREASURY_BALANCE_SLOT = _TREASURY_BALANCE_SLOT;
    }

    //////////////////////////////////////////////////////////////
    //////////////////////////// Buy /////////////////////////////
    //////////////////////////////////////////////////////////////


    /**
      * Nomenclature:
      *
      *      R₀ = ETH reserves
      *      R₁ = Kiru reserves
      *      x  = input amount
      *      y  = output amount
      *      K  = invariant R₀ * R₁
      *      α  = skew factor
      *      var(0) = value of var at t=0
      *      var(t) = value of var at time t
      *  
      *                               :::::::::::    
      *                           ::::     :     ::::
      *                        :::         :        :::
      *                       ::     R₀    :    R₁    ::
      *                       :............:...........:
      *      x - - - - - - -> ::       .   :          :: - - - - - - -> y
      *                        :::  °      :    °   :::
      *                           ::::     :  . :::::
      *                               :::::::::::                              
      *
      * @notice Deposit is the entry point for entering the Kiru bonding-curve
      *         upon receiving ETH, the kiru contract computes the amount out `y`
      *         using the [skew trading function](https://github.com/RedKiruMoney/Kiru).
      *         The result is an asymmetric bonding curve that can optimise for price
      *         appreciation, biased by the skew factor α(t).
      *
      *         The skew factor α(t) is a continuous function that dictates the
      *         evolution of the market's reserves asymmetry through time, decreasing
      *         as the ratio R₁(t) / R₁(0) decreases.
      *
      *             ^
      *             | :
      *             | ::
      *             | :::
      *             |  ::::
      *             |    :::::
      *             |        ::::::
      *             |              :::::::::
      *             |                       :::::::::::::
      *             ∘------------------------------------->
      *
      * @dev The skew factor α(t) is a continuous function of the markets reserves
      *      computed as α(t) = 1 − α(0) ⋅ (R₁(0) / R₁(t))
      *      The market simulates a lp burn of α(t) right before a buy.
      *      The skew factor α(t) represents the fraction of the current reserves that
      *      the LP is withdrawing.
      *      We have the trading function (x, R₀, R₁) -> y :
      *      
      *         αK = αR₀ * αR₁
      *         αR₁′ = αK / (αR₀ + x)
      *         y    = αR₁ - αR₁′
      *
      *      After computing the swapped amount `y` on cut reserves, the LP provides the
      *      maximum possible liquidity from the withdrawn amount at the new market rate:
      *
      *         spot = R₁ / R₀
      *         R₀′ = R₀ + x
      *         R₁′ = (R₀ * R₁) / R₀′
      *
      * @param out The minimum amount of KIRU to receive.
      *            This parameter introduces slippage bounds for the trade.
      */
    function deposit(uint out) external payable {
        uint _ALPHA_INIT = ALPHA_INIT;
        uint _R1_INIT = R1_INIT;
        bytes32 _SELF_BALANCE_SLOT = SELF_BALANCE_SLOT;
        bytes32 _BURN_BALANCE_SLOT = BURN_BALANCE_SLOT;
        bytes32 _TRANSFER_EVENT_SIG = TRANSFER_EVENT_SIG;
        bytes32 _BUY_EVENT_SIG = BUY_EVENT_SIG;
        assembly {
            let ptr := mload(0x40)
            let chad := caller()
            /*
             * Load balanceOf[msg.sender] slot
             */
            mstore(ptr, chad)
            mstore(add(ptr, 0x20), 0)
            let CALLER_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * x  = msg.value
             * R₀ = token₀ reserves
             * R₁ = token₁ reserves
             */
            let x := callvalue()
            let r0 := sub(sub(selfbalance(), sload(2)), callvalue())
            let r1 := sload(_SELF_BALANCE_SLOT)
            /*
             * Compute the skew factor α(t) if activated
             */
            let r1InitR1Ratio := mul(div(mul(r1, 1000000), _R1_INIT), gt(_R1_INIT, r1))
            let inverseAlpha := div(mul(_ALPHA_INIT, r1InitR1Ratio), 1000000)
            let alpha := sub(1000000, inverseAlpha)
            /*
             * α-reserves: reserves cut by the skew factor α(t)
             */
            let alphaR0 := div(mul(alpha, r0), 1000000)
            let alphaR1 := div(mul(alpha, r1), 1000000)
            /*
             * The new α-reserve 0, increased by x
             *
             * αR₀′ = αR₀ + x
             */
            let alphaR0Prime := add(alphaR0, x)
            /*
             * The new α-reserve 1, computed as the constant product of the α-reserves
             *
             * αR₁′ = (αR₀ * αR₁) / αR₀′
             */
            let alphaR1Prime := div(mul(alphaR0, alphaR1), alphaR0Prime)
            /*
             * The amount out y, computed as the difference between the initial α-reserve 1 and the new α-reserve 1
             *
             * y = αR₁ - αR₁′
             */
            let y := sub(alphaR1, alphaR1Prime)
            /*
             * The new actual reserve 0, increased by x
             *
             * R₀′ = R₀ + x
             */
            let r0Prime := add(r0, x)
            /*
             * The new actual reserve 1, computed as new reserve 0 * α-ratio
             * where α-ratio: αR₁′ / αR₀′
             *
             * R₁′ = (αR₁′ / αR₀′) * R₀′ + ϵ
             */
            let r1Prime := add(div(mul(div(mul(alphaR1Prime, 1000000), alphaR0Prime), r0Prime), 1000000), 1)
            /*
             * Delta between constant product of actual reserves and new reserve 1
             *
             * ΔR₁ = R₁ - R₁′ - y
             */
            let deltaToken1 := sub(sub(r1, r1Prime), y)
            /*
             * Ensures that the amount out is within slippage bounds
             */
            if gt(out, y) {revert(0, 0)}
            /*
             * Update the market reserves to (R₀′, R₁′) then update balances
             */
            sstore(_SELF_BALANCE_SLOT, r1Prime)
            let balanceOfCaller := sload(CALLER_BALANCE_SLOT)
            sstore(CALLER_BALANCE_SLOT, add(balanceOfCaller, y))
            let balanceOfBurn := sload(_BURN_BALANCE_SLOT)
            sstore(_BURN_BALANCE_SLOT, add(balanceOfBurn, deltaToken1))
            /*
             * decrease total supply
             */
            sstore(3, sub(sload(3), deltaToken1))
            /*
             * emit Transfer event
             */
            mstore(add(ptr, 0x20), y)
            log3(add(ptr, 0x20), 0x20, _TRANSFER_EVENT_SIG, address(), chad)
            /*
             * emit Buy event
             */
            mstore(ptr, x)
            mstore(add(ptr, 0x20), y)
            mstore(add(ptr, 0x40), r0Prime)
            mstore(add(ptr, 0x60), r1Prime)
            log2(ptr, 0x80, _BUY_EVENT_SIG, chad)
        }
    }

    //////////////////////////////////////////////////////////////
    /////////////////////////// Sell /////////////////////////////
    //////////////////////////////////////////////////////////////

    /**
      *
      *            _____
      *          .'/L|__`.
      *         / =[_]O|` \
      *        |   _  |   |
      *        ;  (_)  ;  |
      *         '.___.' \  \
      *          |     | \  `-.
      *         |    _|  `\    \
      *          _./' \._   `-._\
      *        .'/     `.`.   '_.-.   
      *
      * @notice Withdraws ETH from Jita's bonding curve
      *
      * @dev This contracts operate at low-level and does not require sending funds 
      *      before withdrawing, it instead requires the caller to have enough
      *      balance, then balance slots gets updated accordingly.
      *
      * @param value The amount of KIRU to sell.
      *
      * @param out The minimum amount of ETH to receive.
      *            This parameter introduces slippage bounds for the trade.
      */
    function withdraw(uint value, uint out) external {
        uint _PHI_FACTOR = PHI_FACTOR;
        bytes32 _SELF_BALANCE_SLOT = SELF_BALANCE_SLOT;
        bytes32 _TRANSFER_EVENT_SIG = TRANSFER_EVENT_SIG;
        bytes32 _SELL_EVENT_SIG = SELL_EVENT_SIG;
        assembly {
            let ptr := mload(0x40)
            /*
             * Load balanceOf[msg.sender] slot
             */
            let jeet := caller()
            mstore(ptr, jeet)
            mstore(add(ptr, 0x20), 0)
            let FROM_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * check that caller has enough funds
             */
            let balanceFrom := sload(FROM_BALANCE_SLOT)
            if lt(balanceFrom, value) { revert(0, 0) }
            let _cumulatedFees := sload(2)
            /*
             *  load market's reserves (R₀, R₁)
             *
             *      r₀ = ETH balance - cumulated fees
             *      r₁ = KIRU balance
             */
            let r0 := sub(selfbalance(), _cumulatedFees)
            let r1 := sload(_SELF_BALANCE_SLOT)
            let y := value
            /*
             * Only allow sell orders under 5% of Kiru's liquidity
             * to prevent divergence.
             */
            if gt(y, div(r1, 5)) { revert(0, 0) }
            /*
             * the kiru sent is sold for ETH using the CP formula:
             *
             *     y = (R₁ - K / (R₀ + x)) * ϕfactor
             *
             * where:
             *
             *    y: Kiru amount in
             *    x: Eth amount out
             *    K: R₀ * R₁
             *    ϕfactor: withdrawal penalty factor
             *
             * Compute the new reserve 1 by adding the amount out y
             * 
             * R₁′ = R₁ + y
             */
            let r1Prime := add(r1, y)
            /*
             * R₀′ = K / R₁′
             */
            let r0Prime := div(mul(r0, r1), r1Prime)
            /*
             * Compute the raw amount out x
             *
             * x = R₀ - R₀′
             */
            let raw_x := sub(r0, r0Prime)
            /*
             * Compute the withdrawal fee ϕ
             *
             * ϕ = x * ϕfactor
             */
            let phi := div(mul(raw_x, _PHI_FACTOR), 1000000)
            /*
             * Compute the amount out x
             *
             * x = x - ϕ
             */
            let x := sub(raw_x, phi)
            /*
             * Ensures that the amount out is within slippage bounds
             */
            if gt(out, x) {revert(0, 0)}
            /*
             * increment cumulated fees
             */
            sstore(2, add(_cumulatedFees, phi))
            /*
             * decrease sender's balance
             */
            sstore(FROM_BALANCE_SLOT, sub(balanceFrom, value))
            /*
             * increase bonding curve balance
             */
            sstore(_SELF_BALANCE_SLOT, add(sload(_SELF_BALANCE_SLOT), value))
            /*
             * Transfer ETH to the seller's address
             */
            if iszero(call(gas(), jeet, x, 0, 0, 0, 0)) { revert(0, 0) }
            /*
             * emit Transfer event
             */
            mstore(ptr, value)
            log3(ptr, 0x20, _TRANSFER_EVENT_SIG, jeet, address())
            /*
             * emit Sell event
             */
            mstore(ptr, value)
            mstore(add(ptr, 0x20), x)
            mstore(add(ptr, 0x40), r0Prime)
            mstore(add(ptr, 0x60), r1Prime)
            log2(ptr, 0x80, _SELL_EVENT_SIG, jeet)
        }
    }

    //////////////////////////////////////////////////////////////
    ////////////////////////// Quote /////////////////////////////
    //////////////////////////////////////////////////////////////

    /**
      * @notice Computes the amount of KIRU received for a given amount of ETH deposited
      *         given the current market reserves.
      *
      * @param value The amount of ETH to deposit.
      *
      * @return The amount of KIRU received.
      */
    function quoteDeposit(uint value) public view returns (uint) {
        uint _ALPHA_INIT = ALPHA_INIT;
        uint _R1_INIT = R1_INIT;
        bytes32 _SELF_BALANCE_SLOT = SELF_BALANCE_SLOT;
        assembly {
            let ptr := mload(0x40)
            let r0 := sub(selfbalance(), sload(2))
            let r1 := sload(_SELF_BALANCE_SLOT)
            let r1InitR1Ratio := mul(div(mul(r1, 1000000), _R1_INIT), gt(_R1_INIT, r1))
            let inverseAlpha := div(mul(_ALPHA_INIT, r1InitR1Ratio), 1000000)
            let alpha := sub(1000000, inverseAlpha)
            let alphaR0 := div(mul(alpha, r0), 1000000)
            let alphaR1 := div(mul(alpha, r1), 1000000)
            let alphaR0Prime := add(alphaR0, value)
            let alphaR1Prime := div(mul(alphaR0, alphaR1), alphaR0Prime)
            let y := sub(alphaR1, alphaR1Prime)
            mstore(ptr, y)
            return(ptr, 0x20)
        }
    }

    /**
      * @notice Computes the amount of ETH received for a given amount of KIRU withdrawn
      *         given the current market reserves.
      *
      * @param value The amount of KIRU to withdraw.
      *
      * @return The amount of ETH received.
      */
    function quoteWithdraw(uint value) public view returns (uint) {
        uint _PHI_FACTOR = PHI_FACTOR;
        bytes32 _SELF_BALANCE_SLOT = SELF_BALANCE_SLOT;
        assembly {
            let ptr := mload(0x40)
            let r0 := sub(selfbalance(), sload(2))
            let r1 := sload(_SELF_BALANCE_SLOT)
            let r1Prime := add(r1, value)
            let x := sub(r0, div(mul(r0, r1), r1Prime))
            let phi := div(mul(x, _PHI_FACTOR), 1000000)
            let xOut := sub(x, phi)
            mstore(ptr, xOut)
            return(ptr, 0x20)
        }
    }

    //////////////////////////////////////////////////////////////
    /////////////////////////// View /////////////////////////////
    //////////////////////////////////////////////////////////////

    /**
      * @notice Returns the market's reserves and the skew factor α(t).
      *
      * @return r0 The balance of the KIRU contract.
      *
      * @return r1 The balance of the KIRU contract.
      *
      * @return alpha The skew factor α(t).
      */
    function getState() public view returns (uint r0, uint r1, uint alpha) {
        uint _ALPHA_INIT = ALPHA_INIT;
        uint _R1_INIT = R1_INIT;
        bytes32 _SELF_BALANCE_SLOT = SELF_BALANCE_SLOT;
        assembly {
            r0 := sub(selfbalance(), sload(2))
            r1 := sload(_SELF_BALANCE_SLOT)
            let r1InitR1Ratio := mul(div(mul(r1, 1000000), _R1_INIT), gt(_R1_INIT, r1))
            let inverseAlpha := div(mul(_ALPHA_INIT, r1InitR1Ratio), 1000000)
            alpha := sub(1000000, inverseAlpha)
        }
    }

    //////////////////////////////////////////////////////////////
    //////////////////////////// KIRU ////////////////////////////
    //////////////////////////////////////////////////////////////

    /**
      * @notice Returns the balance of the specified address.
      *
      * @param to The address to get the balance of.
      *
      * @return _balance The balance of the specified address.
      */
     function balanceOf(address to) public view returns (uint _balance) {
        assembly {
            let ptr := mload(0x40)
            /*
             * Load balanceOf[to] slot
             */
            mstore(ptr, to)
            mstore(add(ptr, 0x20), 0)
            let TO_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * Load balanceOf[to]
             */
            _balance := sload(TO_BALANCE_SLOT)
        }
     }

    /**
      * @notice Returns the amount of tokens that the spender is allowed to transfer from the owner.
      *
      * @param owner The address of the owner.
      *
      * @param spender The address of the spender.
      *
      * @return __allowance The amount of tokens that the spender is allowed to transfer from the owner.
      */
     function allowance(address owner, address spender) public view returns (uint __allowance) {
        assembly {
            let ptr := mload(0x40)
            /*
             * Load allowance[owner][spender] slot
             */
            mstore(ptr, owner)
            mstore(add(ptr, 0x20), 1)
            let OWNER_ALLOWANCE_SLOT := keccak256(ptr, 0x40)
            mstore(ptr, spender)
            mstore(add(ptr, 0x20), OWNER_ALLOWANCE_SLOT)
            let SPENDER_ALLOWANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * Load allowance[owner][spender]
             */
            __allowance := sload(SPENDER_ALLOWANCE_SLOT)
        }
     }

    /**
      * @notice Efficient ERC20 transfer function
      *
      * @dev The caller must have sufficient balance to transfer the specified amount.
      *
      * @param to The address to transfer to.
      *
      * @param value The amount of kiru to transfer.
      *
      * @return true
      */
    function transfer(address to, uint value) public returns (bool) {
        bytes32 _TRANSFER_EVENT_SIG = TRANSFER_EVENT_SIG;
        assembly {
            let ptr := mload(0x40)
            /*
             * Load balanceOf[msg.sender] slot
             */
            let from := caller()
            mstore(ptr, from)
            mstore(add(ptr, 0x20), 0)
            let FROM_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * Load balanceOf[to] slot
             */
            mstore(ptr, to)
            let TO_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * Ensures that caller has enough balance
             */
            let balanceFrom := sload(FROM_BALANCE_SLOT)
            if lt(balanceFrom, value) { revert(0, 0) }
            /*
             * decrease sender's balance
             */
            sstore(FROM_BALANCE_SLOT, sub(balanceFrom, value))
            /*
             * increment recipient's balance
             */
            sstore(TO_BALANCE_SLOT, add(sload(TO_BALANCE_SLOT), value))
            /*
             * emit Transfer event
             */
            mstore(ptr, value)
            log3(ptr, 0x20, _TRANSFER_EVENT_SIG, from, to)
            /*
             * return true
             */
            mstore(ptr, 1)
            return(ptr, 0x20)
        }
    }

    /**
      * @notice Efficient ERC20 transferFrom function
      *
      * @dev The caller must have sufficient allowance to transfer the specified amount.
      *      From must have sufficient balance to transfer the specified amount.
      *
      * @param from The address to transfer from.
      *
      * @param to The address to transfer to.
      *
      * @param value The amount of kiru to transfer.
      *
      * @return true
      */
    function transferFrom(address from, address to, uint value) public returns (bool) {
        bytes32 _TRANSFER_EVENT_SIG = TRANSFER_EVENT_SIG;
        assembly {
            let ptr := mload(0x40)
            /*
             * Load balanceOf[from] slot
             */
            let spender := caller()
            mstore(ptr, from)
            mstore(add(ptr, 0x20), 0)
            let FROM_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * Load balanceOf[to] slot
             */
            mstore(ptr, to)
            let TO_BALANCE_SLOT := keccak256(ptr, 0x40)
            /*
             * Load allowance[from][spender] slot
             */
            mstore(ptr, from)
            mstore(add(ptr, 0x20), 1)
            let ALLOWANCE_FROM_SLOT := keccak256(ptr, 0x40)
            mstore(ptr, spender)
            mstore(add(ptr, 0x20), ALLOWANCE_FROM_SLOT)
            let ALLOWANCE_FROM_CALLER_SLOT := keccak256(ptr, 0x40)
            /*
             * check that msg.sender has sufficient allowance
             */
            let __allowance := sload(ALLOWANCE_FROM_CALLER_SLOT)
            if lt(__allowance, value) { revert(0, 0) }
            /*
             * Reduce the spender's allowance
             */
            sstore(ALLOWANCE_FROM_CALLER_SLOT, sub(__allowance, value))
            /*
             * Ensures that from has enough funds
             */
            let balanceFrom := sload(FROM_BALANCE_SLOT)
            if lt(balanceFrom, value) { revert(0, 0) }
            /*
             * Decrease sender's balance
             */
            sstore(FROM_BALANCE_SLOT, sub(balanceFrom, value))
            /*
             * Increment recipient's balance
             */
            sstore(TO_BALANCE_SLOT, add(sload(TO_BALANCE_SLOT), value))
            /*
             * Emit Transfer event
             */
            mstore(ptr, value)
            log3(ptr, 0x20, _TRANSFER_EVENT_SIG, from, to)
            /*
             * Return true
             */
            mstore(ptr, 1)
            return(ptr, 0x20)
        }
    }

    
    /**
      * @notice Approves a spender to transfer KIRU tokens on behalf of the caller
      *         This function implements the ERC20 approve functionality, allowing
      *         delegation of token transfers to other addresses.
      *
      * @dev This function sets the allowance that the spender can transfer from
      *      the caller's balance. The allowance can be increased or decreased
      *      by calling this function again with a different value.
      *      Note that setting a non-zero allowance from a non-zero value should
      *      typically be done by first setting it to zero to prevent front-running.
      *
      * @param to The address being approved to spend tokens
      *
      * @param value The amount of tokens the spender is approved to transfer
      *
      * @return bool Returns true if the approval was successful
      */
    function approve(address to, uint value) public returns (bool) {
        bytes32 _APPROVAL_EVENT_SIG = APPROVAL_EVENT_SIG;
        assembly {
            let ptr := mload(0x40)
            /*
             * Load allowance[owner][spender] slot
             */
            let owner := caller()
            mstore(ptr, owner)
            mstore(add(ptr, 0x20), 1)
            let ALLOWANCE_CALLER_SLOT := keccak256(ptr, 0x40)
            mstore(ptr, to)
            mstore(add(ptr, 0x20), ALLOWANCE_CALLER_SLOT)
            let ALLOWANCE_CALLER_TO_SLOT := keccak256(ptr, 0x40)
            /*
             * Store the new allowance value
             */
            sstore(ALLOWANCE_CALLER_TO_SLOT, value)
            /*
             * Emit Approval event
             */
            mstore(ptr, value)
            log3(ptr, 0x20, _APPROVAL_EVENT_SIG, owner, to)
            /*
             * Return true
             */
            mstore(ptr, 1)
            return(ptr, 0x20)
        }
    }

    /**
      * @notice Burns KIRU tokens from the caller's balance
      *         The burned tokens are permanently removed from circulation,
      *         reducing the total supply.
      *
      * @dev This function requires the caller to have sufficient balance.
      *      The tokens are burned by transferring them to the zero address
      *      and decreasing the total supply.
      *
      * @param value The amount of KIRU tokens to burn
      */
    function burn(uint value) public {
      bytes32 _TRANSFER_EVENT_SIG = TRANSFER_EVENT_SIG;
      assembly {
        let ptr := mload(0x40)
        let from := caller()
        mstore(ptr, from)
        mstore(add(ptr, 0x20), 0)
        let FROM_BALANCE_SLOT := keccak256(ptr, 0x40)
        let balanceFrom := sload(FROM_BALANCE_SLOT)
        if lt(balanceFrom, value) { revert(0, 0) }
        sstore(FROM_BALANCE_SLOT, sub(balanceFrom, value))
        sstore(3, sub(sload(3), value))
        mstore(ptr, value)
        log3(ptr, 0x20, _TRANSFER_EVENT_SIG, from, 0)
      }
    }
  
    /**
     * @notice Returns the total supply of KIRU tokens in circulation
     * @dev This value decreases when tokens are burned and represents the current
     *      amount of KIRU tokens that exist
     * @return The total number of KIRU tokens in circulation
     */
    function totalSupply() public view returns (uint) {
        return _totalSupply;
    }

    /**
      * @notice Collects the cumulated withdraw fees and transfers them to the treasury.
      */
    function collect() external {
        address _TREASURY = TREASURY;
        assembly {
            let _cumulatedFees := sload(2)
            // set cumulated fees to 0
            sstore(2, 0)
            // transfer cumulated fees to treasury
            if iszero(call(gas(), _TREASURY, _cumulatedFees, 0, 0, 0, 0)) { revert (0, 0)}
        }
    }
    receive() external payable {}
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 100000000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_alpha","type":"uint256"},{"internalType":"uint256","name":"_phi","type":"uint256"},{"internalType":"uint256","name":"_r1Init","type":"uint256"},{"internalType":"uint256","name":"_supply","type":"uint256"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"payable","type":"constructor"},{"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":"chad","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"r0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"r1","type":"uint256"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"jeet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"r0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"r1","type":"uint256"}],"name":"Sell","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":"TREASURY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"__allowance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"_balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"out","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getState","outputs":[{"internalType":"uint256","name":"r0","type":"uint256"},{"internalType":"uint256","name":"r1","type":"uint256"},{"internalType":"uint256","name":"alpha","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"quoteDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"quoteWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"value","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":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"out","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

610e1738819003610160601f8201601f19168101906001600160401b0382119082101761013a5760a092829160405261016039126101355761016051610180516101a0516101c0516101e051929091906001600160a01b0384168403610135576100a19493929360805260a0528060011c60c0528160e05282600355604080513081526000602082015281812093815220928183550382556101005261012052565b604051610cc6908161015182396080518181816103fe015281816109770152610afd015260a0518181816106bd0152610c68015260c05181818161039c015281816108e60152610a9f015260e05181818161053c0152610bd10152610100518181816103c7015281816106590152818161090c01528181610ad10152610c39015261012051815050610140518161092d0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806306fdde031461012b578063095ea7b31461012657806318160ddd146101215780631865c57d1461011c57806323b872dd146101175780632d2c556514610112578063313ce5671461010d57806342966c6814610108578063441a3e701461010357806370a08231146100fe57806395d89b41146100f9578063a9059cbb146100f4578063b6b55f25146100ef578063db431f06146100ea578063dd62ed3e146100e5578063e5225381146100e05763ec2118400361000e57610bf9565b610b94565b610b34565b610a69565b6108b7565b61081e565b6107b2565b610762565b610621565b61059a565b610560565b6104f1565b61042b565b610369565b61032d565b6102a6565b6101eb565b604051906040820182811067ffffffffffffffff8211176101545760405260048252565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b9190916020815282519283602083015260005b8481106101d55750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b8060208092840101516040828601015201610196565b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57610257610225610130565b7f4b69727500000000000000000000000000000000000000000000000000000000602082015260405191829182610183565b0390f35b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361025b57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361025b57565b3461025b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760206102df610260565b6024359060405191338352838301600181526040842090838552528060408420558252337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258484a360018152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576020600354604051908152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760607f0000000000000000000000000000000000000000000000000000000000000000620f42406002544703917f0000000000000000000000000000000000000000000000000000000000000000549060405193845281602085015282828211920204027f00000000000000000000000000000000000000000000000000000000000000000204620f4240036040820152f35b3461025b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57610462610260565b61046a610283565b906044359160405191808352602083019360008552604084209483855260408520908386526001815260408620903387525260408520805483811061025b57839003905585549582871061025b578260209703905581815401905583527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8484a360018152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57602060405160128152f35b3461025b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760043560405133815260006020820152604081209182549281841061025b5781600094039055806003540360035581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60203392a3005b3461025b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57600435602435907f000000000000000000000000000000000000000000000000000000000000000090604051923384526020840160008152604085209283549481861061025b57600254948547039582549760058904851161025b578489018099890204809803620f42407f000000000000000000000000000000000000000000000000000000000000000082020480910380981161025b57859201600255039055818154019055600080808086335af11561025b57855230337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602088a352604083015260608201527f483f8aec0fd892ac72ad1ba8d0e9c9e73db59c12d263fd71de480b5b3deeae3c60803392a2005b3461025b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576020604061079d610260565b81519081526000838201522054604051908152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576102576107ec610130565b7f4b49525500000000000000000000000000000000000000000000000000000000602082015260405191829182610183565b3461025b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57610855610260565b60243590604051903382526000602083015260408220928183526040832084549482861061025b57826020960390558181540190558252337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8484a360018152f35b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576004357f0000000000000000000000000000000000000000000000000000000000000000620f4240807f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000090604051953387526020870192600084526040882034600254470303868554998a811190828c0204027f00000000000000000000000000000000000000000000000000000000000000000204870390878a81838502049302049788923481019384910204809903988993849334019b8c9202040204600181019a0303931161025b5787600194558581540190557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82825401019055600354030160035581815233307fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602084a334855252604083015260608201527f064fb1933e186be0b289a87e98518dc18cc9856ecbc9f1353d1a138ddf733ec560803392a2005b3461025b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760206004357f00000000000000000000000000000000000000000000000000000000000000009060405191620f424060025447039181807f000000000000000000000000000000000000000000000000000000000000000054928381119082850204027f000000000000000000000000000000000000000000000000000000000000000002048103938402049202048092820191020490038152f35b3461025b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760206040610b6f610260565b610b77610283565b825191825283820160018152838320918352522054604051908152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576000808080600254816002557f00000000000000000000000000000000000000000000000000000000000000005af11561025b57005b3461025b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576020600435604051906002544703907f000000000000000000000000000000000000000000000000000000000000000054908101908202049003620f42407f000000000000000000000000000000000000000000000000000000000000000082020490038152f3fea26469706673582212207707520d07cb903e10f439d5e223d610fab40e355984a446b658bb963aef674864736f6c634300081b003300000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000aba7f854aa249ca3a50000000000000000000000000000000000000000000000c9f2c9cd04674edea400000000000000000000000000000002d69b5b0c06f5c0b14d11d9bc7e622ac5316c018

Deployed Bytecode

0x6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c806306fdde031461012b578063095ea7b31461012657806318160ddd146101215780631865c57d1461011c57806323b872dd146101175780632d2c556514610112578063313ce5671461010d57806342966c6814610108578063441a3e701461010357806370a08231146100fe57806395d89b41146100f9578063a9059cbb146100f4578063b6b55f25146100ef578063db431f06146100ea578063dd62ed3e146100e5578063e5225381146100e05763ec2118400361000e57610bf9565b610b94565b610b34565b610a69565b6108b7565b61081e565b6107b2565b610762565b610621565b61059a565b610560565b6104f1565b61042b565b610369565b61032d565b6102a6565b6101eb565b604051906040820182811067ffffffffffffffff8211176101545760405260048252565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b9190916020815282519283602083015260005b8481106101d55750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8460006040809697860101520116010190565b8060208092840101516040828601015201610196565b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57610257610225610130565b7f4b69727500000000000000000000000000000000000000000000000000000000602082015260405191829182610183565b0390f35b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361025b57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361025b57565b3461025b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760206102df610260565b6024359060405191338352838301600181526040842090838552528060408420558252337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258484a360018152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576020600354604051908152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760607f00000000000000000000000000000000000000055d3fc2a55124e51d28000000620f42406002544703917f74fe35274b4124e4e66cfb7fcc49e806383311f68059c9c8fadb03cc84207c6e549060405193845281602085015282828211920204027f00000000000000000000000000000000000000000000000000000000000003e80204620f4240036040820152f35b3461025b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57610462610260565b61046a610283565b906044359160405191808352602083019360008552604084209483855260408520908386526001815260408620903387525260408520805483811061025b57839003905585549582871061025b578260209703905581815401905583527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8484a360018152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000002d69b5b0c06f5c0b14d11d9bc7e622ac5316c018168152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57602060405160128152f35b3461025b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760043560405133815260006020820152604081209182549281841061025b5781600094039055806003540360035581527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60203392a3005b3461025b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57600435602435907f74fe35274b4124e4e66cfb7fcc49e806383311f68059c9c8fadb03cc84207c6e90604051923384526020840160008152604085209283549481861061025b57600254948547039582549760058904851161025b578489018099890204809803620f42407f000000000000000000000000000000000000000000000000000000000000271082020480910380981161025b57859201600255039055818154019055600080808086335af11561025b57855230337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602088a352604083015260608201527f483f8aec0fd892ac72ad1ba8d0e9c9e73db59c12d263fd71de480b5b3deeae3c60803392a2005b3461025b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576020604061079d610260565b81519081526000838201522054604051908152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576102576107ec610130565b7f4b49525500000000000000000000000000000000000000000000000000000000602082015260405191829182610183565b3461025b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b57610855610260565b60243590604051903382526000602083015260408220928183526040832084549482861061025b57826020960390558181540190558252337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8484a360018152f35b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576004357f00000000000000000000000000000000000000055d3fc2a55124e51d28000000620f4240807f74fe35274b4124e4e66cfb7fcc49e806383311f68059c9c8fadb03cc84207c6e7f000000000000000000000000000000000000000000000000000000000000000090604051953387526020870192600084526040882034600254470303868554998a811190828c0204027f00000000000000000000000000000000000000000000000000000000000003e80204870390878a81838502049302049788923481019384910204809903988993849334019b8c9202040204600181019a0303931161025b5787600194558581540190557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82825401019055600354030160035581815233307fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602084a334855252604083015260608201527f064fb1933e186be0b289a87e98518dc18cc9856ecbc9f1353d1a138ddf733ec560803392a2005b3461025b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760206004357f00000000000000000000000000000000000000055d3fc2a55124e51d280000009060405191620f424060025447039181807f74fe35274b4124e4e66cfb7fcc49e806383311f68059c9c8fadb03cc84207c6e54928381119082850204027f00000000000000000000000000000000000000000000000000000000000003e802048103938402049202048092820191020490038152f35b3461025b5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b5760206040610b6f610260565b610b77610283565b825191825283820160018152838320918352522054604051908152f35b3461025b5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576000808080600254816002557f0000000000000000000000002d69b5b0c06f5c0b14d11d9bc7e622ac5316c0185af11561025b57005b3461025b5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261025b576020600435604051906002544703907f74fe35274b4124e4e66cfb7fcc49e806383311f68059c9c8fadb03cc84207c6e54908101908202049003620f42407f000000000000000000000000000000000000000000000000000000000000271082020490038152f3fea26469706673582212207707520d07cb903e10f439d5e223d610fab40e355984a446b658bb963aef674864736f6c634300081b0033

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

00000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000aba7f854aa249ca3a50000000000000000000000000000000000000000000000c9f2c9cd04674edea400000000000000000000000000000002d69b5b0c06f5c0b14d11d9bc7e622ac5316c018

-----Decoded View---------------
Arg [0] : _alpha (uint256): 1000
Arg [1] : _phi (uint256): 10000
Arg [2] : _r1Init (uint256): 850000000000000000000000000000
Arg [3] : _supply (uint256): 1000000000000000000000000000000
Arg [4] : _treasury (address): 0x2d69b5b0C06f5C0b14d11D9bc7e622AC5316c018

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [1] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [2] : 000000000000000000000000000000000000000aba7f854aa249ca3a50000000
Arg [3] : 000000000000000000000000000000000000000c9f2c9cd04674edea40000000
Arg [4] : 0000000000000000000000002d69b5b0c06f5c0b14d11d9bc7e622ac5316c018


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.