Blur Exchange contest - 0x52's results

An NFT exchange for the Blur marketplace.

General Information

Platform: Code4rena

Start Date: 05/10/2022

Pot Size: $50,000 USDC

Total HM: 2

Participants: 80

Period: 5 days

Judge: GalloDaSballo

Id: 168

League: ETH

Blur Exchange

Findings Distribution

Researcher Performance

Rank: 33/80

Findings: 1

Award: $114.82

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2022-10-blur/blob/2fdaa6e13b544c8c11d1c022a575f16c3a72e3bf/contracts/matchingPolicies/StandardPolicyERC1155.sol#L12-L36 https://github.com/code-423n4/2022-10-blur/blob/2fdaa6e13b544c8c11d1c022a575f16c3a72e3bf/contracts/matchingPolicies/StandardPolicyERC1155.sol#L38-L62

Vulnerability details

Impact

Buyer doesn't receive the proper number of ERC1155 tokens

Proof of Concept

StandardPolicyERC1155#canMatchMakerAsk and canMatchMakerBid always return an amount of 1, instead of the amount of tokens listed in the sell order. This could be abused by listing multiple ERC1155 tokens. Since the buyer is supposed to receive multiple tokens, the order price can be much higher than it would be for a single token. When the order is filled the buyer will only receive 1 token but will have paid for multiple.

Tools Used

Manual Review

Modify the return value to confirm the amount between orders match and then return the proper amount to be sold:

return ( (makerAsk.side != takerBid.side) && (makerAsk.paymentToken == takerBid.paymentToken) && (makerAsk.collection == takerBid.collection) && (makerAsk.tokenId == takerBid.tokenId) && (makerAsk.matchingPolicy == takerBid.matchingPolicy) && (makerAsk.price == takerBid.price) && (makerAsk.amount == takerBid.amount), makerAsk.price, makerAsk.tokenId, makerAsk.amount, AssetType.ERC1155 );

#0 - GalloDaSballo

2022-10-13T22:27:11Z

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter