Skip to content
Business logic Audit finding Intermediate

VaultAdapter::multiplier not initialized can lead first borrows to have `utilizationRate` = 0

The VaultAdapter's multiplier storage variable starts at zero and is only ever multiplied, so when the first borrower pushes utilisation above the kink the multiplier stays zero and the computed interest rate collapses to zero. Early borrowers therefore pay less interest than intended and the protocol loses yield until utilisation drops below the kink and the multiplier is reset to the minimum.

HeckerTrieuTien Follow with magiccentaur and montecristo

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-07-cap-judging/issues/396

Found by

HeckerTrieuTien, magiccentaur, montecristo

Summary

InterestRate calculted in DebtToken::_nextInterestRate() is composed of 2 value: rate (marketRate or benchmarkRate) plus an utilizationRate. For an issue in VaultAdapter the utilizationRate for the first borrowers can be 0, leading to a lower cost for the users and a loss of yield for protocol.

Root Cause

https://github.com/sherlock-audit/2025-07-cap/blob/main/cap-contracts/contracts/oracle/libraries/VaultAdapter.sol#L27-L50

Rate is a function that changes the storage. utilization value is retrieved by rate under different cases.

https://github.com/sherlock-audit/2025-07-cap/blob/main/cap-contracts/contracts/oracle/libraries/VaultAdapter.sol#L79-L95

multiplier is a storage variable auto-initialized to 0. In _applySlopes if the first user borrows a large amount of tokens such that _utilization > slopes.kink we have this formula:

Solidity
 utilizationData.multiplier = utilizationData.multiplier
                * (1e27 + (1e27 * excess / (1e27 - slopes.kink)) * (_elapsed * $.rate / 1e27)) / 1e27;

utilizationData.multiplier will be multiplied for a number, but is 0 so final multiplier will be 0:

Solidity
 utilizationData.multiplier= 0 * (1e27 + (1e27 * excess / (1e27 - slopes.kink)) * (_elapsed * $.rate / 1e27)) / 1e27 = 0

So:

Solidity

            interestRate = (slopes.slope0 + (slopes.slope1 * excess / 1e27)) * utilizationData.multiplier / 1e27;

Solidity
interestRate = (slopes.slope0 + (slopes.slope1 * excess / 1e27)) * 0 / 1e27 = 0

The final interestRate will be 0 too. New utilizationData.multiplier is stored as 0. For a second borrower (if remains utilization > slopes.kink ) will have the same situation, and so on.

Series will be interrupted when, after some operations, we will have utilization < slopes.kink. Entering the else will set at least the multiplier to minMultiplier for:

Solidity
 if (utilizationData.multiplier < $.minMultiplier) {
utilizationData.multiplier = $.minMultiplier;
}

At that point, the storage will contain a number != 0.

Internal Pre-conditions

amount borrowed by first user must lead to utilization > slopes.kink.

External Pre-conditions

--

Attack Path

  1. First agent borrows a large amount of tokens such that: utilization > slopes.kink .
  2. New value stored as multiplier: 0.
  3. InterestRate (from utilization) is 0.
  4. As long as the condition utilization > slopes.kink remains valid other agents can borrow at the basic condition interest because the new multiplier that should be used is always multiplied by the old one which is 0 (and the new value will be too).

Impact

Under the conditions, early borrowers borrow with a interest rate lower than expected. The protocol will receive less interests than it should. The higher the usage, the higher the interest to be paid should be, instead it is 0 (only the base interest will be paid).

PoC

--

Mitigation

Consider the initialization of multiplier at the neutral value.

The original report as published on Sherlock, by HeckerTrieuTien. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the multiplier storage variable is never initialised to a non-zero neutral value, so multiplying it in the above-kink branch always yields zero.

Impact

Early borrowers pay a lower interest rate than expected and the protocol receives less interest than it should, though the effect ends once utilisation falls below the kink and the multiplier is set to the minimum.

What the attacker needed

First borrow pushes utilisation above kink

The fix

The multiplier should be initialised to its neutral value rather than left at zero.

How it was found

  1. The first borrower takes a large loan so that utilisation exceeds the kink.
  2. The new multiplier is stored as zero.
  3. The interest rate derived from utilisation is zero.
  4. While utilisation stays above the kink, further borrowers also get the base interest rate.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A lending protocol charges interest based on how much of the pool is borrowed. Here a stored number used in that calculation starts at zero and is only ever multiplied, so it can never grow from zero. When the first borrower takes a large loan, the interest rate is calculated as zero, so they pay only the base rate instead of the higher rate they should.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by HeckerTrieuTien

View all

3 more disclosed reports, best first.

More from Cap

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.