Borrow

Moves

One transaction that moves funds between cash, Save and Orca: begin, up to nine steps, end. Either all of it lands healthy or none of it happens.

The shape of a move

Text
begin(nonce, mode 0, end index)
  adapter step 1
  adapter step 2
  …                     up to nine steps
end(nonce, withdraw USDC, withdraw SOL)

begin reads the transaction's own instruction list and refuses to start unless a Yoke end with the same nonce sits at the stated index, with exactly the same accounts. Every instruction between them must be a Yoke adapter step with that nonce and those accounts: no token transfers, no other programs, no second begin. Every Yoke instruction in a move must be top-level, so no other program can call into the middle of it.

end pays out any withdrawal, values the whole account, and requires health of 1.10 or more. If any step or the final check fails, Solana reverts the transaction and nothing in it happened.

Steps

StepIn the appAmountLimits you set
0Deposit into SaveUSDC to depositFewest receipts to accept
1Redeem from SaveReceipts to redeemLeast USDC to accept
2Add Orca liquidityLP tokens to mintMost USDC and most SOL to spend
3Remove Orca liquidityLP tokens to burnLeast USDC and least SOL to accept

After each call into Save or Orca, the adapter checks how much actually arrived in or left the account's token accounts against those limits. A step that lands outside them fails with error 704, and the whole move reverts.

The app lets you enter Save and Orca steps in USDC and converts them at the targets' current state, with a slippage limit of 0.1%, 0.5% or 1%. Orca deposits take USDC and SOL in the pool's ratio, so the account needs SOL beside the USDC; the app shows how much SOL each deposit pairs with.

Withdrawals

end can send USDC and SOL from the account to the owner's wallet. In the app these are the Send USDC to wallet and Send SOL to wallet steps; they always happen last, after every adapter step, and the 1.10 check runs after they leave. Sending SOL never changes health, because SOL counts for nothing.

Simulation

The app rebuilds and simulates the move against the chain every time a step or amount changes. The account picture shows a dashed outline of where the move would leave it. If the program would reject it, the reason appears in words before you sign, naming the step that failed.

Size and compute

Every move lists all four token accounts and all sixteen Save and Orca accounts, because end values the whole account. Moves are version 0 transactions and use the deployment's address lookup table to fit Solana's 1,232-byte limit. A move with a Save deposit and an Orca deposit uses about 391,000 compute units; the app asks for 1,000,000.

Modes

The same begin … end frame serves three purposes, set by begin's mode:

ModeWhoSteps allowedWhat end does
0, moveOwnerAll fourOptional withdrawals, then requires 1.10
1, closeOwnerRedeem and remove onlyRequires no receipts left, repays the debt in full, returns everything
2, liquidationAnyone, below 1.00Redeem and remove onlyRepays the pool, pays the liquidator 5% of the repayment

See Closing and release and Liquidations.

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.