Unstake From Lido, Claim It When It Clears, Restake It
0x62180042606624f02D8A130dA8A3171e9b33894d

What this does

This plug moves an unstaking cycle through Lido in two phases keyed on a stored request identifier. It asks the caller for unstake_amount, the quantity of stETH to queue for withdrawal. When no unstake_request is stored it queues the withdrawal and saves the request; when one exists it claims the finalized request for native ETH, clears the marker, and stakes the socket's ETH balance back into stETH. Tracking the request by hand risks claiming before finalization or restaking a stale balance.

Actions · 10

  • Read stored value
    Read stored value of in
    Reads a stored value from the socket's persistent storage by key.
  • Predicate
    Steers control flow by comparing two values: branch, loop, or require the condition holds.
  • Request withdrawal
    Request withdrawal of from Lido
    Queues stETH for withdrawal through Lido's queue and receives a claimable request NFT.
  • Set stored value
    Set stored value of in to
    Writes a value to the socket's persistent storage under a scope and key.
  • Else branch
    Else
    Opens the else branch of a conditional.
  • Claim withdrawal
    Claim withdrawal from Lido
    Claims a finalized Lido withdrawal request and pays the native ETH to the wallet.
  • Set stored value
    Set stored value of in to
    Writes a value to the socket's persistent storage under a scope and key.
  • Get token balance
    Get balance of held by
    Reads a token balance held by an address, native or ERC-20.
  • Stake
    Stake for
    Stakes native ETH with Lido and receives stETH.
  • End block
    End block
    Closes the innermost open block, whether a conditional branch or a loop.

Related plugs · 8