Getting started
How Yoke works
The pool, the credit account, its four token accounts, the two adapters, and the one-transaction moves that tie them together.
The pool
Lenders deposit USDC into one pool and receive shares. The pool lends that USDC to credit accounts and charges interest set by how much of it is lent out. Interest raises the value of every share; there is no protocol fee. See Supplying USDC.
The credit account
A credit account is an address derived from the pool and your wallet, owned by the Yoke program. Each wallet has one. It owns four token accounts, always in this order:
| Index | Token account | Holds |
|---|---|---|
| 0 | USDC | Cash: your collateral, borrowed funds, anything redeemed or removed |
| 1 | SOL | Wrapped SOL you brought, and the SOL side of anything removed from Orca |
| 2 | Save receipts | The reserve's collateral tokens from deposits into Save |
| 3 | Orca LP tokens | Your share of the Orca SOL–USDC pool |
Nothing else can be held, and the account can hold two positions at most: one in Save and one in Orca. The program alone signs for the account, and only through the instructions described in these docs.
Adapters
An adapter is the part of the program that calls another protocol on the account's behalf. Yoke has two:
- Save: deposit USDC into Save's USDC reserve, or redeem receipts back to USDC.
- Orca: add liquidity to the legacy SOL–USDC pool with both tokens, or remove it.
Each adapter checks every account it is handed against an immutable registry, calls the target, then checks what actually arrived in the account's token accounts against your slippage limits. Neither can swap, borrow from the target, or send tokens anywhere but the account's own token accounts. See Save and Orca.
Moves
Everything that changes the account's positions happens inside a move: one transaction with begin, up to nine adapter steps, and end. begin refuses to run unless the matching end is later in the same transaction; end checks the whole account. If anything fails, Solana reverts the whole transaction and none of it happened. See Moves.
Health
Health is what the account's holdings count for, divided by its debt. Holdings count only as the USDC they could be turned into, and only a share of that. A move, a borrow or an open has to end at 1.10 or more; below 1.00 the account can be liquidated. See Health.
Liquidation
Below 1.00, anyone can run a liquidation move on the account. It may only unwind positions, and its end repays the pool from the account's USDC and pays the liquidator 5% of what it repaid. See Liquidations.
Terms
| Term | Meaning |
|---|---|
| Collateral | What the account's holdings count for toward health, in USDC |
| Counted | The same thing, per holding |
| Debt | USDC owed to the pool, with interest, rounded up |
| Custody | The account's four token accounts |
| Receipt | A Save collateral token or an Orca LP token |
| Session | The program's name for a move: begin, adapter steps, end |
| Nonce | A counter on the account; each move uses the next one |
| Release | Taking an asset out of an account with no debt, without touching Save or Orca |