0

I'm trying to grab information about NFT-to-ERC20 swaps conducted over 0x V4 (on Ethereum). My initial intention was to read ERC321OrderFilled events from https://etherscan.io/address/0xdef1c0ded9bec7f1a1670819833240f027b25eff. However, it appeared that there are very few of them - only a few hundred starting block 17000000, for example. My assumption was that this scenario (swap NFT to ERC20) should be very popular for OTC sales, and I'd expect much more transactions with ERC721 orders. So I wonder if that's the right direction to find such swaps. Otherwise, what event will be generated in a typical NFT-ERC20 swap?

Another assumption - V4 is just not used for such swaps in general, and it is rather worth looking for older versions - V2.1 or V3.

Any advice would be appreciated.

1 Answer 1

0

To determine the most appropriate version for tracking NFT-to-ERC20 swaps, let's outline the potential ways such swaps could be represented:

ERC721OrderFilled Event in 0x V4: As you mentioned, the V4 version introduced the ERC721OrderFilled event to represent the trading of NFTs. If you're seeing only a few of these events, it could indicate limited usage of this specific feature in V4.

ERC20AssetProxy and ERC721AssetProxy in 0x V2/V3: In 0x V2 and V3, assets, including NFTs and ERC20 tokens, were represented using asset proxies. For example, ERC20AssetProxy and ERC721AssetProxy were used to represent ERC20 and ERC721 assets, respectively. In such versions, you might want to look for Fill or MatchedOrders events, and then decode the asset data fields to determine if an NFT was involved.

Other platforms and OTC deals: Remember that OTC (over-the-counter) deals may not always occur on popular decentralized exchanges or platforms. Some might be facilitated directly between parties or on other platforms.

To determine the best strategy:

Analyze the previous versions: Check the 0x V2 and V3 contract events to determine if there's a higher occurrence of NFT-to-ERC20 trades there.

Expand your search: Remember that not all OTC deals or NFT trades occur on 0x. Consider looking at other popular decentralized exchanges or platforms that might facilitate such swaps.

2
  • Wow, thanks for your reply! It helps a lot!
    – Andrey G
    Aug 8 at 14:24
  • Yes, I decided to start with 0x because sudoswap used to use it for OTC (before they switched to SudoAMM LPs), and sudoswap is a popular OTC platform for Ethereum. I do not have a goal to cover all possible OTC sales, because not even all of them involve special protocols. However, I would like to cover the most popular contracts. I will definitely explore all 0x versions. Can you recommend other popular swap platforms to focus on? Many thanks!
    – Andrey G
    Aug 8 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.