Inconsistent Naming:
In the removeBoostDelegation
function, the event emitted is DelegationRemoved
, which is good. However, in the delegateBoost
function, the event emitted is BoostDelegated
. For consistency, consider renaming BoostDelegated
to DelegationCreated
or BoostDelegationCreated
.
Recommendation: Rename the BoostDelegated
event to BoostDelegationCreated
for consistency.
Redundant Check in modifySupportedPool
:
The require statement if (supportedPools[pool] == isSupported) revert PoolNotSupported();
should be revert PoolAlreadySupported()
or revert PoolSupportStatusUnchanged()
.
Recommendation: Change the revert reason to PoolSupportStatusUnchanged()
.
Magic Number:
In the updateUserBoost
function, the base amount 10000
is hardcoded.
Recommendation: Consider defining this as a constant for better readability and maintainability.
Missing Events:
Consider emitting an event when boost delegation is removed by the delegator, not just the recipient. This provides more transparency.
Gas Optimization Considerations:
Unnecessary Reads: In removeBoostDelegation
, poolBoosts[msg.sender]
is read, but msg.sender
is the address that delegated to, not the pool.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.