Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing Event Emission in withdrawMarginUsd

Description

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);

Updates

Lead Judging Commences

inallhonesty Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.