Beatland Festival

AI First Flight #4
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: low
Likelihood: medium
Invalid

No Way to Cancel or Modify Performances After Creation

Root + Impact

Description

  • Once a performance is created, there is no mechanism to cancel, modify, or deactivate it. If a performance is misconfigured (wrong time, wrong reward, etc.), it cannot be corrected, potentially leading to unintended economic consequences.


Risk

Likelihood:

  • * Performances are created by organizer who may make mistakes

    * No way to fix errors after creation

    * Performances cannot be cancelled for emergency situations

Impact:

  • * Cannot fix misconfigured performances

    * No emergency controls

    * Potential economic losses from incorrect configurations

Proof of Concept

```diff
+mapping(uint256 => bool) public performanceCancelled;
function cancelPerformance(uint256 performanceId) external onlyOrganizer {
+ require(performances[performanceId].startTime != 0, "Performance does not exist");
+ require(!isPerformanceActive(performanceId), "Cannot cancel active performance");
+ performanceCancelled[performanceId] = true;
+ emit PerformanceCancelled(performanceId);
}
function isPerformanceActive(uint256 performanceId) public view returns (bool) {
Performance memory perf = performances[performanceId];
+ if (performanceCancelled[performanceId]) return false;
return perf.startTime != 0 &&
block.timestamp >= perf.startTime &&
block.timestamp <= perf.endTime;
}
```

Recommended Mitigation

```diff
+mapping(uint256 => bool) public performanceCancelled;
function cancelPerformance(uint256 performanceId) external onlyOrganizer {
+ require(performances[performanceId].startTime != 0, "Performance does not exist");
+ require(!isPerformanceActive(performanceId), "Cannot cancel active performance");
+ performanceCancelled[performanceId] = true;
+ emit PerformanceCancelled(performanceId);
}
function isPerformanceActive(uint256 performanceId) public view returns (bool) {
Performance memory perf = performances[performanceId];
+ if (performanceCancelled[performanceId]) return false;
return perf.startTime != 0 &&
block.timestamp >= perf.startTime &&
block.timestamp <= perf.endTime;
}
```
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge 16 days ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!