| name | walletconnect-staking |
| description | Manages the walletconnect-staking CLI for WCT token staking on Optimism. Use when the user wants to stake WCT, unstake, claim rewards, check staking status, or view WCT balance. |
WalletConnect Staking CLI
Goal
Operate the walletconnect-staking CLI to stake/unstake WCT tokens, claim staking rewards, and check positions on Optimism (chain ID 10).
When to use
- User asks to stake WCT tokens
- User asks to unstake or withdraw staked WCT
- User asks to claim staking rewards
- User asks about their staking position, APY, or rewards
- User asks about their WCT token balance
- User mentions
walletconnect-staking or WCT staking
When not to use
- User wants basic wallet connection without staking (use
walletconnect skill)
- User wants to bridge or swap tokens across chains (use
walletconnect skill — the swidge command)
- User is working on the staking-cli source code (just edit normally)
- User wants to interact with WCT on a chain other than Optimism
Prerequisites
- Project ID must be configured for write commands (stake, unstake, claim). Set globally with
walletconnect config set project-id <id> or override per-command with WALLETCONNECT_PROJECT_ID env var.
- Binary is at
packages/staking-cli/dist/cli.js (or globally linked as walletconnect-staking)
- Build first if needed:
npm run build -w @walletconnect/staking-cli
Commands
walletconnect-staking stake <amount> <weeks>
walletconnect-staking unstake
walletconnect-staking claim
walletconnect-staking status --address=0x...
walletconnect-staking balance --address=0x...
Default workflow
For write commands (stake, unstake, claim)
- Ensure project ID is configured (
walletconnect config get project-id)
- Run the command — CLI auto-restores session or prompts QR connection
- The session must include Optimism (eip155:10). If the existing session doesn't, the CLI disconnects and requests a new one
- Inform the user to confirm the transaction in their wallet app
- Use 60s+ timeout for all wallet interaction commands
For read-only commands (status, balance)
- Use
--address=0x... to skip wallet connection entirely
- Or let the CLI restore an existing session for the address
- No project ID needed when using
--address
Important notes
- Optimism only: All transactions happen on Optimism (chain ID 10)
- Lock duration: Stake lock time is rounded down to the nearest week boundary
- Approve flow:
stake automatically checks allowance and sends an approve tx first if needed
- Existing position:
stake detects existing positions and calls updateLock instead of createLock
- Unlock check:
unstake refuses to run if the lock hasn't expired yet
- Read-only shortcut:
status and balance work with just --address=0x..., no wallet connection needed
- APY formula:
APY = max((stakeWeight / 1M) * -0.06464 + 12.0808, 0), adjusted by min(weeks, 104) / 52
Validation checklist
Examples
Stake 100 WCT for 4 weeks
User: "Stake 100 WCT for a month"
Action: Run `walletconnect-staking stake 100 4`
Note: May send 2 transactions (approve + createLock/updateLock). Inform user to confirm each.
Check staking status
User: "What's my staking position for 0xABC...?"
Action: Run `walletconnect-staking status --address=0xABC...`
Note: No project ID or wallet connection needed.
Check WCT balance
User: "How much WCT do I have?"
Action: Run `walletconnect-staking balance --address=0x...`
Note: If no address provided, ask the user for one or use an existing session.