Time To Redeem!

Time To Redeem!

As promised in my first?post?regarding the Ledger Stax NFT, I have decided to follow up with my redemption experience!

An interesting thing to note is that with the increase in price of ETH in recent months, the .42 ETH I purchased back in December 2022 for $507 is now equivalent to $787 today (4/22/2023). So one can argue that the .22 ETH I paid for my Ledger Stax is now worth $417. I guess not so good of an investment in hindsight, given the retail cost of $279.

An interesting side effect of owning an NFT is that NFT exchange sites like OpenSea and Rarible actively notify holders of offers for owners of NFTs. Looking inside my wallet I can see an offer for this redemption token for 0.145 WETH (wrapped ether).

No alt text provided for this image

Clicking on the OpenSea link you can see the offer is being made by?intelstrata. Clicking on his profile you can see he is the proud owner of a cryptopunk NFT (V1 PUNK #6054). He/She seems to have?paid?28.5 WETH back on March 13 2022, costing about $72k at the time. Fast forward to today the value of the NFT has dropped to $53k...Ouch!

No alt text provided for this image

Sorry for the sidetrack...

So back to my road to redemption!

Upon visting the redemption web site link on Ledger, I clicked on the "Claim" button and was presented with a new prompt. I was using a Coinbase wallet and clicked on "Wallet Connect".

No alt text provided for this image

I was then prompted to search for a preferred wallet. I tried searching for "Coinbase" but found nothing. After some research (i.e. Youtube) I realized I actually had to click on the Metamask image. A bit confusing since I already have a Metamask wallet, but that is not where the NFT was located.

No alt text provided for this image

It seemed to work though as I was next prompted to redeem my NFT.

No alt text provided for this image

Once I clicked on the "Checkout now" button the Ledger Stax web site came back to life and asked me for my physical address and contact information. Thankfully shipping is free!

No alt text provided for this image

Once I completed the checkout process I was given a contratulations message only to now wait and see what the next steps were. I checked my wallet and it still seemed like my NFT was still there, which led me to question if everything went through correctly. After a few minutes I received an email that my redemption was completed and upon hitting "refresh" on my wallet my NFT was now gone...Or shall we say burned...

No alt text provided for this image

The contract worked as expected and there was no double spend of my NFT...

No alt text provided for this image

o that's it! Well almost...This next part is a little more dense, but I wanted to try and unmask what was going on behind the scenes. Please know I am not a Solidity expert, the programming language that is used to create smart contracts on Ethereum, but I can read code and leveraged that knowledge to try and decipher the actions being taken. I welcome any feedback and comments to clarify any of the notes I am highlighting.

Ready? Let's go!

So going back to my original?transaction?purchasing the Ledger Stax NFT you can see from the interaction details my wallet actually faced off with the Ledger Stax smart contract found at this?address?(0xD3214Ef2Ae5327468521be8d567e587b38E8aD79).

The neat thing about the contract is that all transactions and even the contract code is fully auditable

No alt text provided for this image

Taking a look at the transfer history you can actually see my wallet address interacting with a "Null" wallet address. Essentially transfering my Stax NFT into the "ether" (pun intended).

No alt text provided for this image

If you click on the transaction details you can see the input data going into the contract.

One of the values seems to be my wallet address, but what is this 126a value?

No alt text provided for this image

126a is a hexadecimal and converting it into binary gives you 0001 0010 0110 1010. Let's smush them together a bit more 0001001001101010. Okay so what is this number in decimal format? Why it's 4714, the number of my NFT!

Okay so maybe not that neat since if you click on the "Decode Input Data" it gives you the same result, but given that crypto is rife with addresses and numbers all stored in hexadecimal format this is handy info on how to decode things in the crypto world.

If you look at the "burn" logic code you get some special bits of how this whole thing actually works. The unint256 id is the token ID, in my case 4714 and the address tokenOwner is my wallet address.

? ? function burn(uint256 id, address tokenOwner
? ? ? ? external
? ? ? ? onlyRole(BURNER_ROLE)
? ? {
? ? ? ? _burnLogic(id, tokenOwner);
? ? })        


? ? function _burnLogic(uint256 id, address tokenOwner) private 
? ? ? ? address owner_ = ownerOf(id);


? ? ? ? if (tokenOwner != owner_) revert Errors.InvalidOwner();


? ? ? ? _burn(id);
? ? }{        


function _burn(uint256 id) internal virtual {
? ? ? ? address owner = _ownerOf[id];


? ? ? ? require(owner != address(0), "NOT_MINTED");


? ? ? ? // Ownership check above ensures no underflow.
? ? ? ? unchecked {
? ? ? ? ? ? _balanceOf[owner]--;
? ? ? ? }


? ? ? ? delete _ownerOf[id];


? ? ? ? delete getApproved[id];


? ? ? ? emit Transfer(owner, address(0), id);
? ? }        

An interesting thing to note is there seems to be an internal wallet for this smart contract that actually handles the burning transaction. As with all transactions there are associated gas fees to complete and this wallet address, which contains ETH seems to be the one paying for it on behalf of the smart contract. That's nice that the redemption process itself does not incur additional gas fees for the redeemer.

No alt text provided for this image

My one thought about this whole process? It was a bit clunky.

  1. I received no notifiaction on how to actually redeem my Stax NFT
  2. Once I figured it out I had to connect my wallet to a web site
  3. Redeem on the web site and input my personal information
  4. Wait a bit of time so my transaction could be validated on the blockhain
  5. Go back to my wallet to confirm the transaction occurred
  6. Wait for my confirmation email that the redemption was a success

This whole jumping in and out of different platforms was a bit jarring and definitley not a good user experience! This is actually something that?Dispatch?is trying to solve for with on chain messaging. Check them out! (full disclosure they are a wholly owned subsidiary of the company I work for - IEX)

No alt text provided for this image


So that is it! I appreciate you stopping by and taking the time to read through this entire post. I for one certainly learned a lot and hopefully you did too! Please comment on any other details I might have misinterpreted, erred on or left out.

Cheers!

Congrats Brian !

回复

要查看或添加评论,请登录

Brian Rhee的更多文章

  • The Meaning Of Agile

    The Meaning Of Agile

    Caveat Emptor Having spent almost two decades in the financial services industry, mostly in trading and banking, I…

    2 条评论
  • Minting My First NFT

    Minting My First NFT

    The world of crypto is fasinating isn't it? For a market that is $1 trillion in size, similar to a mega cap company…

    1 条评论

社区洞察

其他会员也浏览了