Skip to main content
Borrow at a fixed rate for a fixed term by depositing collateral and placing a borrow order in one transaction. Vaults fill the order from fixed-rate reserves, and the borrowed tokens go straight to your wallet.
1

Import Dependencies

2

Load Signer and Initialize Market

3

Create the Borrow Order

Define the loan: the token to borrow, the amount, the minimum term, how long the order stays open, and the highest rate you accept.
maxRateBps caps the reserve’s configured rate, not the APY. Fixed-rate reserves accrue interest per slot and mainnet slots are faster than the 500 ms the program assumes, so the APY a borrower pays is higher than the configured rate. totalBorrowAPYFixedRate() on the reserve returns it. enableAutoRolloverOnFilledBorrows rolls the loan into a new term at the end of the current one when liquidity allows.
Each market sets a minimum order value ($2 on the SOL/BTC Market); smaller orders are rejected with BorrowOrderValueTooSmall. Open orders count toward your LTV as if they were filled, and must stay at least 5% below max LTV.
4

Build Deposit and Order Instructions

Deposit SOL as collateral and place the order in the same transaction.
An obligation holds up to three borrow orders; orderIdx picks the slot to write. Fixed-rate borrowing uses the same VanillaObligation as variable-rate borrowing.
5

Fetch Lookup Tables

6

Build the Transaction

7

Sign and Send

Once confirmed, your SOL is deposited and the borrow order is open. It fills automatically, in one or more parts, while it’s open. Interest starts on each part when it fills, and the USDC goes straight to your wallet.