defirisk.co
rubric v1.7.0

Oracle-manipulation-proof borrow cap

A economic risk factor in the v1.7.0 rubric. Measured per protocol on a s cadence.

Methodology how we score#

What this measures
This factor evaluates whether the protocol enforces a per-asset borrow cap that is calibrated to the manipulation-resistance of the oracle for that asset. Specifically, it checks whether the maximum single-transaction borrow amount is less than or equal to the oracle source pool depth multiplied by a manipulation-resistance multiplier (typically set at ten to twenty times). Sources include on-chain reads of borrow caps and DEX subgraph data for oracle source pool liquidity. This factor applies to lending protocols only.

Why it matters
Oracle manipulation attacks are profitable only when the borrowable value exceeds the cost of manipulation. Mango Markets ($115M, 2022) is the most extreme example in the dataset: the attacker used $5M in USDC to pump the MNGO token price thirty times higher, then borrowed against the inflated unrealized profit as collateral, draining all borrow liquidity across the protocol. An oracle-manipulation-proof borrow cap would have limited the attacker's maximum extractable value to a fraction of the oracle pool depth, making the attack economically non-viable. Without per-asset borrow caps, lending protocols with thin oracle liquidity are exposed to unbounded loss from oracle manipulation.

Green / Yellow / Red
Green: all assets have borrow caps set at or below the oracle pool depth times ten, with caps enforced on-chain and updated when oracle pool depth changes materially. Yellow: borrow caps exist but are set above the oracle pool depth times ten for one or more assets, or caps are not updated when oracle pool depth changes. Red: no per-asset borrow caps, or borrow caps are set at protocol-wide maximums unrelated to oracle pool depth.

Common gray cases
For assets with deep, multi-venue liquidity (e.g., ETH, USDC), the manipulation-resistance threshold is effectively unlimited and this factor scores green by default. The critical scoring cases are governance tokens and long-tail assets used as collateral.

Notable historical examples
- Mango Markets ($115M, 2022): No oracle-manipulation-proof borrow cap; attacker borrowed all available liquidity against a self-inflated MNGO position.

Measurement what to look for#

Determine whether the per-asset borrow cap is ≤ (oracle pool depth × manipulation-resistance multiplier).

Data & output #

Data source
On-chain borrow cap per asset via RPC + oracle pool depth from DEX subgraph (see F055)
Output format
Green / Yellow / Red
Evidence artifact
Borrow cap USD + oracle pool depth USD + derived manipulation-cost estimate
Confidence signal
green = borrow cap <10% of oracle pool depth (manipulation cost >> profit); yellow = 10–50% of pool depth; red = >50% of pool depth (profitable to manipulate oracle to max out borrow); gray = protocol does not use DEX-TWAP oracle (N/A)

Scored protocols 0 carry this factor#

No protocols have been scored for this factor yet.

Linked hacks 1 historical incident#

causalMango Markets: Self-funded MNGO spot price pump using two accounts → inflated unrealized collateral → lending pool drain2022-10-11 · $115M · Self-funded MNGO spot price pump using two accounts → inflated unrealized collateral → lending pool drain · Oracle-manipulation-proof borrow cap per asset [via cross-hack: Factor 42: Unrealized PnL Accepted as Borrowing Collateral]
rubric_version v1.7.0factor RD-F-073category 4carried 0critical no