prepare_kamino_borrow
Borrow assets from a Kamino reserve using existing collateral. Requires initialized Kamino account and valid market listing, with on-chain LTV protection.
Instructions
Build a Kamino borrow tx — pulls liquidity from a reserve as debt against the obligation's existing collateral. Refuses if the wallet hasn't run prepare_kamino_init_user; refuses if the mint isn't listed on Kamino's main market. On-chain LTV gate: borrow reverts if it would push the obligation over the reserve's borrowLimit (the simulation gate catches this before signing). DURABLE NONCE REQUIRED + same blind-sign treatment as prepare_kamino_supply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | Solana base58 wallet — must already have Kamino userMetadata + obligation. | |
| mint | Yes | Base58 SPL mint of the asset to borrow against the obligation's collateral. | |
| amount | Yes | Human-readable amount to borrow (e.g. "100" for 100 USDC). Decimals are resolved from the reserve's mint metadata. The on-chain program enforces the borrow LTV gate; if the borrow would push the obligation over the liquidation limit, the tx reverts (caught by the simulation gate). |