code-423n4 / 2021-10-tally-findings

0 stars 0 forks source link

`Swap.setSwapFee()` emits a `NewSwapFee` when the swap fee hasn't changed #66

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

pants

Vulnerability details

The function Swap.setSwapFee() emits a NewSwapFee when the value of swapFee_ equals the same swapFee from before that transaction and the swap fee hasn't changed.

Impact

This event is emitted although it shouldn't, so it can confuse users.

Tool Used

Manual code review.

Recommended Mitigation Steps

Emit this event only if swapFee_ doesn't equal the original swapFee, or revert when they are equal.

Shadowfiend commented 2 years ago

I think this is a 0-non-critical issue.

0xean commented 2 years ago

agree with sponsor per docs, events are referenced below

0 — Non-critical: Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas-optimisations.