Gravita-Protocol / Gravita-SmartContracts

GNU General Public License v3.0
49 stars 31 forks source link

[VMO-02S] Inexistent Event Emission #373

Closed 0xfornax closed 1 year ago

0xfornax commented 1 year ago

VMO-02S: Inexistent Event Emission

Type Severity Location
Language Specific VesselManagerOperations.sol:L957-L965

Description:

The linked function adjusts a sensitive contract variable yet does not emit an event for it.

Example:

function setRedemptionSofteningParam(uint256 _redemptionSofteningParam) public {
    if (msg.sender != timelockAddress) {
        revert VesselManagerOperations__NotTimelock();
    }
    if (_redemptionSofteningParam < 9700 || _redemptionSofteningParam > 10000) {
        revert VesselManagerOperations__InvalidParam();
    }
    redemptionSofteningParam = _redemptionSofteningParam;
}

Recommendation:

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

0xfornax commented 1 year ago

Fixed.