Updating Quotas

Enable or adjust exposure to quota-based collateral tokens.

For Solidity implementation, see Updating Quotas.

Why

You update quotas when:

  • Enabling a quota token - Required before that token counts as collateral

  • Increasing exposure - Need more of a token to count toward health factor

  • Reducing exposure - Lower quota to reduce quota interest costs

  • Closing positions - Zero quotas before full debt repayment

Quotas control how much of a token's value counts as collateral. Without a quota, even holding a quota token contributes zero to your health factor.

What

updateQuota changes your quota for a specific token:

  1. If increasing from zero, the token is enabled as collateral

  2. If decreasing to zero, the token is disabled as collateral

  3. Quota increase may be limited by global capacity (per-pool limits)

  4. Quota interest accrues based on your quota amount

Key parameters:

  • token - The quota token address

  • quotaChange - Delta to apply (positive = increase, negative = decrease)

  • minQuota - Minimum acceptable resulting quota (prevents partial fills)

The minQuota parameter protects you: if the pool can only give you 80% of your requested quota, and you set minQuota to 100% of your request, the transaction reverts instead of accepting partial quota.

How

Decrease Quota

Zero Quota Entirely

Pass type(int96).min to disable quota completely:

Common Pattern: Enable Quota After Swap

After swapping into a quota token, you need to enable quota for it to count:

Gotchas

Check Quota Limits Before Requesting

Each quota token has a pool-wide limit. If the limit is reached, your request fails (or gets partial fill):

minQuota Prevents Partial Fills

If you need exactly 100 units of quota:

Per-Account Quota Maximum

Each account has an implicit max quota of 8 * maxDebt per asset. You cannot exceed this even if pool capacity exists.

Zero Quotas Before Zero Debt

You cannot have active quotas with zero debt. When closing an account:

Cannot Update Quotas on Zero-Debt Account

If your account has zero debt, quota updates fail. You must have active debt to hold quotas.

Quota Tokens vs Non-Quota Tokens

Not all tokens are quota tokens. Non-quota tokens:

  • Are enabled/disabled via enableToken/disableToken

  • Don't require quota to count as collateral

  • Have different risk parameters

Check if a token is quota-based by examining the Credit Manager configuration.

Forbidden Tokens Block Quota Increases

If your account has forbidden tokens enabled, you cannot increase any quotas. Disable forbidden tokens first.

See Also

Last updated