Why Quotas?
Quotas solve several problems in a composable leverage protocol:- Risk Management: Limit exposure to volatile or less liquid collateral tokens
- Interest Differentiation: Charge different rates for different collateral types
- Protocol Revenue: Generate income from collateral diversity
- Market Incentives: Use dynamic rates to balance collateral demand
The underlying token never requires a quota—it’s always fully enabled as collateral. Quotas only apply to non-underlying tokens.
Quota Architecture
Pool Quota Keeper
The Pool Quota Keeper manages all quota-related operations:Token Quota Parameters
Each quoted token has global parameters:rate: Interest rate charged per year (e.g., 500 = 5%)cumulativeIndexLU: Additive index for calculating interestquotaIncreaseFee: One-time fee charged when quota increases (e.g., 1 = 0.01%)totalQuoted: Sum of all quotas across all credit accounts for this tokenlimit: Maximum allowedtotalQuoted(protocol risk limit)
Account Quota State
Each credit account tracks its quota per token:- Denominated in underlying tokens (e.g., USDC for USDC pool)
- Represents maximum collateral value from this token
- Acts as a cap on the token’s contribution to TWV
- Tracks last update time for interest calculation
- Uses additive (non-compounding) index
- Updated whenever quota changes or interest is accrued
Quota Interest Mechanics
Additive Index Model
Unlike base interest (which compounds), quota interest uses an additive model:- Simpler calculations
- More predictable costs
- Lower gas consumption
- Easier to reason about
Calculating Accrued Interest
- Interest doesn’t accrue on interest
- Growth is perfectly linear
- Easy to calculate for any time period
Updating Quotas
Update Quota Operation
Users update quotas through the credit facade:token: The collateral token to update quota forquotaChange: Amount to increase (positive) or decrease (negative) quotaminQuota: Minimum acceptable resulting quota (slippage protection)
quotaChange = type(int96).min: Disable quota completely (reduce to 0)quotaChange > 0: Increase quota, enable token if necessaryquotaChange < 0: Decrease quota, disable token if reaching 0
Update Flow
The quota update process involves multiple steps:Detailed Step Breakdown
Detailed Step Breakdown
1. Get Current State
- Retrieve account’s current quota and last update index
- If no quota exists, initialize to zero
- Calculate current cumulative index for the token
- Accounts for time elapsed and current rate
- Calculate interest accrued since last update
- Add to account’s cumulative quota interest
- Requested change may be limited by token quota limit
- Ensures
totalQuoteddoesn’t exceedlimit
- Only charged on quota increases
- Added to account’s
quotaFees
- Apply the quota change
- Store new quota and current index
- Validate against min/max bounds
- Increment or decrement
totalQuoted - Enforces protocol-wide token exposure limit
- Calculate change in annual quota revenue
- Notify pool to update expected liquidity
- Enable token when quota goes 0 → positive
- Disable token when quota goes positive → 0
- Update account’s
enabledTokensMask
Quota Limits
Multiple limits constrain quota updates:-
Token Limit (
TokenQuotaParams.limit)- Total quota across all accounts for a token
- Protocol-wide risk management
- Set by governance based on token liquidity and volatility
-
Account Limit (via facade
maxQuotaMultiplier)- Per-account quota limit
- Typically:
maxQuota = debt * maxQuotaMultiplier - Prevents excessive collateral concentration
-
User-Specified Bounds (
minQuota,maxQuotaparameters)- Slippage protection
- Ensures quota update meets expectations
- Prevents front-running quota limit changes
Quota Revenue
Revenue Calculation
Quota revenue represents the annual income from all quotas:Pool Revenue Updates
The pool tracks total quota revenue:- Quota interest accrues to credit accounts (increases debt)
- When repaid, goes to the pool (increases expected liquidity)
- Distributed to LPs through share price increase
- Protocol takes fee on quota interest (via
feeInterest)
Quota revenue provides yield to LPs even when pool utilization is low, incentivizing deposits during low-demand periods.
Quota Interest vs Base Interest
| Aspect | Base Interest | Quota Interest |
|---|---|---|
| Applied to | Debt principal | Quota amounts |
| Calculation | Compounding (exponential) | Additive (linear) |
| Index type | Multiplicative | Additive |
| Rate source | Interest rate model | Per-token governance |
| Rate updates | Every interaction | Gauge votes (periodic) |
| Repayment priority | After quota interest | Before base interest |
| Protocol fee | Yes (feeInterest) | Yes (feeInterest) |
Quota Management Strategies
When to Use Quotas
Farming with LP Tokens
Farming with LP Tokens
Use quotas when you want to keep yield-bearing assets as collateral:Benefits:
- Keep earning LP fees while borrowing
- Use leverage to amplify LP returns
- Maintain exposure to underlying assets
- Quota interest rate
- One-time quota increase fee
- Lower LT than underlying
Holding Volatile Assets
Holding Volatile Assets
Maintain exposure to non-stablecoin collateral:Benefits:
- Keep upside exposure to ETH
- Don’t need to sell ETH to borrow
- Can leverage multiple assets simultaneously
- Higher quota interest for volatile assets
- Risk of liquidation from price drops
- Quota limits may constrain position size
Diversified Collateral
Diversified Collateral
Spread risk across multiple collateral types:Benefits:
- Reduced concentration risk
- Protection if one asset depegs
- Optimized LT usage
- Multiple quota interest charges
- More complex management
- Higher gas costs
Quota Optimization
Right-sizing Quotas:- Wastes collateral (balance exceeds quota)
- Reduces effective health factor
- Pays interest on unused quota
- May hit account quota limits
Disabling Quotas
Before closing an account, all quotas must be disabled:- Accrue final quota interest
- Update account’s cumulative quota interest
- Set quota to 0
- Remove token from enabled mask
- Update pool quota revenue (decrease)
Rate Management
Setting Quota Rates
Governance sets quota rates through the gauge system:- Token volatility (higher for volatile assets)
- Market liquidity (higher for illiquid assets)
- Protocol exposure (higher when near limit)
- Competitive rates (compare to alternatives)
- Revenue targets (balance growth and usage)
Quota Increase Fees
One-time fees discourage quota churning:- Only charged on increases (not decreases)
- Proportional to increase amount
- Added to account’s
quotaFees - Repaid before all other debt components
- Go to protocol treasury
Monitoring Quotas
View Functions
Quota Utilization
< 50%: Low utilization, likely available capacity50-80%: Moderate utilization, monitor for increases80-95%: High utilization, increases may be limited> 95%: Near limit, new quotas likely unavailable
Best Practices
Cost Management
- Only enable quotas for tokens you need as collateral
- Right-size quotas to actual collateral value
- Disable unused quotas to stop interest accrual
- Compare quota rates across similar tokens
Risk Management
- Monitor token quota limits and utilization
- Understand each token’s liquidation threshold
- Account for quota interest in debt calculations
- Keep quota below account debt limits
Gas Optimization
- Batch quota updates with other operations
- Use multicall to update multiple quotas atomically
- Consider gas costs vs. interest savings
- Disable quotas before account closure
Health Maintenance
- Ensure quota covers your token balance value
- Adjust quotas when rebalancing collateral
- Account for one-time fees in health calculations
- Monitor effective LT with quota caps