lido

Integrate Lido liquid staking to stake ETH, wrap wstETH, and manage withdrawal queue requests.

6|20|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/andresdefi/cryptoskills --skill lido-andresdefi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lido
Source: https://github.com/andresdefi/cryptoskills/tree/main/skills/lido
Command: npx skills add https://github.com/andresdefi/cryptoskills --skill lido-andresdefi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires viem.

What problem does it solve? AI agents and developers frequently get Lido integration wrong: stETH is a rebasing token whose balance changes daily, transfers lose 1-2 wei to rounding, wstETH is not 1:1 with stETH, and withdrawals are queued rather than instant. This Skill provides verified contract addresses, correct integration patterns, and working code so agents avoid hallucinated addresses and broken accounting logic. ## Core Features & Use Cases - Staking and Wrapping: Stake ETH via submit(), wrap stETH to non-rebasing wstETH, and convert between shares, stETH, and wstETH using on-chain rate functions. - Withdrawal Queue Management: Request withdrawals (100 wei to 1000 stETH per request), track finalization status, compute checkpoint hints, and claim ETH. - DeFi Integration Patterns: Use wstETH as collateral in vaults and lending protocols, read Chainlink wstETH/ETH and stETH/ETH price feeds with staleness checks, and cross-validate oracle rates against on-chain rates. - Use Case: Build a vault that accepts wstETH deposits, values collateral in ETH via getStETHByWstETH(), and validates the Chainlink wstETH/ETH feed against the on-chain rate with a 5% deviation threshold. ## Quick Start Ask the agent to stake 1 ETH through Lido and wrap the received stETH into wstETH using the provided viem template.

Frequently Asked Questions about lido

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stake ETH with Lido using viem?

Call the Lido contract's `submit(address _referral)` payable function with your ETH value, passing address(0) if you have no referral. Check `getCurrentStakeLimit()` first for large deposits, since a daily staking limit can cause STAKE_LIMIT reverts.

What is the difference between stETH and wstETH?

stETH is a rebasing token whose balance increases daily with staking rewards, while wstETH is a non-rebasing wrapper representing a fixed number of stETH shares. Use wstETH in DeFi protocols and vaults because stored stETH balances become stale after each oracle report.

Why does my stETH transfer leave 1-2 wei of dust?

stETH transfers convert amounts to shares and back using integer division, rounding down twice, so recipients may receive 1-2 wei less than the sent amount. Use `transferShares()` for exact transfers and never assert exact balance equality.

How long do Lido withdrawals take to finalize?

Withdrawal requests enter a queue processed in order, with typical waits of 1-5 days depending on validator exits and oracle reports. Check `getWithdrawalStatus()` for `isFinalized`, then claim with checkpoint hints from `findCheckpointHints()`.

Can I use wstETH as collateral in Aave or other lending protocols?

Yes, wstETH is the standard collateral form because its balance does not rebase, keeping vault accounting accurate. Value positions with `getStETHByWstETH()` or the Chainlink wstETH/ETH feed at 0x536218f9E9Eb48863970252233c8F271f554C2d0 with staleness checks.

Why does my Lido stake transaction revert with STAKE_LIMIT?

Lido enforces a daily staking rate limit that replenishes gradually over time. Read `getCurrentStakeLimit()` before submitting and split large deposits into multiple transactions or wait for the limit to replenish.