solution) at any time.
1. Set up
Takes about 15 minutes. Do it before the session if you can, because the install is large.1
Get the prerequisites
- Node.js 22.12 or newer (
node -v), with pnpm enabled:corepack enable. - An AI coding assistant, installed and signed in.
- A fresh EVM wallet in one browser extension (MetaMask, Rabby or Hana). Not a Safe or other smart-contract wallet.
- At least $10 of USDC plus about $2 of ETH for gas on Base (Arbitrum works too). The fastest option is USDC plus a little S on Sonic, which skips the cross-network delivery step.
2
Fork the starter
Fork gosodax/sodax-leverage-yield-starter and untick “Copy the
main branch only”, so the checkpoint branches come with your fork.3
Clone your fork and run it
http://localhost:5173, click Connect wallet, and check that your address appears top right.No API key required. The starter and the
/v1/leverage-yield/* API are keyless today. You can still use a SODAX API key: it attributes your traffic to your organisation, and it will be required once key enforcement is switched on. This is a browser app, so the key belongs behind your own backend proxy, never in the SodaxProvider config. See API key good practices.2. Build it with AI
The repo gives your AI no SODAX-specific help. The prompts send it to the AI integration guide, and the guide tells it the rest. Paste them as-is into any AI.All at once (recommended)
With a capable model (Claude Opus 5.5, Codex Sol 6 or similar), one prompt builds the whole app:Milestone by milestone
Use this path with a lighter model, or to watch each step come together. Only M1 points your AI at the guide, so run M2–M4 in the same session, or give a fresh session the guide link again. The app also shows the next prompt at the top of the page, with a Copy button, and links the checkpoint builds still ahead of you, so you can see the target before you build it.M1 — Deposit form + live quote
M1 — Deposit form + live quote
M3 — Vault browser
M3 — Vault browser
M4 — Withdraw
M4 — Withdraw
Bonus — Rebrand
Bonus — Rebrand
solution build.3. Show your solution
1
Commit to a branch on your fork
2
Open a pull request
Open a PR from your branch to gosodax/sodax-leverage-yield-starter. In the description, include a screenshot or short video, your deposit transaction link, the AI you used, and anything you built beyond the milestones.
Troubleshooting
The full table is in the repo’s WORKSHOP.md.
How it works
- The vaults: pooled ERC-4626 vaults on Sonic. Each vault holds a liquid staking token, borrows against it and re-stakes up to a target LTV. That multiplies the staking yield, and the risk.
- A deposit: you sign one intent on your network (plus an approval the first time). SODAX delivers it to Sonic, and a solver fills it by delivering vault shares to your hub wallet.
- The risks: real funds, and leveraged positions (health factor ~1.2). The APR is variable and can go negative, the share price can fall, and the only exit is withdraw.
- The API option: everything the SDK does is also available through the keyless REST API at
https://api.sodax.com/v1/leverage-yield/*. Thesolutionbranch has a toggle that shows both.
Go further
AI integration guide
Everything your AI needs to build with SODAX.
Yield
Leverage-yield vaults as intent-based swaps.
HTTP API
Vault deposit and withdraw over HTTP.
SDK reference
@sodax/sdk deposit, withdraw, APR and position data.