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.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.