LogoLogo
  • Introduction
    • Get started
  • Kiln Products
    • Overview
    • 🧱Validators
      • ⛓️Protocols
        • Algorand (ALGO)
        • Aptos (APT)
        • Avalanche (AVAX)
        • Babylon (BABY)
        • Cardano (ADA)
        • Celestia (TIA)
        • CoreChain (CORE)
        • Cosmos (ATOM)
        • Cronos (CRO)
        • DyDx (DYDX)
        • Ethereum (ETH)
        • Eigenlayer (EIGEN)
        • Fetch.ai (FET)
        • Flare (FLR)
        • Harmony (ONE)
        • Injective (INJ)
        • Iota (IOTA)
        • Kava (KAVA)
        • Kusama (KSM)
        • Mantra (OM)
        • MultiversX (EGLD)
        • Near (NEAR)
        • Oasis (ROSE)
        • Osmosis (OSMO)
        • Peaq (PEAQ)
        • Polkadot (DOT)
        • Polygon (POL - ex MATIC)
        • Sei (SEI)
        • Solana (SOL)
        • Stacks (STX)
        • Starknet (STRK)
        • Story(IP)
        • Sui (SUI)
        • Symbiotic (SYM)
        • Tezos (XTZ)
        • The Open Network (TON)
        • Tron (TRX)
        • Zetachain (ZETA)
    • 🎆Connect
      • Accessing Kiln Connect
      • API specs
      • Postman Demo
      • SDK
        • Getting started
        • How to find Kiln's validators
        • Upgrade guide from v2 to v3
      • Tutorials
        • SOL - Tag a stake
        • DYDX - How to bridge your rewards
      • Kiln Connect FAQs
    • 🚀Dashboard
      • Architecture
      • Staking
        • Cardano (ADA)
        • Celestia (TIA)
        • Cosmos (ATOM)
        • Cronos (CRO)
        • DYDX (DYDX)
        • Ethereum (ETH)
          • Native EigenLayer Restaking
          • Deposit into compounding validators
          • Convert skimming validators to compounding validators
        • Fetch.ai (FET)
        • Injective (INJ)
        • Kava (KAVA)
        • Kusama (KSM)
        • Mantra (OM)
        • Near (NEAR)
        • Osmosis (OSMO)
        • Polkadot (DOT)
        • Polygon (POL)
        • Solana (SOL)
        • Tezos (XTZ)
        • The Open Network (TON)
        • TRON (TRX)
        • ZetaChain (ZETA)
      • Reporting
        • Cardano (ADA)
        • Celestia (TIA)
        • Cosmos (ATOM)
        • Cronos (CRO)
        • DYDX (DYDX)
        • Ethereum (ETH)
        • Fetch.ai (FET)
        • Injective (INJ)
        • Kava (KAVA)
        • Kusama (KSM)
        • Mantra (OM)
        • Near (NEAR)
        • Osmosis (OSMO)
        • Polkadot (DOT)
        • Polygon (POL)
        • Solana (SOL)
        • Tezos (XTZ)
        • The Open Network (TON)
        • Tron (TRX)
        • ZetaChain (ZETA)
      • Unstaking
        • Cardano (ADA)
        • Celestia (TIA)
        • Cosmos (ATOM)
        • Cronos (CRO)
        • DYDX (DYDX)
        • Ethereum (ETH)
          • Native EigenLayer Withdraw Flow
          • Partial withdraw liquidity
        • Fetch.ai (FET)
        • Injective (INJ)
        • Kava (KAVA)
        • Kusama (KSM)
        • Mantra (OM)
        • Near (NEAR)
        • Osmosis (OSMO)
        • Polkadot (DOT)
        • Polygon (POL)
        • Solana (SOL)
          • Deactivate
          • Merge
          • Split
          • Withdraw
        • Tezos (XTZ)
        • Tron (TRX)
        • The Open Network (TON)
        • ZetaChain (ZETA)
      • Import stakes
      • Move stakes
      • Invite a user to your organization
      • Troubleshooting
      • 🎓Tutorials
        • Cosmos Chains - Auto-compound a stake
      • Dashboard FAQs
    • 📥dApp
      • ETH staking
      • EigenLayer
        • Operator delegation
        • Native restaking
        • Liquid restaking
      • 🔒Security
      • Kiln dApp FAQ
    • ⛓️Onchain
      • 🙋‍♀️Dedicated Validators
        • Key concepts
          • Deposit Flow
          • Rewards Management
          • Unstaking
        • How to integrate
          • 1. Contract Interactions
          • 2. Administration
      • 🤽‍♂️Pooled Staking
        • Key concepts
          • Staking Positions
          • Oracle Reports
          • Exit & Withdrawal
        • How to integrate
          • 🐎Getting Started
          • 🏗️Architecture overview
          • 😊User experience
          • 📃Integration contract
          • ⛑️Contract governance
          • ℹ️Contract ABI
          • 📥Using TheGraph
          • 🥩Staking Interactions
            • Staking
            • Rewards
            • Unstaking & Withdrawals
      • 🎡Tokenized Validators
      • 🎩Node Operators: how to integrate
        • Dedicated Validators (v1)
          • Manage Validators
        • Pooled Staking
          • 1. Using TheGraph for Setup
          • 2. Deploying vPool
          • 3. Key Provisioning in vFactory
          • 4. Oracle Daemon
          • 5. Depositing via Integration Contracts
          • 6. Exit Daemon
          • 7. Deploy Integration Contract (optional)
      • 🔓Security
        • Staking Risks
        • Audits & Bug Bounties
        • Business Continuity
        • Source code
    • 💰DeFi
      • 🦋Morpho via Kiln DeFi
      • 💻How to integrate?
        • Smart contract interactions
        • Governance
        • Reporting data
        • Administration
        • Supported DeFi Protocols
        • Additional Rewards Management
      • 🔓Security
        • Risks
        • Audits & Bug Bounty
        • Pause
        • Source code
        • Compliance Features
      • Kiln DeFi FAQ
    • 🪄Widget
      • 🧑‍🎨Customize - Widget Editor
      • ☄️Integrate - No/Low Code
    • 🛠️More Tools
      • ETH Batch Deposit Contract
      • Safe CD
  • Integrations
    • 🔭Plan your integration
    • 🔌Integrate Kiln products
    • 📱Wallets
      • Stake from Ledger Live
        • Direct Staking
        • Using Kiln Widget
          • DeFi Lending in Ledger Live
        • Using Kiln dApp
          • Dedicated Validators
          • Pooled Staking
          • EigenLayer Restaking
      • Stake from Safe{Wallet}
        • How to stake ETH on Safe & FAQ
        • DeFi Lending in Safe{Wallet}
        • Using Kiln dApp
      • Stake from Squads
    • 🏢Custody platforms
      • Stake from Anchorage
      • Stake from Bitgo
      • Stake from Coinbase Custody/Prime
      • Stake from Copper
      • Stake from Cordial Systems
      • Stake from DFNS
      • Stake from Finoa
      • Stake from Fireblocks
      • Stake from Fordefi
      • Stake from Hex Safe
      • Stake from Ledger Enterprise
      • Stake from Metamask Institutional
      • Stake from Rakkar
      • Stake from Utila
  • Working with Kiln
    • ☑️Staking & DeFi Track Record
    • ✅Security & Insurances
    • ☎️Support
      • FAQs
        • Enzyme FAQ
        • EigenLayer FAQ
        • Kiln x Safe{Wallet} FAQ
        • Ledger Live FAQ
Powered by GitBook
On this page
  • How to initiate an unstake request
  • Get the status of all exit queue tickets for a user
  • Claim tickets once their fulfillable

Was this helpful?

Export as PDF
  1. Kiln Products
  2. Onchain
  3. Pooled Staking
  4. How to integrate
  5. Staking Interactions

Unstaking & Withdrawals

PreviousRewardsNextTokenized Validators

Last updated 1 year ago

Was this helpful?

The is a three-stage process:

  • user requests an exit or unstake (user tx)

  • exit request is processed and ETH is sourced to pay for the exit

  • user claims exited ETH (user tx)

When user request an exit, they burn their shares (receipt tokens in their wallet) in exchange for one or exit queue tickets.

These tickets have a status based on wether or not they can be claimed (user is able to claim their ETH), which depends on the liquidity provided to the exit queues by the vPools.

You can find more details about tickets and casks .


How to initiate an unstake request

Used to request an exit (unstake) of any amount of ETH, up to the maximum user balance.

When initiating an exit, you must specify the quantity of integration tokens to exit. Subsequently, the integration contract will generate one or several tickets in the associated vPool exit queues.

This can only be executed by calling a smart contract method:

cast send $INTEGRATION_CONTRACT_ADDRESS "requestExit(uint256)" $AMOUNT_OF_TOKENS_TO_EXIT

Get the status of all exit queue tickets for a user

Used to retrieve all exit queue tickets for a user, providing the status of each ticket. This information enables you to inform the user about the availability of their exited ETH for claiming. Additionally, you have the option to permit users to claim a portion of their exit request if it is partially fulfilled, with the ability to claim the remainder once it becomes available.

Using The Graph

Query

{
  tickets(where:{owner:"0x8f025e74df96551a5437a50666d39709b0e044bd"}) {
    owner
    index
    ticketId 
    size
    maxExitable
    fulfillableAmount
    fulfillableBy(orderBy:createdAt,orderDirection:desc) {
      caskId
    }
    exitQueue {
      address
    }
  }
}

Example results

{
  "data": {
    "tickets": [
      {
        "owner": "0x8f025e74df96551a5437a50666d39709b0e044bd",
        "index": "0",
        "ticketId": "1",
        "size": "1",
        "maxExitable": "2",
        "fulfillableAmount": "0",
        "fulfillableBy": [],
        "exitQueue": {
          "address": "0x64f65a1e58dcb6d95b3843ab905c6dcc30ea0056"
        }
      },
      {
        "owner": "0x8f025e74df96551a5437a50666d39709b0e044bd",
        "index": "1",
        "ticketId": "340282366920938463463374607441766218638",
        "size": "9998007182",
        "maxExitable": "10017969686",
        "fulfillableAmount": "0",
        "fulfillableBy": [],
        "exitQueue": {
          "address": "0x64f65a1e58dcb6d95b3843ab905c6dcc30ea0056"
        }
      },
      {
        "owner": "0x8f025e74df96551a5437a50666d39709b0e044bd",
        "index": "2",
        "ticketId": "680564733841876926926749214873534353150",
        "size": "9997930238",
        "maxExitable": "10018663614",
        "fulfillableAmount": "0",
        "fulfillableBy": [],
        "exitQueue": {
          "address": "0x64f65a1e58dcb6d95b3843ab905c6dcc30ea0056"
        }
      }
    ]
  }
}

Here you will retrieve all the different exit tickets of an account.

  • ticketId is the id of the ticket, and also the id of the NFT representing this ticket

  • size is the size of the ticket in vPool Shares (not ETH !)

  • maxExitable is the maximum amount of eth that can be retrieved by the ticket. Shares locked inside tickets are not earning rewards anymore.

  • fulfillableAmount is the amount of vPool shares that are currently fulfillable

  • fulfillableBy is a list of casks that fulfill a ticket

  • exitQueue.address is the address of the exit queue contract where the ticket is held

To retrieve the status of the ticket, it's pretty simple:

  • unfulfillable when fulfillableAmount is 0

  • partially fulfillable when fulfillableAmount < size

  • fulfillable when fulfillableAmount = size

Claim tickets once their fulfillable

Used to claim the ETH of a user who has requested to exit the pool.


cast send $INTEGRATION_CONTRACT_ADDRESS \
    "multiClaim(address[],uint256[][],uint32[][])" \
    $ARRAY_OF_EXIT_QUEUE_ADDRESSES \
    $ARRAY_OF_ARRAYS_OF_TICKET_IDS \
    $ARRAY_OF_ARRAYS_OF_CASK_IDS

You can use TheGraph query above to retrieve all the required information. In the case where we would want to claim all the tickets from the example query above (assuming we would have a new cask with id 1 that fulfills all the tickets), the transaction would look like

You must pass only one cask ID per ticket, if the ticket is matched by more than one cask, pass the lowest cask id and the code will automatically claim on all the casks matching the ticket


cast send $INTEGRATION_CONTRACT_ADDRESS \
    "multiClaim(address[],uint256[][],uint32[][])" \
    "[0x64f65a1e58dcb6d95b3843ab905c6dcc30ea0056]" \
    "[[1,340282366920938463463374607441766218638,680564733841876926926749214873534353150]]" \
    "[[1,1,1]]"

⛓️
🤽‍♂️
🥩
unstaking process
here