Compute dollars and the vault
The shared balance is counted in compute dollars, written c$.
One compute dollar is a 1:1 claim on the USDC held in the book's vault. The vault is a token account whose authority is the book itself, so only the program can move what is in it. There is no separate token: depositing 100 USDC gives the book a balance of 100 c$, and the balance is always the vault's token amount.
Units
Amounts in the program are integers in base units with 6 decimals. 5_000_000 is 5 c$.
What moves the balance
| Instruction | Effect on the vault |
|---|---|
| deposit | tokens in, from the owner |
| earn | tokens in, from whoever pays the agent |
| spend | tokens out, to the payee |
| withdraw | tokens out, to the owner |
Every wallet under a book draws on the same vault. A wallet has limits, not a balance of its own.
NextWallets and limits