When filling orders after do all calculations the function _fillOrder
tries to deposit the positive pnl to the user, balance but it does not take into account that the pnl deposit might make it go over the max and prevent deposit from other users
SettlementBranch::_fillOrder
L484
As seen it tries to deposit without the check of the depositMargin
of the TradingAccountBranch
where it took into account of the deposit cap
When the call to TradingAccount::deposit
is made the check is not there so it updates the marginCollateraType balance which might exceed the max and prevent further deposits
TradingAccount::deposit
L389
Futher deposit of other users can be prevented and also max deposits variable can be exceeded
Manual Review
A check to prevent the max deposit from being exceeded in the _fillOrder
function
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.