๐Ÿ”’Staking v1

The Infinite Trading Protocol (ITP) Staking Contract is designed to provide a decentralized platform for staking ITP tokens, enabling users to earn rewards by locking their tokens. The platform supports a flexible staking model that adapts to various user needs, including options for early withdrawal with a dynamically decreasing penalty system and the potential for high compounded annual returns denominated in ITP. This contract allows ITP holders to grow their unused tokens for future use in exchange for the protocol's services.

Initially, 10,000,000 ITP will be deposited as a reward for the Staking V1 contract. The protocol has allocated 300,000,000 ITP for staking, but the rewards will be deposited over time into the staking contract. We will deploy several staking contracts, each with different terms, rewards, and rules. After the rewards are utilized by stakers, token holders should vote to decide in which staking vaults the new rewards should be allocated.

Key Features

  1. Compounded Annual Returns:

    • Users receive an annual compounded interest rate of 15%. This means if a user stakes for two consecutive years, they earn 15% on the original amount in the first year and an additional 15% on the new total (original amount + first year's interest) in the second year. The contract allows assets to be locked in multiples of one year, giving users the flexibility to decide their strategy.

    • Let R be the rewards function, n be the number of years staked, P be the principal amount staked and r be the current staking interest rate, then the rewards formula is given by the compound interest formula

    R(P,n,r)=P(1+r)nR(P,n,r) = P (1+r)^{n}

  2. Early Withdrawal with Decreasing Penalty:

    • Users can choose to withdraw their staked assets before the maturity date. The early withdrawal penalty is a maximum of 20% if the assets are withdrawn on the same day of deposit. This penalty decreases linearly over time; for instance, withdrawing at half the unlocking period incurs a 10% penalty. The penalty approaches 0% as the unlock period nears.

    • Let a be the amount staked, x be the initial lock date, y be the final unlock date, t be today's date, and p be the max penalty parameter (0.20 initially), then the formula for the penalty is given by

    P(a,x,y,p,t)=aโ‹…pโ‹…(yโˆ’t)(yโˆ’x)P(a,x,y,p,t) = a \cdot p\cdot \frac{( y - t )}{ (y-x)}

  • Penalties incurred from early withdrawals will be burned, contributing to deflationary pressure on the total token supply.

  1. Governance:

    • The governance token, vITP, is used by token holders to vote on various proposals, ensuring that changes to the protocol are made democratically and in alignment with the interests of the stakeholders.

    • Both the reward accumulation and the penalty for early withdrawal are calculated based on linear functions, which depend on the staked duration and the yield/penalty parameters.

    • The staking parameters such as the reward/penalty rates can be adjusted via proposals and voting by token holders.

Contract Interactions

  1. Deposit:

    • Users can deposit their tokens into the staking contract. Upon deposit, the tokens are locked for a predetermined period set by the user, in yearly increments.

  2. Withdraw:

    • Withdrawals can be made at the end of the locking period without any penalties. Early withdrawals are subject to a decreasing penalty depending on the time of withdrawal relative to the total lock period.

  3. Extend Lock:

    • Users have the option to extend the locking period, potentially qualifying for higher rewards o or keeping their actual rates in case the new yield is lower. Penalties also can go up and down (by voting), and the user that extends their lock will obtain a higher reward and lower penalty. Lock extensions will increase the voting power of the user.

  4. Participate in Governance:

    • Token holders can use their vITP tokens to participate in governance decisions, influencing key aspects of the protocol, staking contractโ€™s operational and reward parameters, and more.

Technical Implementation

  • The staking contract is implemented using Solidity and deployed on the Optimism Network.

  • It utilizes robust and secure libraries from OpenZeppelin to manage ownership, security (via ReentrancyGuard), and safe token handling (using SafeERC20).

Security Features

  • The contract incorporates standard security features, including reentrancy protection to prevent potential attack vectors such as re-entrant attacks.

  • Ownership and access controls are strictly managed to prevent unauthorized access and changes to critical contract functions.


The Infinite Trading Protocol Staking Contract offers a dynamic and user-centered approach to staking. By integrating decentralized governance, the platform aligns with the broader DeFi ethos of transparency and community-driven decision-making.

Last updated