earn_deposit
Takes a vault token address (from earn-vaults lpToken.address), source token, amount and wallet, returns an unsigned EVM transaction that swaps + bridges + deposits in one step. Cross-chain supported: deposit from any chain into any vault. Uses LI.FI Composer under the hood. A 30 bps integrator fee is embedded. 0.001 USDC per call via x402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toChain | Yes | Vault chain ID | |
| slippage | No | Slippage tolerance (default 0.005 = 0.5%) | 0.005 |
| fromChain | Yes | Source chain ID (e.g. 8453, 137, 1) | |
| fromToken | Yes | Source token address (0x0…0 for native) | |
| fromAmount | Yes | Amount in smallest units (wei, 1e-6 USDC) | |
| vaultToken | Yes | Vault LP token address from earn-vaults | |
| fromAddress | Yes | Wallet that signs and receives vault tokens | |
| paymentProof | No | Payment proof: USDC tx hash on Polygon or Base (0x...) or Solana tx signature. Omit on the first call to receive the 402 payment instructions, pay, then call again with the proof. |