Vyper Vested Claims

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

Centralization Risk in Owner Functions

Description: The contract grants significant power to the owner, who can change the merkle root or rescue tokens at any time without restrictions. This creates a centralization risk where users must trust the owner not to abuse these privileges. Lines 159-165 (set_merkle_root) and lines 167-177 (rescue_tokens) grant powerful capabilities to the owner.

Impact: Users must trust that the owner will not:

  1. Change the merkle root to exclude legitimate users

  2. Rescue tokens that are meant to be claimed by users

Recommended Mitigation:

  1. Implement a timelock mechanism for sensitive owner actions

  2. Consider a multi-signature approach for critical functions

  3. Add restrictions to the rescue_tokens function to ensure it can only rescue tokens that aren't allocated to users:

    @external
    def rescue_tokens(to: address, amount: uint256):
    self.onlyOwner()
    # Get the contract balance
    contract_balance: uint256 = extcall IERC20(self.token).balanceOf(self)
    # Get the total unclaimed amount (requires additional tracking)
    assert amount <= contract_balance - self.total_allocated_amount, "Cannot rescue allocated tokens"
    log TokensRescued(to, amount)
    _success: bool = extcall IERC20(self.token).transfer(to, amount)
    assert _success, "Transfer failed"
Updates

Appeal created

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

[Invalid] Owner can call rescue_tokens and withdraw users tokens

The `owner` is trusted and the function `rescue_tokens` can be called only by the owner and only in case of emergency. This means the owner will not act maliciously and will not call the function without need. Also, issues realated to the malicious admin actions are invalid according to the CodeHawks documentation: https://support.cyfrin.io/en/articles/10059196-findings-validity

Support

FAQs

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