Vyper Vested Claims

First Flight #34
Beginner FriendlyDeFi
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing Explicit ReentrancyGuard Protection

Description: While the contract follows the Checks-Effects-Interactions pattern (which mitigates reentrancy risks), it doesn't explicitly use a reentrancy guard. This could be a concern if future modifications accidentally break the CEI pattern. The claim function (lines 180-206) makes external calls after state changes, but relies solely on the CEI pattern for reentrancy protection.

Impact: The current implementation is safe from reentrancy attacks due to following the CEI pattern. However, future modifications might inadvertently break this pattern, introducing reentrancy vulnerabilities.

Recommended Mitigation: Add an explicit reentrancy guard to provide an additional layer of protection:

# Add a state variable
entered: bool
# Add a modifier
def nonReentrant():
assert not self.entered, "ReentrancyGuard: reentrant call"
self.entered = True
__pragma__('nonreentrant')
# Apply the modifier to functions that make external calls
@external
@nonReentrant
def claim(user: address, total_amount: uint256, proof: DynArray[bytes32, 20]) -> bool:
# ... existing code ...
Updates

Appeal created

bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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