Skip to content
$1,000,000 in security audit grants are live now, Apply here →

Security review · September 2024

Fee Update

for Magna

Guardian's review of Fee Update for Magna, published September 2024. The report records 3 findings, including 3 low.

Published
Review window
September 16, 2024
Language
Solidity
Chains
Ethereum, Base, Optimism, Polygon, Arbitrum, BNB Chain
Sector
Infrastructure
  • 0 Critical
  • 0 High
  • 0 Medium
  • 3 Low
  • 0 Informational

3 acknowledged

Findings 3

  1. L-01 Low Excess ETH Not Refunded Validation Acknowledged
    Location
    MerkleVester.sol: 619

    Description

    In the MerkleVester contract the _handleClaimFee function does not refund any native value sent if the claim fee is assigned to 0.

    Because of this ETH may become trapped in the MerkleVester contract without being able to be rescued as there is no native recovery method.

    Recommendation

    Consider reverting if the claim fee is 0 and the msg.value is nonzero.

  2. L-02 Low Fee Setter May Prevent Claims DoS Acknowledged
    Location
    MerkleVester.sol: 159

    Description

    With the setClaimFee function the fee setter may assign any claimFee value. Therefore the fee setter may frontrun users who are attempting to withdraw their allocations and raise the fee to higher than the value that was sent so that the withdrawal reverts.

    Claims may also be trivially prevented by assigning a claim fee which is extremely high. Thus no user will be able to afford to claim their allocation. This can serve as a way to revoke allocations for those which should be non-revokable.

    Recommendation

    Consider assigning either a hard cap for the claim fee or an immutable cap which can be assigned at construction time.

  3. L-03 Low feeCollector May DoS Claims DoS Acknowledged
    Location
    MerkleVester.sol: 623

    Description

    In the MerkleVester contract upon withdrawing the native fee is sent to the feeCollector. However if the feeCollector is assigned to a contract which cannot accept ether then all withdrawals will be DoS’d.

    Recommendation

    Be aware of this risk and clearly document it for users of Magna’s MerkleVester.

More from Magna

All 9 reports
  1. Staking Updates

    23 findings 23 findings: 3 low, 20 informational
  2. Airdrop Updates

    2 findings 2 findings: 1 low, 1 informational
  3. Direct Transfer

    9 findings 9 findings: 1 medium, 1 low, 7 informational
  4. Merkle Vester

    13 findings 13 findings: 1 medium, 6 low, 6 informational

Put your code through the same review.

This review started with a conversation about scope. Tell us what you are building and we will plan yours with you.

Get a quote