Omniscia Ultra Yield Audit

AddressUpdates Code Style Findings

AddressUpdates Code Style Findings

AUS-01C: Structure Tight-Packing

Description:

The AddressUpdateProposal structure can be tightly packed into a single 256-bit slot, reducing gas costs by a significant amount when dealing with data entries such as the BaseControlledAsyncRedeem contract's BaseAsyncRedeemStorage data entry.

Example:

src/utils/AddressUpdates.sol
4struct AddressUpdateProposal {
5 address addr;
6 uint256 timestamp;
7}

Recommendation:

We advise this to be done so by reducing the timestamp variable to a uint96 data type, ensuring that it can be tightly packed with the address variable that precedes it.

Alleviation (28f27853965de07fb79f4f2b5fed696d35120032):

The referenced data type was properly downcast to uint96, optimizing the code's storage gas cost significantly.