hats-finance / Intuition-0x538dbadc50cc87b281cd655f1edbc6ebda02a66a

The smart contracts of the Intuition protocol v1.
https://intuition.systems
Other
0 stars 1 forks source link

some fee setter lacks upper bound checks similar to entry/exit/protocol fees #68

Open hats-bug-reporter[bot] opened 4 days ago

hats-bug-reporter[bot] commented 4 days ago

Github username: -- Twitter username: -- Submission hash (on-chain): 0xf7a015f3ddf4340c4b05c50a50ed383c0990d8ac664a64fdd0e0f799156cf447 Severity: low

Description: Description\

The atomCreationProtocolFee and tripleCreationProtocolFee which is charged while atom and triple creation to users. The fee setter for these fees is implemented as:

    function setAtomCreationProtocolFee(uint256 atomCreationProtocolFee) external onlyAdmin {
        atomConfig.atomCreationProtocolFee = atomCreationProtocolFee;
    }

    function setTripleCreationProtocolFee(uint256 tripleCreationProtocolFee) external onlyAdmin {
        tripleConfig.tripleCreationProtocolFee = tripleCreationProtocolFee;
    }

Both of these functions does not have any upper limit/bound checks which means upto type(uint256).max, the fee value can be set.

This breaks the design inconsistency and users trust, transparency with intuition protocol as following functions are restricted to certain percentage of fee for entry/exit/protocol fees. These functions upper bound fee restriction can be checked here

Recommendation to fix\

Consider implementing upper bound or maximum fee checks for atomCreationProtocolFee and tripleCreationProtocolFee, similar to as done for entry/exit/protocol fees.