prepare_marginfi_supply
Build an unsigned transaction to supply tokens into a MarginfiAccount, earning the bank's supply APY. Requires prior account initialization and durable nonce.
Instructions
Build an unsigned MarginFi SUPPLY tx for a given bank (by symbol or mint). Supplies the specified amount of the underlying token into the user's MarginfiAccount position in that bank, earning the bank's supply APY. DURABLE NONCE REQUIRED + prepare_marginfi_init must have run first; otherwise this tool errors. Pre-flight: bank-pause check; invalid-mint check (MarginFi only lists a subset of SPL tokens). Uses v0 VersionedTransaction + MarginFi group ALTs for compact wire size. BLIND-SIGN on Ledger — match the Message Hash on-device after preview_solana_send.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | Solana wallet executing the supply. Must have an initialized MarginfiAccount (run prepare_marginfi_init first) AND a durable-nonce account (prepare_solana_nonce_init). | |
| symbol | No | Canonical token symbol (USDC, SOL, USDT, JUP, BONK, JTO, mSOL, jitoSOL). The builder resolves this to the underlying mint; MarginFi treats SOL as wSOL internally with auto-wrap/unwrap. Pass `mint` instead if your token isn't in the canonical list. | |
| mint | No | Base58 SPL mint address. Used as an override or when the token isn't in the canonical SOLANA_TOKENS table. Exactly one of `symbol` or `mint` must be passed. | |
| accountIndex | No | MarginfiAccount slot (0 = first, 1 = second, ...). Most users stay on 0. Use a different index to segregate positions across multiple MarginfiAccounts owned by the same wallet. | |
| amount | Yes | Human-readable decimal amount to supply (e.g. "1.5" for 1.5 USDC). Decimals resolved from the bank's mint — do NOT pass raw base units. |