In SettlementBranch, vulnerability exists in the logic for adding margin to a trading account where profit and loss (PnL) is positive. The current implementation does not verify the deposit cap or other relevant parameters before depositing margin. This can lead to exceeding deposit limits and potential misuse of the system.
The code directly deposits the margin without checking if the deposit will exceed the deposit cap.
The absence of a deposit cap check can lead to deposits exceeding the predefined limits, which can affect the overall risk management of the protocol.
Manual review
By adding the checks, the protocol can ensure that deposits are within the allowed limits, maintaining financial stability and preventing potential misuse.
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.