The ZlpVault
contract does not enforce a strict deposit cap during the deposit
and mint
operations. Although the maxDeposit
function calculates the maximum allowable deposit, the value is not explicitly checked in the overridden deposit
and mint
functions. This could allow malicious or accidental over-depositing of assets, bypassing the intended cap.
These functions do not validate whether assets
(or the equivalent derived value from shares
) exceed the cap calculated in maxDeposit
.
While maxDeposit
returns the remaining allowable deposit based on the cap, its result is never used to enforce restrictions in the actual deposit logic.
An attacker or buggy interaction could deposit more assets than permitted by the cap, causing:
The vault to exceed its designed capacity, which might destabilize dependent systems.
A potential DoS vulnerability if over-deposits cause misalignment with downstream calculations or external dependencies.
Asset Overflow: The vault could accumulate more assets than intended, potentially disrupting liquidity balancing mechanisms.
Broken Invariants: Downstream systems relying on the deposit cap may malfunction.
Loss of Funds: Over-deposits could cause systemic issues leading to the loss of user or protocol funds.
deposit
FunctionUpdate the deposit
function to validate the assets
amount against maxDeposit
:
mint
FunctionUpdate the mint
function to ensure the derived assets
value does not exceed maxDeposit
:
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.