Omniscia Tangible Audit

USTB Code Style Findings

USTB Code Style Findings

UST-01C: Non-Uniform Storage Pattern

TypeSeverityLocation
Code StyleUSTB.sol:L29, L31

Description:

The overall codebase implements a pointer-based upgradeability-compatible storage pattern that is not applied in the USTB contract.

Example:

src/USTB.sol
24contract USTB is IUSTB, LayerZeroRebaseTokenUpgradeable, UUPSUpgradeable {
25 using SafeERC20 for IERC20;
26
27 address public constant UNDERLYING = 0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C;
28
29 address public rebaseIndexManager;
30
31 bool private _isMainChain;

Recommendation:

As is the case with all its dependencies, we advise the USTB contract to apply a similar pointer-based storage system.

Alleviation (3a0386718027f5d784cd2030ce58a9ed68ecc2eb):

The rebaseIndexManager variable was relocated to a dedicated USTBStorage struct per our recommendation whilst the _isMainChain variable has been made immutable and relocated to a new CrossChainToken dependency within the project, addressing this exhibit.