Buyers can be tricked into buying fewer ERC1155 tokens while paying full price #477
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate
This issue or pull request already exists
Lines of code
https://github.com/code-423n4/2022-10-blur/blob/main/contracts/matchingPolicies/StandardPolicyERC1155.sol#L25-L30
https://github.com/code-423n4/2022-10-blur/blob/main/contracts/matchingPolicies/StandardPolicyERC1155.sol#L51-L56
Vulnerability details
Impact
Due to missing validation of sell and buy order amounts in
StandardPolicyERC1155
buyers may not get the amount of tokenthe wish to buy. Sellers can sell fewer tokens than buyers agreed to buy.
Proof of Concept
Unlike ERC721, ERC1155 allows to mint multiple tokens with the same ID. Thus, when matching buy and sell orders it's
critical to verify that amounts in the orders are matching. An example exploit scenario is when seller sells fewer tokens
than buyer expects to buy:
Recommended Mitigation Steps
In
StandardPolicyERC1155
, verify that both sell order and buy order amounts are matching.The text was updated successfully, but these errors were encountered: