Contract Constructor and Initialization

The contract initializes with the following parameters (adapted from the base code):

// ```solidity
contract yEARN is IERC20, Ownable {
    // ... imports and interfaces ...

    string public name = "yEARN";
    string public symbol = "yEARN";
    uint256 public decimals = 18;

    constructor() {
        uint256 init_supply = 10_000 * 10**decimals;
        min_supply = (10 * 10**decimals) / 10;  // Adjusted proportionally
        max_supply = 10_000 * 10**decimals;

        rewardAddress = msg.sender;  // Rewards pool
        vaultAddress = ;  // Example vault
        balanceOf[msg.sender] = init_supply;
        _totalSupply = init_supply;

        // Fee percentages (scaled)
        uint256 deciCalc = 10**decimals;
        mint_pct = (50 * deciCalc) / 10000;  // 0.5%
        burn_pct = (50 * deciCalc) / 10000;  // 0.5%
        reward_pct = (100 * deciCalc) / 10000;  // 1%
        vault_pct = (250 * deciCalc) / 10000;  // 2.5%

        // Inactivity burn rate (50% base)
        inactive_burn = (5000 * deciCalc) / 10000;  // 50%

        // Uniswap pair creation
        address _pair = IUniswapV2Factory(UNISWAP_ROUTERV2.factory())
            .createPair(address(this), UNISWAP_ROUTERV2.WETH());
        UniswapV2pair = _pair;

        // Liquidity addition: 92% of supply with 2000 USDT (handled externally/post-deployment)
    }
}

Post-deployment, 90% of the total supply (9,000 yEARN) is added to liquidity paired with 2,000 USDT on Uniswap V2.

Last updated