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

ADD-01 MitigationConfirmed #10

Open
c4-bot-4 opened this issue Apr 10, 2024 · 1 comment
Open

ADD-01 MitigationConfirmed #10

c4-bot-4 opened this issue Apr 10, 2024 · 1 comment
Labels
mitigation-confirmed MR-ADD-01 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-bot-4
Copy link
Contributor

Lines of code

Vulnerability details

C4 Issue

G06 : Switch the order of if statement to fail early saves 1 function call half of the times where function have SLOAD (Saves ~2100 Gas Half of the times)

G02 : Optimization Proposal for Withdraw Function in MagicSpend Contract

Mitigation

Gas optimization are correctly implemented as suggested.
Main point being the different order of operation/checks consumes less gas.

Changes are included into PR16

From the difference in gas snapshot there is a slightly decrease of gas usage for the patched version which is to be expected.

Conclusions

Successful Mitigation

@c4-judge
Copy link

3docSec marked the issue as satisfactory

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-ADD-01 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants