Platform: Code4rena
Start Date: 14/06/2022
Pot Size: $50,000 USDC
Total HM: 19
Participants: 99
Period: 5 days
Judge: HardlyDifficult
Total Solo HM: 4
Id: 136
League: ETH
Rank: 15/99
Findings: 4
Award: $812.96
🌟 Selected for report: 1
🚀 Solo Findings: 0
455.8432 USDC - $455.84
The purpose of the doItemsIntersect()
function is to determine whether the buy and sell orders match. No duplication check is performed, and as a result qualifying items can be included multiple times in a sell order. As such, the following is possible:
This will generally not be possible for ERC-721 tokens as they are non-fungible. When trying to perform the second transfer the call will fail as the seller will no longer be the owner of that NFT. It's likely still possible to bypass this by using afterTransferHook
or onERC721Received
hook, but no risk was observed in this path.
https://gist.github.com/kylriley/4db98ba6c67035c91dc35f5a5560f56d
N/A
Validation should be added to order matching to ensure that there are no duplicate token IDs present.
#0 - nneverlander
2022-06-22T11:37:36Z
#1 - nneverlander
2022-07-05T11:30:10Z
276.9248 USDC - $276.92
If an NFT is sold that does not specify support for the ERC-721 or ERC-1155 standard interface, the sale will still succeed. In doing so, the seller will receive funds from the buyer, but the buyer will not receive any NFT from the seller. This could happen in the following cases:
supportsInterface()
function properly.https://gist.github.com/kylriley/3bf0e03d79b3d62dd5a9224ca00c4cb9
N/A
If neither the ERC-721 nor the ERC-1155 interface is supported the function should revert. An alternative approach would be to attempt a transferFrom
and check the balance before and after to ensure that it succeeded.
#0 - nneverlander
2022-06-22T11:09:47Z
#1 - nneverlander
2022-07-05T11:28:39Z
#2 - HardlyDifficult
2022-07-09T19:42:52Z
Selecting this report as the primary for the clear impact description and PoC code.
If supportsInterface
returns false for both 721 & 1155 then no NFT is transferred but funds are still sent to the seller.
A number of NFTs do not fully comply with the 721/1155 standards. Since the order is not canceled or the tx reverted, this seems like a High risk issue.
🌟 Selected for report: joestakey
Also found by: 0x1f8b, 0x29A, 0x52, 0xDjango, 0xNazgul, 0xNineDec, 0xf15ers, 0xkowloon, 0xmint, 8olidity, BowTiedWardens, Chom, Cityscape, Czar102, ElKu, FSchmoede, Funen, GimelSec, GreyArt, IllIllI, KIntern, Kaiziron, Kenshin, Lambda, MadWookie, MiloTruck, PPrieditis, Picodes, Ruhum, Sm4rty, StErMi, TerrierLover, TomJ, Treasure-Seeker, VAD37, WatchPug, Wayne, _Adam, a12jmx, abhinavmir, antonttc, apostle0x01, asutorufos, berndartmueller, cccz, cloudjunky, codexploder, cryptphi, csanuragjain, defsec, delfin454000, fatherOfBlocks, georgypetrov, hake, hansfriese, horsefacts, hyh, k, kenta, nxrblsrpr, oyc_109, peritoflores, rajatbeladiya, reassor, rfa, robee, sach1r0, saian, samruna, shenwilly, simon135, sorrynotsorry, sseefried, throttle, unforgiven, wagmi, zzzitron
48.9769 USDC - $48.98
MATCH_EXECUTOR
, WETH_TRANSFER_GAS_UNITS
and PROTOCOL_FEE_BPS
variables should use camel case as they are not constants. Using caps case gives the incorrect impression that they are immutable.setProtocolFee()
function should validate that the _protocolFeeBps
parameter is less than 10,000.updateWethTranferGas()
function should be updateWethTransferGas()
ordes
should be orders
* @notice Checks whether one to matches matches can be executed
- the first "matches" should be "many"#0 - nneverlander
2022-06-23T11:41:32Z
Duplicate
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0x29A, 0xAsm0d3us, 0xDjango, 0xKitsune, 0xNazgul, 0xf15ers, 0xkatana, 0xkowloon, BowTiedWardens, Chom, ElKu, FSchmoede, Funen, GimelSec, Kaiziron, Kenshin, Lambda, MadWookie, MiloTruck, PPrieditis, Picodes, PwnedNoMore, StErMi, Tadashi, TerrierLover, TomJ, Tomio, Wayne, Waze, _Adam, antonttc, apostle0x01, asutorufos, c3phas, codexploder, defsec, delfin454000, fatherOfBlocks, hake, hansfriese, hyh, joestakey, k, kenta, oyc_109, peritoflores, reassor, rfa, robee, sach1r0, simon135, slywaters, zer0dot
31.2156 USDC - $31.22
require
messagesReplacing all require
statements with custom errors will reduce the gas cost of deployment, as well as runtime costs when the revert condition is met.
#0 - nneverlander
2022-06-23T11:27:04Z
Duplicate