Omniscia Moby Audit

YieldToken Static Analysis Findings

YieldToken Static Analysis Findings

YTN-01S: Inexistent Event Emissions

Description:

The linked functions adjust sensitive contract variables yet do not emit an event for it.

Example:

contracts/tokens/YieldToken.sol
50function setYieldTrackers(address[] memory _yieldTrackers) external onlyAdmin {
51 yieldTrackers = _yieldTrackers;
52}

Recommendation:

We advise an event to be declared and correspondingly emitted for each function to ensure off-chain processes can properly react to this system adjustment.

Alleviation (a8720219a6a97e10b8d9c6a70c6345747f0fdcb3):

The SetInfo, SetYieldTrackers, SetInWhitelistMode, SetWhitelistedHandler, UpdateNonStakingAccount, and UpdateNonStakingAccount events were introduced to the codebase and are correspondingly emitted in the YieldToken::setInfo, YieldToken::setYieldTrackers, YieldToken::setInWhitelistMode, YieldToken::setWhitelistedHandler, YieldToken::addNonStakingAccount, and YieldToken::removeNonStakingAccount functions respectively, addressing this exhibit in full.