The veRAACToken contract includes functions to schedule and execute an emergency unlock mechanism (scheduleEmergencyUnlock and executeEmergencyUnlock), but setting emergencyUnlockEnabled = true currently has no further effect. Users and project owners may assume that once the emergency unlock is enabled, locked tokens can be immediately withdrawn or other emergency actions are available; however, there is no corresponding code that actually bypasses the standard lock restrictions.
• Missing Integration: Although emergencyUnlockEnabled is set to true upon calling executeEmergencyUnlock, it is never referenced or checked anywhere else in the contract. Consequently, no behavior changes when the variable is toggled.
• Potential Misconfiguration: If the project’s design requires an emergency unlock to allow withdrawals before the lock end, that functionality is incomplete. The absence of conditions in withdraw() or other relevant functions means that the lock period remains enforced regardless of the emergency unlock flag.
• False Sense of Security: Owners and users might incorrectly assume that the emergency mechanism will allow early unlocking of tokens, leading to unexpected outcomes in an actual emergency.
• Inoperative Emergency Feature: During a real crisis (e.g., security breach, protocol migration), stakeholders could be unable to unlock their tokens prematurely if they rely on this flag.
• Reputation and Trust: The contract claims to provide an emergency unlock mechanism, but its partial implementation can erode trust if it fails to operate as expected.
• Implementation Risk: If left unaddressed, this incomplete feature might be exploited or remain a source of confusion in the future code updates or audits.
• Manual Code Review: Carefully examined the emergency unlock workflow and traced how the emergencyUnlockEnabled variable is set and used throughout the contract.
1. Implement Emergency Unlock Checks:
• In withdraw() or in a dedicated function, add logic that allows locked tokens to be withdrawn if emergencyUnlockEnabled is true. This should override normal lock expiration checks.
2. Remove Unused Code If Not Needed:
• If the project no longer requires an emergency unlock feature, remove the scheduling and execution functions as well as emergencyUnlockEnabled to avoid confusion.
3. Document Intended Behavior:
• Clearly specify in the contract’s documentation or README how the emergency unlock is expected to work, including any constraints or trade-offs (e.g., penalty fees, partial unlock).
4. Add Tests for Emergency Scenarios:
• Ensure that unit tests confirm the emergency unlock process correctly bypasses lock constraints once enabled, and that scheduling remains subject to the timelock.
By addressing these points, the emergency unlock logic will either function as intended or be removed altogether, thereby reducing confusion and potential misinterpretation of the contract’s capabilities.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.