# Ledger & balances

## Buckets
- `cash` — deposits, withdrawn profits, withdrawal holds
- `bonus` — bonus grants, bonus trade PnL (non-withdrawable principal)

## Entry types
| Type | Bucket | Sign |
|------|--------|------|
| DEPOSIT | cash | + |
| BONUS_GRANT | bonus | + |
| TRADE_PNL | bonus/cash | +/- |
| BONUS_PROFIT_CONVERT | bonus -, cash + | |
| WITHDRAWAL_HOLD | cash | - |
| WITHDRAWAL_RELEASE | cash | + |
| PNL_ADJUSTMENT | internal | +/- |

## Withdrawable
`max(0, cash)` if: not frozen, no debt, no open positions, KYC approved.
