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

Packing of variable in controller.sol #103

Open
code423n4 opened this issue Jul 14, 2021 · 0 comments
Open

Packing of variable in controller.sol #103

code423n4 opened this issue Jul 14, 2021 · 0 comments

Comments

@code423n4
Copy link
Contributor

Handle

JMukesh

Vulnerability details

Impact

if we declare - address public feeRecipient; with bool public depositsEnabled and
bool public depositsEnabled;

these variable can be packed in single slot , because they occupy total 22bytes of 32byte memory sloth

ex - address public feeRecipient
bool public depositsEnabled
bool public depositsEnabled

Proof of Concept

https://github.com/code-423n4/2021-07-wildcredit/blob/82c48d73fd27a9d4d5d4a395b3affcef4ef6c5c8/contracts/Controller.sol#L35

Tools Used

manual review

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Jul 14, 2021
code423n4 added a commit that referenced this issue Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants