The delegateBoost function in the BoostController contract contains a flaw where users are unable to re-delegate their boost after the delegation period expires. If the recipient does not manually remove the expired delegation, the original delegator is permanently blocked from delegating again. This results in a usability issue, where users may find themselves unable to delegate boosts unless the recipient takes action.
The issue arises from the following line in the code:
This condition prevents any new delegation if there is already a delegation, even if the prior delegation has expired. For the original delegator to regain the ability to delegate, the recipient must manually call removeBoostDelegation after the delegation expires. If the recipient does not take this action, the original delegator is locked out from delegating again.
Permanent Delegation Lock: If the recipient does not manually remove the expired delegation, the original delegator will be permanently unable to delegate their boost.
User Dependence: The original delegator's ability to re-delegate is entirely dependent on the recipient, which introduces a usability issue and creates an unnecessary dependency on the recipient’s action.
Inability to Re-delegate: Users may be unable to delegate their boost again if the recipient does not actively manage expired delegations, reducing the flexibility of the system.
Fairness Issues: The system places an unfair burden on the recipient to manage expired delegations, limiting the usability of the delegation feature for the original delegator.
Manual Code Review
Allow Re-delegation After Expiry: Modify the delegateBoost function to permit re-delegation after the delegation period has expired, but still prevent multiple active delegations.
Automatically Clear Expired Delegations: To ensure that expired delegations do not block future delegations, clear expired delegations automatically before assigning a new one.
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.