PositionTokens violates one of the MUST rules defined in EIP-1155
The PositionTokens contract initialises its ERC-1155 token with an empty metadata URI, which breaks the EIP-1155 requirement that the URI must point to a valid JSON metadata file. As a result, position tokens will not display names, images or attributes on marketplaces and explorers, and the contract offers no way to correct the URI later.
Source: https://github.com/sherlock-audit/2025-10-index-fun-order-book-contest-judging/issues/25
Found by
0xeix, axelot, merlin, sakibcy, typicalHuman
Summary
PositionTokens violates one of the MUST rules defined in [EIP-1155](https://eips.ethereum.org/EIPS/eip-1155#:~:text=in%20RFC%203986.-,The%20URI%20MUST%20point%20to%20a%20JSON%20file%20that%20conforms%20to%20the%20%22ERC%2D1155%20Metadata%20URI%20JSON%20Schema%22.,-%40return%20URI%20string).
The rule states:
“The URI MUST point to a JSON file that conforms to the ERC-1155 Metadata URI JSON Schema.”
However, in the current implementation, the URI is set to an empty string, violating this requirement.
Root Cause
In PositionTokens at https://github.com/sherlock-audit/2025-10-index-fun-order-book-contest/blob/main/orderbook-solidity/src/Token/PositionTokens.sol#L32, the contract initializes ERC1155 with the uri parameter set to an empty string.
This directly violates one of the MUST rules from EIP-1155.
Additionally, the sponsor’s README explicitly states that violations of MUST EIP rules should be considered medium severity issues.
Internal Preconditions
External Preconditions
Attack Path
Impact
This issue goes beyond a formal EIP-1155 rule violation:
- Incorrect Rendering on Marketplaces - Because the URI is empty, all position tokens will render incorrectly or not appear at all on NFT marketplaces, explorers, and indexing websites that rely on the ERC-1155 metadata standard. This prevents external interfaces from displaying token names, images, or attributes.
- Permanent Invalid Metadata - The contract does not provide a way to update or set the URI after deployment. As a result, all positions will permanently reference an invalid (empty) URI, and the protocol will have no ability to fix or correct metadata in the future.
- Specification Violation - This directly violates an EIP-1155 MUST rule, which by the sponsor’s README is considered a medium severity issue.
Overall, this negatively affects user experience, token discoverability, and integration with third-party platforms.
Proof of Concept (PoC)
Mitigation
Initialize PositionTokens with a valid URI that points to a proper ERC-1155 metadata JSON file.
Alternatively, introduce an admin-only function to update the URI if it needs to be set or changed after deployment.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
Position tokens will render incorrectly or not appear at all on NFT marketplaces, explorers and indexing sites, and the metadata cannot be fixed after deployment.
What the attacker needed
None
The fix
The contract should be initialised with a valid ERC-1155 metadata URI, or an admin-only function should be added to set or update the URI after deployment.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
ERC-1155 is a standard for tokens on Ethereum, and it says that each token must have a web address (a URI) that leads to a small JSON file describing the token's name, image and other details. This contract sets that address to nothing, so wallets and marketplaces cannot show what the token is. Because there is no function to change the address later, the tokens stay blank forever.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.