You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The _distributeRewards function in the BlockRewardHbbft contract contains a potential reentrancy vulnerability. Although the contract uses OpenZeppelin's ReentrancyGuard, the function makes an external call to TransferUtils.transferNative before updating the contract's state. This violates the checks-effects-interactions pattern.
Likelihood: Low
Description
The _distributeRewards function in the BlockRewardHbbft contract contains a potential reentrancy vulnerability. Although the contract uses OpenZeppelin's ReentrancyGuard, the function makes an external call to TransferUtils.transferNative before updating the contract's state. This violates the checks-effects-interactions pattern.
While the ReentrancyGuard provides some protection, it's still best practice to follow the checks-effects-interactions pattern to minimize risk.
Recommendation:
The text was updated successfully, but these errors were encountered: