- Blog
Leveraging Web3 in Your Next Digital Product
November 23 — 2022
For technology enthusiasts (including us here at Mirego), Web3’s rising popularity presents a huge opportunity to help organizations leverage the innovative technologies enabled by the ever more present blockchain. When some of our clients asked us to explore some features for their product, we readily agreed to take the leap and build our Web3 programming expertise.
Whether linking connected objects to a cryptocurrency wallet, creating custom behaviour NFTs, or developing automated and decentralized financial systems (DeFi), we had the opportunity to orchestrate different projects in this promising web space. In addition to our work, we frequently share our expertise with the development community. For example, we devoted a Mirego DevTalks podcast episode to Web3 (french only), as well as posted brief technical articles on craft.mirego.com so more Web3 enthusiasts could learn about the new ecosystem.
Nevertheless, we are aware that to a broader audience, the Web3 ecosystem is still quite mysterious. This article will help you better understand Web3’s basic concepts and answer questions you might have on how it can be leveraged in your next digital product.
What is Web3 really about?
Web3 is the latest evolution of the web as we know it. After the static web pages typical of the 90s came, in 2005, the first web evolution marked by the introduction of read/write sites and social media. Web3 is the second evolution, heralding a more immersive web in which users control content, empowering them to play a more active role in the web economy.
Thus, in a Web3-enabled digital product, some or all functionalities can be decentralized and self-contained through deploying smart contracts on blockchain networks, such as Ethereum or Solana. In other words, part of the product’s code and database is deployed in a public environment, traceable and visible to all.
Web3’s core idea is based on key concepts, all of which serve to ensure transparency.
- Decentralization: Instead of being owned by private entities, ownership and control of Web3 data are distributed among the creators and users of the network.
- Openness: Everyone is equal and can contribute to the content, governance, and network—no one is left out.
- Native payments: cryptocurrency is used for all transactions instead of relying on banking infrastructure, limiting intermediaries.
- Autonomy: unlike Web2 which is operated by centralized entities (example: Facebook), Web3 is operated (hosting and code execution) using incentives and economic mechanisms in a decentralized environment.
Web3’s ideology and principles, as well as the transparency it affords, are the main drivers for its popularity because they provide users with data integrity and control.
Are Web3 and NFTs the same?
NFTs count among the most popular use cases for Web3 today, and so they are often associated. NFTs (non-fungible tokens) are digital assets created according to a standard (ERC721), which assigns a unique identifier (along with some metadata) to a digital asset in order to trace it back to an owner. Imagine being able to tell who the owners of each of an artist’s pictures are, without secrecy nor doubt, as well as render all previous picture owners easily traceable.
However, Web3’s decentralized technologies can accomplish MUCH MORE than NFTs. For example, AAVE is a protocol that uses multiple blockchains and smart contracts to connect lenders and borrowers and set the rules conferred by those loans. This is just one example among a host of innovative digital solutions that Web3 can enable.
What can my product actually do with Web3?
Web3 being still in its infancy, the current offer of Web3-enabled products covers just a tiny part of all the possibilities these technologies have to offer. Creativity is the only limit to what can be achieved leveraging the Web3 ecosystem!
To start reaping the benefits of the blockchain, you need to first deploy one or multiple smart contracts in a blockchain and connect them to traditional web applications. Users will then only have to connect their cryptographic wallet to your web application to enable smart contract-based features and create decentralized content in the blockchain.
Here are some potential use cases for smart contracts:
- Support cryptocurrency payments.
- Issue badges for an event, in the form of a classic NFT (example: POAP).
- Entrust governance of a product or part of a product to users (DAO).
- Use the blockchain as a product traceability log (ex., Authena.io).
- Allow users to create content for which they retain ownership (ex., Mirror.xyz).
- Use an NFT to validate the owner of a system element, for example:
- Users are assigned an NFT when buying a movie.
- The NFT is needed to play the movie.
- Users can then transfer the NFT to anyone they choose.
Which blockchain is standing out from the pack?
There are multiple blockchains to host smart contract code. Ethereum, Polygon, and Solana are among the most popular and well-documented platforms.
While all blockchains have their pros and cons, it is still too early to determine which will be the most widely used in the next few years. For this reason, it’s crucial not to place all your eggs in one blockchain. Several products, like opensea.io, have decided to support multiple blockchains despite the additional development costs (this can be compared to a single product supporting AWS, Azure, and Google Cloud, all at once). Others simply opted for the most popular solutions like Polygon, for ease of use and large user communities.
The cryptographic wallet
Traditionally, users are authenticated with email or login credentials furnished by third party platforms (e.g., Facebook, Apple, Google). In a Web3 application (dApp), users use their cryptographic wallet for authentication. As the user connects a wallet to the application, the system provides a copy of that user’s public key, which validates the digital identity. Then, the application communicates with the wallet to perform operations, as defined by smart contracts. The user will have to provide final authorization, confirming the validity of the transaction. This last step will close the transaction, which will be permanently recorded as a cryptographic signature in the blockchain’s centralized database.
To add another level of complexity, there is also a variety of cryptographic wallets to choose from. MetaMask, Rainbow, and Trust Wallet are among the most popular. To reach a maximum of users, your product needs to be compatible with as many wallet options as possible. This interoperability requirement is comparable to ensuring a website will work across multiple browsers simultaneously.
How to best guide users?
In a traditional environment, applications decide which servers are to be contacted to perform operations. In a Web3 application, it is rather the user’s wallet that interacts with the blockchain. Therefore, building your product, you must consider that a user’s wallet may connect to unsupported blockchains. Therefore, the product needs to inform users on wallet connection and validity status.
Note: As a product will have no control over wallet and blockchain validity, it is important that you take the time to read the critical information about the systems you’ll be choosing.
What about transaction delays?
When the crypto wallet submits a transaction for execution, the transaction is automatically added to a queue. It can take several seconds or minutes before it is processed. Delays vary depending on the blockchain on which the transaction is taking place.
With current digital products, users are completing transactions in real time. Managing delays is therefore another crucial element to build in your product’s design. For an optimal Web3 user experience, users need to be made aware that the transaction is being processed and expectations need to be carefully managed, up until the transaction is confirmed.
Who can use my Web3 code?
There are no set rules that dictate who can call a smart contract. Because it’s an open system, anyone can communicate with any smart contract. To protect the integrity of the data, controls and rights must therefore be written into the smart contract.
How to reinforce security and integrity?
If your product is popular, cybercriminals may scan your code seeking to exploit a potential vulnerability. Web3 being a transparent ecosystem, there is no way you can prevent this from happening, unfortunately.
However, you can reinforce security by implementing various best practices, which will help make your product more resistant to diverse types of malicious attacks. Here are a few examples.
- Request an external audit from an auditing firm such as Hacken.
- Use static analysis tools such as Mythril.
- Retain battle-tested and widely used libraries for established standards (e.g., openzeppelin)
- Plan for a strong pre-launch process, including a bounty program.
- Have mechanisms in place that will temporarily stop operations if an issue is suspected.
But above all, reinforcing your product’s security is best done at the outset, through sound design and development practices. All things considered, it’s much safer to entrust the writing of smart contracts to a Web3-experienced development team.
Looking to learn more?
At Mirego, we have a team of experts who understand and master the emergent reality of Web3 development. Whether it’s creating a loyalty program, implementing an NFT marketing event, launching a decentralized finance project or the next smart contract revolution, we have the required expertise and passion to see you through the most innovative projects.