Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: medium
Invalid

Event Emission Before Sate Changes

Summary

The events TillIn, AddTokenBalance, etc., should be emitted after the state is reflected when the event is emitted. Emitting events before state changes could result in inconsistency.

Vulnerability Details

An event could be emitted with incorrect data if a transaction reverts after the event is emitted

Impact

These could lead to misleading event logs, making it difficult to audit the contract's history.

Tools Used

Manual review

CODE SNIPPET

function tillIn(
address accountAddress,
address tokenAddress,
uint256 amount,
bool isPointToken
) external payable;

Recommendations

Ensure all state changes occur before the event emission.

function tillIn(
address accountAddress,
address tokenAddress,
uint256 amount,
bool isPointToken
) external payable{
//state changes
emit TillIn(accountAddress,
tokenAddress, amount, isPointToken);
}
Updates

Lead Judging Commences

0xnevi Lead Judge
12 months ago
0xnevi Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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