Wombatexchange coverage ratio measures each asset’s cash against its liabilities
Last updated:Wombatexchange coverage ratio is the amount of recorded cash for one pool asset divided by that asset’s liabilities. It shows how much of the pool’s obligation in that token its recorded cash covers. A ratio of 1 means cash equals liabilities; below 1 means less cash, and above 1 means more cash. A same-pool swap changes those cash balances without creating new liquidity-provider (LP) claims. The pricing curve uses that movement to determine exchange output. Deposits and withdrawals also change liabilities, with adjustments that discourage withdrawal arbitrage. Interpreting coverage therefore requires the asset’s cash, its liabilities, and the applicable pool mechanism.
Identical coverage percentages can describe different cash balances, so an asset’s ratio alone cannot establish a trade’s available output.
Swap Direction Moves Each Asset’s Coverage
A same-pool swap raises the input asset’s coverage and lowers the output asset’s coverage through changes in recorded cash. The exchanged tokens change hands while LP liabilities remain unchanged during the swap calculation. Persistent buying of an asset therefore leaves fewer of its units covering the same liability. Supplying that asset through a swap moves its cash balance in the opposite direction. This gives the pricing mechanism a measure of scarcity relative to LP claims, even when assets have different deposit totals.
Recorded Cash and Liabilities Define the Fraction
Recorded cash is the token amount that the pool counts in an asset’s liquidity accounting. Liability records the obligation associated with deposited liquidity and credited dividends. Both quantities refer to the same underlying token, making their quotient dimensionless. Expressing the quotient as a percentage changes its display without changing its meaning.
For positive liability, r = C / L, where C is recorded cash and L is recorded liability. A cash balance alone cannot express coverage because its denominator is missing. Liability also differs from the number of LP tokens that holders own. The LP exchange rate connects LP supply to underlying liabilities, which matters when fee income increases each token’s underlying claim.
How Does Coverage Determine a Swap Quote?
Coverage enters the stableswap invariant, which links the input and output assets through their liabilities and the amplification factor. The pegged-asset relationship is
Σ Lₓ(rₓ - A / rₓ) = D
, where A is amplification and D is the invariant value.
The calculation keeps D constant while solving for the output asset’s new cash balance. Both assets’ cash balances and liabilities enter the equation alongside trade size, so one ratio cannot independently establish the exchange rate.
A finite trade moves along the curve as it consumes output liquidity, and amplification determines the curve’s response. A larger order can produce a different average rate even when it starts from the same displayed coverage.
The haircut adds a separate swap charge, with an applicable high-coverage surcharge adding another adjustment to quoted output.
The swap’s minimum-output condition provides a separate execution limit. A swap reverts if its output at execution falls below that minimum, even when the output asset has sufficient cash. Coverage supplies a pricing input; the minimum received bounds the user’s accepted outcome.
Equal Coverage Can Hide Different Cash Balances
Scaling cash and liability by the same factor leaves coverage unchanged. Consider two pools holding the same underlying token, using hypothetical cash and liability amounts expressed in that token’s units.
The smaller pool records 1282.5 units of cash and 1425 units of liabilities. Dividing 1282.5 by 1425 gives 0.9, or 90% coverage. The larger pool records 2565 units of cash against 2850 units of liabilities. Its ratio is also 0.9, or 90%.
The second pool holds twice as much cash, despite the matching coverage percentages. Increasing cash alone would raise the ratio; increasing liability alone would lower it. These percentages cannot establish identical swap quotes, because trade size, the other asset’s state, and pool parameters also enter pricing.
Liquidity Adjustments Discourage Withdrawal Arbitrage
A deposit increases cash and creates an underlying liability for the LP position. A withdrawal removes cash and retires liability. Because both sides change, the ratio after either operation cannot be inferred from the cash movement alone. The curve determines the liability credited on deposit and the cash returned for the liability retired on withdrawal.
Deposit gain can increase the liquidity claim credited for a contribution. The withdrawal fee counters arbitrage that could drain liquidity through deposits and withdrawals. Strong imbalance can make the adjustment material, particularly when withdrawing an asset with low coverage. Withdrawal pricing uses the curve and withdrawal amount; the coverage deficit alone is not the fee percentage.
The v1 Pool implementation combines a withdrawal with a swap when paying out another supported asset. Choosing a better-covered payout asset can change the overall outcome, including the haircut on the swap component. In a pool with a high-coverage surcharge, that swap component can also encounter the surcharge’s limits.
Pool Equilibrium Combines Individual Positions
The global equilibrium coverage ratio, r*, is the common ratio that would describe the pool at equilibrium under its invariant. The curve and liability amounts determine r*, so a simple average of displayed percentages generally gives a different answer. In the pegged-asset model, a swap preserves D and the liabilities, preserving r* through the swap calculation. Individual ratios can still move in opposite directions. A pool-wide equilibrium measure and a low ratio for one token can therefore coexist.
Why Can High Coverage Trigger an Extra Swap Fee?
High coverage can trigger an additional swap fee when the input token accumulates in a pool that uses this protection. Selling a weakening asset into the pool raises its cash and coverage while taking other assets out. The surcharge discourages that drain. The fee applies to side-pool swaps and the wmxWOM, mWOM, and qWOM pools.
The v1 HighCovRatioFeePool implementation evaluates an exact-input swap’s projected input-asset ratio. A projected ratio above the configured start triggers a surcharge based on movement between the initial and final ratios. The implementation rejects a swap whose projected input-asset ratio exceeds its configured end ratio. A pre-trade reading below the start ratio can therefore still lead to an extra charge.
This swap surcharge does not apply to direct deposits or same-asset withdrawals. A withdrawal with a swap can encounter it.
Oracle Prices and the Limits of Token Coverage
Dynamic pools add relative oracle prices to the invariant, allowing assets with different unit values. In liquid-staking pools, those exchange rates come from the respective staking contracts. Token coverage still compares cash and liabilities in the same asset’s units. A price change can alter the global equilibrium ratio without behaving like an ordinary pegged-asset swap. Those calculations rely on the price input as well as liquidity accounting. Even an individual reading of 1, or 100%, only establishes equality between recorded token cash and liabilities.
Still have questions?
Can the Asset Contract’s Token Balance Replace Its Recorded Cash?
The token balance can include amounts outside recorded cash, so substituting it can overstate coverage. The v1 Pool accounting separates accrued fees and balances in the tip bucket from recorded cash. Only amounts that an accounting operation actually adds to cash enter the numerator. Coverage uses cash and liability from the matching Asset contract.
Which Decimal Scale Should I Use for Cash and Liability?
The documented Asset contract stores both cash and liability with 18 decimal places, so their common scale cancels in division. The underlying token can use another decimal count. When the underlying token’s decimals differ from 18, dividing its raw balance by an 18-decimal liability value mixes scales and produces an incorrect ratio.
Does the Same Token Have One Coverage Ratio Across All Pools?
Each pool asset has its own cash and liability records, so the same token can have different coverage ratios in different pools. The selected pool contract determines which Asset record belongs to that token. A matching ticker on another network does not establish matching liquidity or liability.
Is Coverage Defined When Liability Is Zero?
The cash-to-liability formula is undefined when its denominator is zero. That arithmetic boundary differs from the initialization rules used for a first deposit. In the published CoreV2 deposit calculation, zero existing liability takes a separate branch that credits the deposited amount without a deposit reward.
Who Can Change the High-Coverage Fee Thresholds?
The owner of a pool using HighCovRatioFeePool can change its start and end thresholds. Its setter requires the start ratio to be at least 1 and the end ratio to be no lower than the start. The settings use dimensionless coverage ratios.
Can a Swap Fail Before It Would Exhaust the Output Asset?
A swap can fail under a coverage guard even when some output cash would remain. The published v1 Pool implementation rejects a swap if the output asset’s post-swap coverage would fall below 1%, a precision safeguard. This is separate from the insufficient-cash check and any high-coverage limit on the input asset.