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

TessKimy - Missing gap on upgradable contract #218

Open
sherlock-admin2 opened this issue Nov 13, 2024 · 0 comments
Open

TessKimy - Missing gap on upgradable contract #218

sherlock-admin2 opened this issue Nov 13, 2024 · 0 comments

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Nov 13, 2024

TessKimy

Medium

Missing gap on upgradable contract

Summary

Missing gap on upgradable contract

Root Cause

Due to missing gap in Stablecoinhandler contract. Contract cannot be upgraded properly in future versions.

AmirX still can be upgradable using the last storage of the contract but we can't upgrade Stablecoinhandler and reflect those changes to AmirX contract. If we make any change on Stablecoinhandler, it will cause storage collusion due to improper handling.

Impact

Medium - Protocol can't upgrade Stablecoinhandler because in AmirX the state variables of the Stablecoinhandler is stored at the top of the AmirX contract and then the state variables of AmirX comes in the storage.

In conclusion, any change on Stablecoinhandler will overwrite to AmirX storage variables and the data will corrupted.

Mitigation

Add simple __gap at the end of the state variable definitions of Stablecoinhandler

@sherlock-admin3 sherlock-admin3 changed the title Glorious Beige Cuckoo - Missing gap on upgradable contract TessKimy - Missing gap on upgradable contract Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant