The function does not emit events for critical actions like withdrawals, reducing transparency and auditability.
Summary
Lack of event emission makes it difficult to track withdrawals off-chain.
Vulnerability Details
Issue: The function does not emit events when funds are withdrawn.
Example: Without events, it is difficult to monitor or audit withdrawals.
Impact
Reduced transparency and auditability of the contract.
Tools Used
Manual Code Review
Recommendations
Emit events for critical actions like withdrawals.
event MarginWithdrawn(uint128 indexed tradingAccountId, address indexed collateral, uint256 amount);
function withdrawMarginUsd(...) external {
emit MarginWithdrawn(tradingAccountId, collateral, amount);
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.