Category: Coding Mistakes
Missing correct event information
Informational Severity
Informational Impact
N/A Likelihood
Description
The event triggered in dequeue(...)
does not contain the dequeued order information but rather the order information of the remaining head.
if(isProvider) {
delete providerQueue[poolId][qm.providerHead++];
emit DequeueProvider(poolId, msg.sender, providerQueue[poolId][qm.providerHead]);
} else {
delete consumerQueue[poolId][qm.consumerHead++];
emit DequeueConsumer(poolId, msg.sender, consumerQueue[poolId][qm.consumerHead]);
}
Impact
Providing the removed order in the event would be more useful for event listeners.
Recommendations
Include the correct order information in the event dequeue event.
Remediation
This finding was remediated by Revest in commit 9177c788cb2f3304b16f1583696794f24e1a0a92
.