Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
code423n4 opened this issue Oct 22, 2021 · 2 comments
Open
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

Comments

@code423n4
Copy link
Contributor

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.

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Oct 22, 2021
code423n4 added a commit that referenced this issue Oct 22, 2021
@Shadowfiend Shadowfiend added 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 labels Oct 29, 2021
@Shadowfiend
Copy link
Collaborator

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

@0xean
Copy link
Collaborator

0xean commented Nov 6, 2021

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.

@0xean 0xean added 0 (Non-critical) Code style, clarity, syntax, versioning, off-chain monitoring (events etc), exclude gas optimisation and removed 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments labels Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants