Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: low
Invalid

Improper Namespace NatSpec Tag for ERC-7201

Summary

Improper Namespace NatSpec Tag for ERC-7201

Vulnerability Details

Currently, the contract does not follow the NatSpec tag specification that should be annotated to the contract's struct for ERC-7201.

according to ERC-7201:

A namespace in a contract should be implemented as a struct type. These structs should be annotated with the NatSpec tag @custom:storage-location <FORMULA_ID>:<NAMESPACE_ID>, where <FORMULA_ID> identifies a formula used to compute the storage location where the namespace is rooted, based on the namespace id.

/// @notice ERC7201 storage location.
bytes32 internal constant ASSET_SWAP_STRATEGY_LOCATION =
keccak256(abi.encode(uint256(keccak256("fi.zaros.market-making.AssetSwapPath")) - 1));
/// @notice AssetSwapPath data storage struct.
struct Data {
bool enabled;
address[] assets;
uint128[] dexSwapStrategyIds;
}

Recommendations

Consider changing the namespace tag to @custom:storage-location erc7201:id to properly follow the ERC-7201 specification.

Updates

Lead Judging Commences

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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