You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// @notice The minimum maturity time in seconds for a tranche below which
/// it can be rolled over.
uint256 public minTrancheMaturitySec;
/// @notice The maximum maturity time in seconds for a tranche above which
/// it can NOT get added into the reserve.
uint256 public maxTrancheMaturitySec;
/// @notice The percentage of the reserve value to be held as mature tranches.
uint256 public matureValueTargetPerc;
each of these could easily fit in smaller sizes to pack them all into 1 storage slot. With some improvements to read-sites can probably save several thousand gas for every afterStateUpdate operation.
uint32 should be enough for the *Sec ones (136 years of maturity window)
*Perc should also fit in uint32 (100% * 10e16 fits in uint32)
The text was updated successfully, but these errors were encountered:
marktoda
changed the title
Consider improving packing in PerpetualBond.sol
Consider improving packing in PerpetualTranche.sol
Dec 8, 2022
each of these could easily fit in smaller sizes to pack them all into 1 storage slot. With some improvements to read-sites can probably save several thousand gas for every
afterStateUpdate
operation.uint32 should be enough for the *Sec ones (136 years of maturity window)
*Perc should also fit in uint32 (100% * 10e16 fits in uint32)
The text was updated successfully, but these errors were encountered: