Skip to content
Business logic Audit finding Advanced

Defaulted Idle CV with pending withdrawals will permanently break stablecoin accounting

When a borrower defaults on an Idle credit vault, pending withdrawal requests from the previous epoch become unclaimable, but the protocol's accounting still counts them as real assets. This inflates the stablecoin's net asset value and mints unbacked USP, and the defaulted vault cannot be removed because its recorded value never reaches zero.

0x52 Follow with SafetyBytes and y4y

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-04-pareto-contest-judging/issues/148

Found by

0x52, SafetyBytes, y4y

Summary

IdleCDOEpochVariant.sol#L646-L652

/// @notice Claim a withdraw request from the vault. Can be done when at least 1 epoch passed
/// since last withdraw request
function claimWithdrawRequest() external {
  // underlyings requested, here we check that user waited at least one epoch and that borrower
  // did not default upon repayment (old requests can still be claimed)
  IdleCreditVault(strategy).claimWithdrawRequest(msg.sender);
}

When a borrower defaults after failing to pay interest or pending withdraws, the pending withdrawals of the previous epoch become unclaimable as the IdleCreditVault does not allows withdrawals to be claimed on the defaulted epoch.

ParetoDollarQueue.sol#L183-L193

  function scaledNAVCreditVault(address yieldSource, address vaultToken, IERC20Metadata token) internal view returns (uint256) {
    IIdleCDOEpochVariant cv = IIdleCDOEpochVariant(yieldSource);
    IIdleCreditVault strategy = IIdleCreditVault(cv.strategy());

    uint256 decimals = token.decimals();
@>  uint256 pending = strategy.withdrawsRequests(address(this)) * 10 ** (18 - decimals);
    uint256 instantPending = strategy.instantWithdrawsRequests(address(this)) * 10 ** (18 - decimals);
    // tranche balance in this contract (which have 18 decimals) * price (in underlying decimals) / 10 ** underlying decimals
    // we also need to add eventual pending withdraw requests (both normal and instant) as these requests burn tranche tokens
@>  return IERC20Metadata(vaultToken).balanceOf(address(this)) * cv.virtualPrice(cv.AATranche()) / (10 ** decimals) + pending + instantPending;
  }

As a result of this, scaledNAVCreditVault will forever account for these assets as real assets even though they are unclaimable, erroneously inflating the NAV of the stablecoin.

ParetoDollarQueue.sol#L605-L633

  function removeYieldSource(address _source) external {
    _checkOwner();

    YieldSource memory _ys = yieldSources[_source];
    // revert if the token is not in the yield sources
    if (address(_ys.source) == address(0)) {
      revert YieldSourceInvalid();
    }
    // revert if the yield source is not empty, no need to unscale the value
@>  if (getCollateralsYieldSourceScaled(_source) > 0) {
      revert YieldSourceNotEmpty();
    }
    // remove allowance for the yield source
    _ys.token.safeDecreaseAllowance(_source, _ys.token.allowance(address(this), _source));
    // remove the yield source from mapping
    delete yieldSources[_source];
    // remove the source from the list of all yield sources
    // order is not preserved but it's not important (last el can be reallocated)
    YieldSource[] memory _sources = allYieldSources;
    uint256 sourcesLen = _sources.length;
    for (uint256 i = 0; i < sourcesLen; i++) {
      if (address(_sources[i].source) == address(_ys.source)) {
        allYieldSources[i] = _sources[sourcesLen - 1];
        allYieldSources.pop();
        break;
      }
    }
    emit YieldSourceRemoved(_source);
  }

In addition to the phantom value that will inflate the assets of the USP and cause unbacked USP to be minted, the defaulted vault will be impossible to remove due to the check ensuring that the yield source is empty. With other assets, the owner could simply remove the tokens using the emergencyUtils but in this case since the pending is hard coded. The result is that the defaulted credit vault and it's unclaimable pending withdraws will be permanently stuck on the balance sheet.

Root Cause

Same epoch pending withdrawals are unclaimable upon CV default

ParetoDollarQueue.sol#L188 hard codes pending withdrawals

ParetoDollarQueue.sol#L614-L616 cannot be bypassed and reverts if NAV != 0

Internal Pre-conditions

None

External Pre-conditions

Idle CV defaults

Attack Path

N/A

Impact

Erroneous value is permanently stuck on USP balance sheet causing unbacked USP to be minted

PoC

N/A

Mitigation

The check in ParetoDollarQueue.sol#L614-L616 should be bypassed if the CV being removed has defaulted.

Discussion

sherlock-admin2

The protocol team fixed this issue in the following PRs/commits: https://github.com/pareto-credit/USP/pull/7

The original report as published on Sherlock, by 0x52. 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 accounting function hard-codes pending withdrawal amounts as assets without checking whether the vault has defaulted and those withdrawals are unclaimable, and the removal function refuses to remove a vault with non-zero recorded value.

Impact

The defaulted vault's unclaimable pending withdrawals remain permanently on the balance sheet, inflating NAV and causing unbacked USP to be minted; the vault also cannot be removed.

What the attacker needed

Idle credit vault defaults

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 stablecoin called USP holds assets in various vaults to back its value. When one vault's borrower defaults, some withdrawal requests can no longer be claimed, but the system still counts that money as if it were there. This makes the stablecoin appear more backed than it is, and the broken vault cannot be removed from the system.

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 0x52

View all

211 more disclosed reports, best first.

More from Pareto USP, a credit-backed synthetic dollar

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.