InceptionLRT Docs
  • 🛬Introduction
    • Why Inception?
    • Core Values
  • 🌄Ecosystem
    • What is Restaking?
    • The Restaking Ecosystem
    • The Role of Curators
    • InceptionLRT's Position
    • EigenLayer
      • Restaked Points
      • Season 2 Stakedrop
  • 🍥InceptionLRT
    • Protocol Structure
    • Restakable Assets
    • Totems
      • FAQ
    • Referral Program
    • Roadmap
  • ⚡Features
    • Liquid Restaking
      • Meta
      • Isolated
      • Native
    • Defi Integrations
    • Omnichain Solution
      • Omnichain Restaking (Coming Soon)
      • Bridge
    • Flash Unstake
      • Functionality
      • Why Flash Unstake?
    • Distributed Validator Technology (DVT)
      • Node Operators
    • Restaking Insurance (Coming Soon)
  • 📚Guides
    • Connect Wallet
    • Restake Assets
      • Lite Mode
      • Advanced Mode
    • Unstake Assets
      • Flash Unstake
      • Standard Unstake
    • Bridge LRTs
    • Manage LRTs
  • 🛡️Security
    • Audit Reports
    • Bug Bounty
    • Key Risks
  • 📄Contracts
    • Addresses
      • LRTs
      • Bridge
      • RatioFeed
      • RateProvider
    • Requirements
    • Functionality
    • Redemption Price
  • 🔖Resources
    • Key Terms
    • Brand Assets
Powered by GitBook
On this page
  • Deposit
  • Code Sample
  • Workflow
  • Withdraw
  • Redeem
  • Workflow
  • Flash Unstake
  • Known Issues
  1. Contracts

Functionality

Deposit

The deposit() function allows users to restake a supported asset on EigenLayer.

Users are allowed to deposit a supported asset to the corresponding vault in any amount that is greater than minAmount.

function deposit(uint256 amount, address receiver) public returns (uint256);

// returns the min deposit amount (100 wei in the current version)
function minAmount() public returns(uint256);

Before sending a deposit transaction, ensure that the vault has sufficient allowances for spending your assets (utilizing the transferFrom() function). A successful deposit transaction results in minting an appropriate amount of the corresponding LRT and a Deposit event:

event Deposit(
      address indexed sender,
      address indexed receiver,
      uint256 amount,
      uint256 iShares
);

To determine the minted amount of LRT, use the following formula (amount – deposited amount of LST):

const mintedAmount = amount * ratio / 1e18;

Code Sample

Let’s say the user wants to restake and decided on a specific amount of the LST and receiverAddress that will be issued the mintedAmount of LRT.

await iVault.connect(staker).deposit(amount, receiverAddress);

Workflow

  1. User deposits into InceptionVault.

  2. Vault deposits the user amount directly to EigenLayer via strategyManager::delegateIntoStrategy().

  3. InceptionVault mints a corresponding amount of the LRT (instETH or inrETH respectively) for the user’s wallet.

Withdraw

The withdraw() function allows users to unstake from the corresponding vault on EigenLayer, burning the user LRTs to get back the original asset.

During the withdrawal process, the corresponding vault instance stores the pending withdrawal amounts. Let us make the withdrawal process grandma-clear. It may be divided into the following steps:

  1. The vault burns the input amount of an appropriate LRT at the user’s address (no approval needed).

  2. The vault updates the global pending withdrawal state and the user’s pending withdrawal state with the corresponding receiverAddress and asset amount. The amount will be received to the receiverAddress upon the redeeming process.

  3. The vault emits a withdrawal event with the pending amount:

    event Withdraw(
          address indexed sender,
          address indexed receiver,
          address indexed owner,
          uint256 amount,
          uint256 iShares
    );

    In order to get the pending withdraw amount use the following function in iVault:

    function withdraw(uint256 iShares, address receiver) external;
    
    /// returns the amount of assets to be claimed and the receiver
    function getPendingWithdrawalOf(address claimer) public view returns (uint256, address)

Redeem

The redeem() functions is applied at the final step, in which the user receives the pending asset amount that becomes available after the next rebalancing procedure.

Workflow

  1. The user (anyone) calls iVault::redeem() with a proper receiverAddress (that persists in the global state).

  2. The Inception vault calls iVault::isAbleToRedeem() to ensure that the user is able to claim at least one pending withdrawal.

    Copy

    // returns whether the user is able to redeem their assets (true/false)
    // returns an array of index positions of the withdrawal queue (claimerWithdrawalsQueue)
    function isAbleToRedeem(address receiverAddress) public view returns (bool able, uint256[] memory);
  3. If able to redeem, the vault adds up all the available corresponding withdrawals, transfers the resulting amount to receiverAddress, and updates the global withdrawal state.

Flash Unstake

FlashWithdrawal feature.

It generally allows users to withdraw their underlying assets from a vault immediately by paying an extra fee.

The following functions facilitate the process:

  • flashWithdraw()

  • calculateFlashWithdrawFee()

  • flashWithdrawCapacity()

The FlashWithdrawal feature is available only when the flashPool capacity is sufficient. In particular, if a user wants to withdraw sharesToWithdraw shares of a corresponding Inception token, they should ensure that the flashWithdrawCapacity() is greater than or equal to the amount. Then, they should calculate the flash withdrawal fee that will be charged for processing the flash withdrawal. The resulting amount that the user will receive can be calculated as:

expectAmount = vault.convertToAssets(sharesToWithdraw)

receiveAmount = expectAmount - vault.calculateFlashWithdrawFee(expectAmount)

Known Issues

  • On each transfer, stEth loses 1–2 wei.

PreviousRequirementsNextRedemption Price

Last updated 5 months ago

See the on Ethereum Mainnet.

See the on Ethereum Mainnet.

See the on Ethereum Mainnet.

📄
example transaction
example transaction
example transaction