Potential reentrancy in collectWithdrawalFees()
function due to violation of CEI
#26
Labels
collectWithdrawalFees()
function due to violation of CEI
#26
Github username: --
Twitter username: --
Submission hash (on-chain): 0x5529151e09b33810031083f111e067ffb0d1a1e92844738f22635f16497c35a2
Severity: low
Description:
Description
In
Minter.sol
, an owner can callcollectWithdrawalFees()
to withdraw the fees. This function has usedsafeTransfer
which transfers the fees to receiver address.The issue here is that,
collectWithdrawalFees()
could allow reentrancy issue due to violation of Checks, Effects, Interaction pattern. where the effects are happening after transferring the tokens. It must be noted that, all external function calls must be performed at the end of functions and state should be updated before to it.Recommendations
Follow CEI pattern or add
nonReentranct
modifier oncollectWithdrawalFees()
to avoid reentrancy issues.The text was updated successfully, but these errors were encountered: