Project

One World
NFTDeFi
15,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing indexed fields in the `NativeMetaTransaction` contract.

Relevant GitHub Links

https://github.com/Cyfrin/2024-11-one-world/blob/1e872c7ab393c380010a507398d4b4caca1ae32b/contracts/meta-transaction/NativeMetaTransaction.sol#L12

Summary

No event parameters have been indexed in the NativeMetaTransaction contract.

Vulnerability Details

In Solidity indexed parameters allow for efficient filtering of logs on the blockchain.
This is crucial for off-chain applications that need to monitor specific events; indexed
data can be accessed directly from log entries without having to decode the entire event data.
However in the NativeMetaTransaction contract, no event have been indexed:

contract NativeMetaTransaction is EIP712Base {
/// ... The rest of code
// @audit missing indexed fields
@> event MetaTransactionExecuted(
address userAddress,
address relayerAddress,
bytes functionSignature,
bytes32 metaTXHash
);
/// ... The rest of code
}

Impact

Many possible impacts:

  • Difficulty in Filtering: Non-indexed fields cannot be efficiently filtered using the eth_getLogs RPC call or similar methods.

  • Limited Search Capabilities: Without indexing, searching for events based on specific values becomes computationally expensive and time-consuming.

  • Increased Data Processing: When working with non-indexed fields, off-chain applications often need to fetch and process all relevant events, then filter locally.

  • Reduced Real-time Capability: Due to the difficulty in filtering, real-time notifications or updates based on specific event values become challenging to implement.

Tools Used

Manual review.

Recommendations

contract NativeMetaTransaction is EIP712Base {
/// ... The rest of code
@> event MetaTransactionExecuted(
- address userAddress,
+ address indexed userAddress,
- address relayerAddress,
+ address indexed relayerAddress,
bytes functionSignature,
bytes32 metaTXHash
);
/// ... The rest of code
}
Updates

Lead Judging Commences

0xbrivan2 Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
0xbrivan2 Lead Judge 10 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.