Skip to main content

Using the Algorand Blockchain to Generate NFTs: A Web 3.0 Project

Web 3.0 is the framework and conceptualization of a decentralized, blockchain-based Internet.

Web 3.0 is the framework and conceptualization of a decentralized, blockchain-based Internet.

What Is Web3?

Web3, or Web 3.0, technology is inherently about a user-controlled internet—a vision of the worldwide web untethered from top-down control by the Big Tech companies. It is being achieved incrementally by a growing stack of decentralized technologies, such as blockchains, smart contracts, oracles, crypto wallets, storage networks, and more.

In this project, we have built an end-to-end Web3 distributed app on the Algorand blockchain that will help to generate and distribute non-fungible tokens (NFTs) and allow personnel with NFTs to interact with a smart contract to perform predefined actions.

NFTs and the Algorand Blockchain

10 Academy, a not-for-profit community-owned initiative that has developed scalable, financially sustainable, and effective training programs to place young Africans into careers for the 4th industrial revolution, wants to give certificates for its trainees in NFTs by partnering with Algorand to use the Algorand blockchain as the foundational element of the NFT.

The objective of this project is to build a distributed app that will allow 10 Academy generate and distribute non-fungible tokens (NFTs) as certificates that will represent the successful completion of a weekly challenge to trainees, and allow trainees with NFTs to interact with a smart contract to perform predefined actions.

Project Components and Tools

Algorand is an open-source, decentralized blockchain network that leverages a two-tiered structure and a unique variation of the proof-of-stake (PoS) consensus mechanism to increase transaction speeds and achieve finality. That means processing over 1,000 transactions per second (TPS) and achieving transaction finality in less than five seconds.

Algorand has a unique two-tiered blockchain structure. The base layer supports smart contracts, asset creation, and atomic swaps between assets. All of these processes take place on Layer 1 of the Algorand blockchain, which helps ensure security and compatibility. It has an API available for developers to access the Algorand blockchain, which makes it easy to build web3 apps.

Some facts on Algorand at the time of writing:

  • Market cap: 1,993,468,594, which sits at 27th place among cryptocurrencies
  • Total amount of accounts available: 26,084,372
  • Transaction fee: 0.00029 dollar (really low)
  • Price: 0.2893 dollar for one ALGO
  • Latest block number: 21,697,274

Technologies Used for Web3 Development

  • Reactjs (Frontend) is a declarative, efficient, and flexible JavaScript library for building reusable UI components. It is an open-source, component-based library that is responsible only for the view layer of the application.
  • Django (Backend) is a high-level Python web framework that encourages rapid development and clean, pragmatic design.

Implementations of the Project

For this project, we used ReactJs to create a user interface for trainees and staff members. The trainees have a page to request certificate and opt-in to the NFT asset. The staff has a page to view certificate requesters and mint NFT for the trainees. We used this tool to connect to the Algorand sandbox and get wallet addresses, create NFTs, handle user authentication and profile and provide the API for each functionality.

Some steps involved in the process of requesting and minting NFTs:

  1. Staff member registers the trainees using the Django admin panel (as this project is not about user management, the user interface has not been built and instead uses the default panel).
  2. Every user in the system gets temporary account because we are using a test environment.
  3. Then the trainees login to the system. On the login every trainee will get a temporary account so that the staff members will use that address to mint NFT to the trainee.
  4. The trainee will request for the NFT using a button provided. This will be done by normal Web2 request.
  5. A staff member looks at certificate requesters and if the trainee completed all challenges then NFT will be minted using the name of the trainee as a unit name and an Asset name being "10 Academy certificate".
  6. The upload file first needs to be placed in a distributed storage environment in which this project uses IPFS. And send the url to Algorand to create an asset with the file url.
  7. The trainee will opt in to their asset to claim the NFT. They will be able to view their NFT.
  8. The staff member then releases the asset to the trainee.
Django Admin panel with users created

Django Admin panel with users created

Function to create a temporary account for all users

Function to create a temporary account for all users

Function to create an asset taking URL from IPFS

Function to create an asset taking URL from IPFS

Lessons Learned

I have learned a lot of concepts in Web3 and blockchain technology from working on this project:

  • Blockchain is a decentralized peer-to-peer system with no central authority and using a consensus mechanism to make decisions.
  • Blockchain is built on top of nodes, which are able to create the blocks to be chained.
  • Everything on the blockchain is a transaction.
  • Wallets in a blockchain are made possible (and secure) using security and encryption methods like secure hashing algorithm, private key and public key pair.
  • Most used consensus algorithms include proof-of-work (eg. bitcoin) and proof-of-stake (eg. Algorand).
  • Immutability exists in the blockchain except it differs accordingly because on some of them if you own 51% of nodes then you will be able to alter a transaction.

Some concepts specifically on this project include:

  • Algorand is a really fast and scalable blockchain platform that uses proof-of-stake protocol to finalize transactions immediately.
  • Algorand enables the minting of NFTs using its Algorand standard assets feature.
  • Before anyone can send you an asset you need to opt-in so that the sender can't send to you whenever they want without your consensus.
  • The Algorand Sandbox really lets you have fun and learn how to access the blockchain.

Future Works and Plans

  1. Connect the app with the Algorand public testnet and mainnet so that the app can be useful in the real world.
  2. Add smart contracts to enable trainees to gain a profit from the NFT they earned.
  3. Improve the frontend to be user-friendly and attractive for real world use.

This content is accurate and true to the best of the author’s knowledge and is not meant to substitute for formal and individualized advice from a qualified professional.