The totalVaultDeposits
variable in the LendingPool
contract does not accurately reflect the actual balance or value of the Curve vault due to untracked yield, interest, or losses generated by the vault’s strategies. This discrepancy can mislead any action relying on totalVaultDeposits
, potentially leading to suboptimal liquidity management , though core operations remain unaffected.
totalVaultDeposits
tracks the net amount of assets deposited into or withdrawn from the Curve vault (via _depositIntoVault()
and _withdrawFromVault()
). But, it does not account for any additional value (e.g., yield, interest, or losses) generated by the vault’s underlying strategies or price movements, as defined by the ICurveCrvUSDVault
interface.
The totalVaultDeposits
is incremented or decremented by the exact amount deposited or withdrawn, but it does not reflect:
Yield or interest accrued in the Curve vault (e.g., via curveVault.totalAssets()
or curveVault.pricePerShare()
).
Losses or changes in asset value due to vault strategies or market movements.
This discrepancy is exposed in LiquidityRebalanced
events and any external systems relying on totalVaultDeposits
for monitoring or analytics. However, _rebalanceLiquidity()
uses currentBuffer
(derived from IERC20.balanceOf(reserve.reserveRTokenAddress
)), not totalVaultDeposits
, ensuring that rebalancing decisions are based on actual on-hand liquidity, not the vault’s state.
If totalVaultDeposits
is used for liquidity reporting, it could misrepresent the protocol’s liquidity position
Manual Review
Update totalVaultDeposits
to reflect the vault’s actual asset value by querying curveVault.totalAssets()
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.