56845 sc high the deposit will be reverted because mytsharesdeposited references an outdated value
Submitted on Oct 21st 2025 at 07:19:02 UTC by @pashap9990 for Audit Comp | Alchemix V3
Report ID: #56845
Report Type: Smart Contract
Report severity: High
Target: https://github.com/alchemix-finance/v3-poc/blob/immunefi_audit/src/AlchemistV3.sol
Impacts:
Contract fails to deliver promised returns, but doesn't lose value
Description
Finding Description and Impact
_mytSharesDeposited shows how much collateral has been put into AlchemistV3. In addition, its value will go down once CDP holders take back their collateral. Nevertheless, it would not update after a CDP that will be liquidated, leading to denial of service.
Furthermore, users are prohibited from depositing into AlchemistV3 beyond the established capacity set by the owner. This implies that if _mytSharesDeposited exceeds the actual amount, the user cannot deposit, as _mytSharesDeposited + amount would surpass depositCap.
Textual PoC
Presume depositCap is 200,000
User A deposits 200,000 alUSD into AlchemistV3.(_mytSharesDeposited = 200,000)
User A will be susceptible to liquidation, resulting in the transfer of their collateral to
Transmitur, while_mytSharesDepositedremains at 200,000.Other users are unable to deposit, as AlchemistV3's capacity is at its limit.
Code Snippet
https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/AlchemistV3.sol#L549
https://github.com/alchemix-finance/v3-poc/blob/a192ab313c81ba3ab621d9ca1ee000110fbdd1e9/src/AlchemistV3.sol#L369
Proof of Concept
Proof of Concept
Please incorporate the following PoC in AlchemistV3.t.sol.
Was this helpful?