Open code423n4 opened 2 years ago
I think this is a 0-non-critical issue.
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.
Handle
pants
Vulnerability details
The function
Swap.setSwapFee()
emits aNewSwapFee
when the value ofswapFee_
equals the sameswapFee
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 originalswapFee
, or revert when they are equal.