re-al-Foundation / rwa-contracts

0 stars 0 forks source link

[RDR-04S] Inexistent Sanitization of Input Addresses #17

Closed chasebrownn closed 6 months ago

chasebrownn commented 6 months ago

RDR-04S: Inexistent Sanitization of Input Addresses

Type Severity Location
Input Sanitization RevenueDistributor.sol:L118-L128

Description:

The linked function(s) accept address arguments yet do not properly sanitize them.

Impact:

The presence of zero-value addresses, especially in constructor implementations, can cause the contract to be permanently inoperable. These checks are advised as zero-value inputs are a common side-effect of off-chain software related bugs.

Example:

function initialize(
    address _admin,
    address _revStreamETH,
    address _veRwa
) external initializer {
    __Ownable_init(_admin);
    __UUPSUpgradeable_init();

    revStreamETH = RevenueStreamETH(payable(_revStreamETH));
    veRwaNFT = _veRwa;
}

Recommendation:

We advise some basic sanitization to be put in place by ensuring that each address specified is non-zero.

chasebrownn commented 6 months ago

Resolved. Except for _revStreamETH since we have an external setter we can call post-initialize