Skip to content

feat: add Lido staking action provider for Base#1057

Open
Kubudak90 wants to merge 2 commits intocoinbase:mainfrom
Kubudak90:feat/lido-action-provider
Open

feat: add Lido staking action provider for Base#1057
Kubudak90 wants to merge 2 commits intocoinbase:mainfrom
Kubudak90:feat/lido-action-provider

Conversation

@Kubudak90
Copy link
Copy Markdown

Summary

Adds a new action provider for Lido Finance on Base, enabling AI agents to stake ETH/WETH and receive wstETH.

Addresses WISHLIST.md item: "Stake/restake with Lido/Ether.fi"

Actions

Action Description
stake_eth Stake native ETH to receive wstETH via Lido fastStake
stake_weth Stake WETH to receive wstETH (with auto-approval)
check_wsteth_balance Check wallet's wstETH balance on Base

Implementation Details

  • Uses Lido Direct Staking via Chainlink CCIP Custom Sender (0x328...997) for instant fastStake on Base
  • Calls getExpectedWstETH() for accurate slippage calculation before staking
  • Automatic WETH approval flow for stake_weth
  • wstETH earns ~3-4% APY through increasing exchange rate (non-rebasing)
  • Supports Base mainnet

Files

File Description
lido/lidoActionProvider.ts Main provider with 3 actions
lido/schemas.ts Zod input schemas
lido/constants.ts Contract addresses and ABIs
lido/lidoActionProvider.test.ts 8 unit tests (all passing)
lido/index.ts Re-exports

Test plan

  • pnpm run build passes
  • 8/8 unit tests pass
  • Manual: stake ETH on Base mainnet, verify wstETH received

Kubudak90 added 2 commits March 29, 2026 23:59
Add a new action provider for Pendle Finance, enabling AI agents to
interact with Pendle's yield tokenization protocol on Base.

Actions:
- buy_pt: Buy Principal Tokens to lock in fixed yield
- sell_pt: Sell PT back to underlying tokens
- buy_yt: Buy Yield Tokens to speculate on yield
- sell_yt: Sell YT back to underlying tokens
- add_liquidity: Provide liquidity to Pendle markets
- remove_liquidity: Remove liquidity from markets
- claim_rewards: Claim accrued interest, yield, and PENDLE rewards
- list_markets: List active Pendle markets with APYs and TVL

Uses Pendle Hosted SDK API for optimal execution (aggregator routing,
limit order matching, gas-efficient offchain params). Falls back to
direct Router V4 calls for claim_rewards.

Addresses WISHLIST.md item: "Pendle interactions (LP, PT, YT)"
Add a new action provider for Lido Finance, enabling AI agents to
stake ETH/WETH and receive wstETH on Base.

Actions:
- stake_eth: Stake native ETH to receive wstETH via Lido fastStake
- stake_weth: Stake WETH to receive wstETH (with auto-approval)
- check_wsteth_balance: Check wallet's wstETH balance

Uses Lido's Direct Staking via Chainlink CCIP Custom Sender for
instant fastStake operations on Base. wstETH earns ~3-4% APY
through an increasing exchange rate.

Addresses WISHLIST.md item: "Stake/restake with Lido/Ether.fi"
@Kubudak90 Kubudak90 requested a review from murrlincoln as a code owner March 29, 2026 21:29
@cb-heimdall
Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions github-actions bot added action provider New action provider typescript labels Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants