Swap.setSwapFee()
emits a NewSwapFee
when the swap fee hasn't changed
#66
Labels
0 (Non-critical)
Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
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.The text was updated successfully, but these errors were encountered: