Blockchain Adventures: Building an NFT Auction on Algorand

Alim Sahin
5 min readJun 25, 2021

We began learning the philosophy of blockchain from the ground up. The further we dove down informational rabbit holes, the more we began to grasp this new technology. After over a month of learning and tinkering, we’ve emerged in the new world of possibilities decentralization has opened for us. The enormous potential and limitless applications of concepts like decentralized finance (DEFI), smart contracts, and NFTs had us eager to innovate and explore.

So you’re in love with blockchain. Now what? For us, it was time for a quest. At this point, We had very little programming knowledge and zero experience building decentralized apps (dApps). We were about to walk a very exciting and curious path. We had to find a safe and easy way to build dApps within a blockchain ecosystem.

We decided to build our first dApp in Reach. Reach is a blockchain development platform which makes it fast and easy to build safely on any protocol. Little did we know, this platform would go a long way towards helping us “reach” our goals as blockchain developers…get it?

Our Story Begins

While we were dreaming about building a dApp using Reach, we stumbled across Bounty Hack Türkiye: a five-week hackathon in which developers from our glorious motherland would build and launched apps on the Algorand network using the Reach platform. It was the perfect opportunity to develop and showcase our skills while building a dApp.

At first, we doubted whether building a decentralized app in five weeks was achievable for us. We had just finished Reach’s Rock-Paper-Scissors tutorial and still had much to learn about the moving pieces of a dApp and certainly didn’t know how to build one. However, we were determined to try and the bounty hack gave us the perfect excuse.

After five tough weeks full of your garden variety trials and tribulations, we succeeded in building a working dApp. It had transactions, a nice user interface and ran on the Algorand blockchain. Learning JavaScript helped make our journey with Reach a lot easier as the two languages share the same syntax. We also had plenty of help from hackathon organizers like Bounty Hack winner Hamza Karabağ. It was a fascinating experience for us and we are so proud of what we created.

What We Built

Bringing auction mechanics to the blockchain solves a wide variety of reliability problems. Our dApp makes auctions easier, safer, and faster. Better yet, it incorporates the use of Non-Fungible Tokens (or “NFTs”).

The Algorand ecosystem gives this dApp a stable operating environment along with a handful of other advantages; namely, its comparatively low gas fees. Because creators and bidders would transact frequently on our dApp, it would be infeasible to build it on Ethereum or other ecosystems.

Project Overview

Basically, we have two actors: Creators and Bidders. Regardless of the number of Bidders, they fall under one Participant class. Let’s take a look at how the dApp works step by step.

This is the page we see after starting the application and connecting to our wallet.

On this page, we have two options. If I am the Creator, the app expects from me to upload a document. The app expects from the Bidder to join in the existing NFT auction by attaching to the contract with contract info.

  • The creator uploads the file that they want to mint as an NFT. The app assigns the unique ID or “hash” for the document.
  • After the Creator sets a deadline, deploys the program, and attaches Bidders, the auction begins! Bidders make an offer simultaneously. When time runs out, the person who offers the highest bid wins the NFT and the token transaction is completed.

To Be Continued?

Looking back on these 95 lines code, there’s so much I would love to improve. I’m convinced we could have made the top three with some improvements to our frontend. We know our what our project lacked and, while there’s no use dwelling on it, there’s also no reason we can’t go back and improve on our app. After discussing it amongst ourselves as a team, we all agreed it would be easy to continue building out our project. However we wouldn’t have had the courage to invest time in such a project had the Bounty Hack not given us. The experience has shown us how easy it is to build robust and secure dApps in Reach. Should our project receive additional funding, here’s what we’d change.

  • Allow multiple users to create NFTs by designating “Creator” as a participant class.
  • We’d add polish to the frontend, giving it an attractive appearance, animations, and additional features.
  • Build an election dApp for use in club or association leadership elections.
  • Add a decentralized record which logs transaction information for security purposes.

Now that I’ve had some time to reflect on my experiences, I’ve found that the hackathon was just as challenging as it was rewarding. Our project may serve as a building block of many decentralized auction applications as well as those which incorporate non-fungible tokens. I’d like to extend a special “thanks” to my teammates(Zafer(Victory#4554) and Buğra(weckl#4837)) for their effort and determination. We’d collectively like to thank the organizers of the hackathon for their support; especially Hamza.

If you’d like to review the source code for our project on Github, you find it here. You can find our demo video on Youtube. Finally, if you’d like to learn Reach in two weeks and create smart contracts on the blockchain, you can start from the tutorial. Additionally, I recommend joining the Reach Discord community to ask questions while you learn. That’s all the time I have for today! Thanks for reading. Have a nice day!

--

--