Parts to deal with
Credit line & inventory
Debt accounting:
baseDebt→ allocator’s nominal debt;debtIndex→ global scaler used for proportional adjustments (e.g., tail-loss socialization);allocatorDebt(a)andtotalAllocatorDebt()expose effective values.
Repayment:
allocatorRepay(asset, assets)pulls underlying from the allocator, skims borrow fee to treasury, converts the rest to 0x-equivalent, and reduces debt (capped to what’s outstanding).
Pockets & routing
Global pocket per asset + optional allocator-specific pocket per asset.
Users can include a referral code; UCE maps it to the allocator and:
Sends the non-reserved portion of inbound stables to that allocator’s pocket.
On 0xAsset outflows, consumes the allocator’s
reservedZeroXfirst if they’re the referrer.
Reserve buffer: UCE retains
reserveBpson-hand per asset (e.g., 25%) for low-latency settlements; the rest sits in pockets and can be deployed to Aave.
Redemption rate & tail-loss sink (why inventory matters)
If users redeem 0xAssets for stables and the system needs to mint to meet demand, a time-varying redemption surcharge rises to price scarcity.
If net shortfall persists, debt scaling lowers
debtIndex, writing down indebted allocators pro rata. Keeping inventory pre-provisioned reduces the chance your flow hits scarcity conditions.
Last updated