Open code423n4 opened 3 years ago
goatbug
2 slots instead of 3
struct Bounty { address token; uint256 amount; bool active; }
having token and active lines consecutive can pack those two values into single 256 bit slot. Result is packing this struct into 2 256 slots as opposed to 3.
Finding is valid, address and bool can pack together
Handle
goatbug
Vulnerability details
Impact
2 slots instead of 3
Proof of Concept
having token and active lines consecutive can pack those two values into single 256 bit slot. Result is packing this struct into 2 256 slots as opposed to 3.
Tools Used
Recommended Mitigation Steps