Developers

Instructions

All nineteen instructions: their tag, arguments, who signs, and what each one checks before it changes anything.

Instruction data is one tag byte followed by Borsh-encoded arguments: little-endian integers, booleans as one byte. The SDK builds every one of them with the right accounts; the account lists here are in the SDK's source under instructions.ts.

Lending

TagInstructionArgumentsSignerChecks
2depositamount: u64, min_shares: u64LenderPool not paused, shares ≥ min_shares
3withdrawshares: u64, min_usdc: u64LenderEnough pool cash, USDC ≥ min_usdc

Credit accounts

TagInstructionArgumentsSignerChecks
4opencollateral: u64, borrow: u64OwnerNot paused, pool cash ≥ borrow, health ≥ 1.10 after
5add_collateralasset: u8 (0 USDC, 1 SOL), amount: u64OwnerNo move in progress
12borrowamount: u64OwnerNot paused, pool cash, health ≥ 1.10 after
6repayamount: u64AnyoneNo move in progress; charges at most amount
11releaseasset: u8 (0–3), amount: u64OwnerDebt is zero, no move in progress

Moves

TagInstructionArgumentsSignerChecks
7beginnonce: u64, mode: u8, end_index: u16Owner, or anyone for mode 2Matching end, only adapter steps between, mode 2 only below 1.00
8adapternonce: u64, action: u8, amount: u64, limit_a: u64, limit_b: u64Same as beginInside the active move; not paused unless unwinding; limits met
9endnonce: u64, withdraw_usdc: u64, withdraw_wsol: u64, write_off: boolSame as beginBy mode: see below

end by mode:

  • 0, move. Sends the withdrawals to the owner, then requires health ≥ 1.10.
  • 1, close. No withdrawals or write-off, no receipts left; repays the whole debt and sends all remaining USDC and SOL to the owner.
  • 2, liquidation. No withdrawals; repays up to the account's USDC × 10,000 ÷ 10,500 and pays the liquidator 5% of it. With write_off, requires no receipts left and writes off what remains unpaid. Otherwise, if debt remains, collateral ÷ debt may not have fallen.

Adapter actions

ActionTarget callamountlimit_alimit_bModes
0Save depositUSDC inLeast receipts outMust be 00
1Save redeemReceipts inLeast USDC outMust be 00, 1, 2
2Orca depositLP tokens outMost USDC inMost SOL in0
3Orca withdrawLP tokens in, fee includedLeast USDC outLeast SOL out0, 1, 2

Redeeming a whole dust balance may return zero USDC only when limit_a is zero; any other zero-output redemption fails.

Administration

TagInstructionArgumentsSignerChecks
0initialize_poolbase_bps, slope1_bps, slope2_bps, kink_bps: u16Program upgrade authorityOnce; kink strictly between 0 and 10,000; top rate ≤ 300%
1register_adaptersThe 433-byte adapter configPool adminOnce; every account checked against the live targets
10pausepaused: boolPool adminBefore the council exists
13create_council—Pool adminOnce; YOKE has six decimals, a minted supply and no mint or freeze authority; the council becomes the pool admin

Council and governance

TagInstructionArgumentsSignerChecks
14bondamount: u64OwnerMoves YOKE into the council vault
15unbondamount: u64OwnerThe bond holds no seat; at most what is bonded
16set_seatseat: u8, vacate: boolGovernanceSeat 0–4; the outgoing bond is released; the incoming bond holds no seat and at least 1,000,000 YOKE
17council_pausepaused: boolThree to five seated membersThe council is the pool admin; each signer holds a seat, none twice
18update_adaptersThe 433-byte adapter configGovernanceSame custody mints; every account checked against the live targets

Every instruction must be called directly by the transaction, except set_seat and update_adapters: SPL Governance runs those by CPI when a passed proposal executes.

Next

Yoke

One credit account across Save and Orca, on Solana.

Follow on X
© 2026 YokeYoke is software on Solana; every transaction is signed by your own wallet. Borrowing, lending and liquidating can lose money. Read the risks first.