[Ethereum] Signing a message to sell NFT/token – what happens if you transfer the NFT later

dapp-developmentnftsignature

If you sign a message with intent to list an NFT/token for sale – how does that work if you transfer the item later?

For example on an NFT marketplace – you list your NFT for sale by signing a message. I'm assuming that signed message is a signed transaction to transfer the NFT to a contract that acts as a medium of exchange between buyer and seller.

But what if I sign that message – then transfer my NFT?

  1. List NFT for sale
  2. Site asks for Approval of NFT to be confirmed –
    tx sent
  3. Site asks for signature with listing details (price, etc)

I now exit site and send the NFT to my friend.
4. Someone fills that
listing for the NFT – but my NFT is gone
– how is the order filled?

Specifically I'm looking at a site like rarible – where that is the flow – they only get approval and thats it.

But I don't get how it works if you transfer that NFT?

Best Answer

The Ethereum transactions have a parameter called "nonce" representing the number of transactions sent from the address. You must increment this nonce each time you send a new transaction with the same address. So if you sign a transaction without broadcasting it, then send a new transaction to the network (with the same address and same nonce), the first raw transaction will automatically be rejected by the miners.

To answer (partially) your question that's not a transaction you sign but message data when you list your NFT for sale. Then you can see on their demo that after approving their contract, the user has to send a second transaction to mint the NFT. Are you sure the newly NFT is not sent on the marketplace contract ?

Related Topic