Unstake From Lido, Claim It When It Clears, Restake It
Ethereum
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
Readstoredvalueofin
Reads a stored value from the socket's persistent storage by key.
Steers control flow by comparing two values: branch, loop, or require the condition holds.
RequestwithdrawaloffromLido
Queues stETH for withdrawal through Lido's queue and receives a claimable request NFT.
Setstoredvalueofinto
Writes a value to the socket's persistent storage under a scope and key.
Else
Opens the else branch of a conditional.
ClaimwithdrawalfromLido
Claims a finalized Lido withdrawal request and pays the native ETH to the wallet.
Setstoredvalueofinto
Writes a value to the socket's persistent storage under a scope and key.
Getbalanceofheldby
Reads a token balance held by an address, native or ERC-20.
Stakefor
Stakes native ETH with Lido and receives stETH.
Endblock
Closes the innermost open block, whether a conditional branch or a loop.
Related plugs · 8
Not ready to run as it stands: it waits on values or a position of your own.