Hydra Launchpad : Developing a Multiphase Probability-Based Minting System on the Ethereum Blockchain

Services: Fullstack blockchain development / Timeline: 2 months / Blockchain: Ethereum

Overview

Like Apollo Launchpad, Hydra Launchpad builds people's projects on the blockchain and launches them.

Hydra asked us to devise a new minting technology on the EVM blockchain that:

The Challenge

Our client chose to launch their project on the Ethereum blockchain. This meant that writing large amounts of data onto the blockchain would be very expensive in terms of gas fees (blockchain transaction costs). Accordingly, implementing multiple whitelists strictly on-chain (i.e., writing every whitelisted address on each level onto the blockchain) was neither feasible nor scalable. However, implementing the whitelists strictly on the server-side also had its disadvantages, such as increased potential points of failure from centralization.

How did we design the minting system so that it could implement multiple levels of whitelists securely while being scalable and affordable?

Our Process

Our system needed 3 key features.

affordability Affordability
scalability Scalability
security Security
To optimize for these 3 attributes, we leveraged the Merkle Tree data structure. As visualized in the figure below, it is a tree-based data structure in which every node represents the cryptographic hash of data, and every inner node represents the cryptographic hash of the data represented by its child nodes. In our case, the leaf (last) nodes represent the whitelisted addresses.
Effectively, this enables all whitelisted addresses to be hashed into one root hash and dramatically decreases the amount of data needed to be written onto the blockchain per whitelist. Furthermore, this approach maintains the security of on-chain address verification, since the root hash is written onto the blockchain. Any number of whiteliwst addresses can be added or removed freely as well until the root hash is created, making this solution also extremely scalable.

The Outcome

Within 2 months, we completed the multiphase probability-based minting system that not only saved our client 89% in Ethereum gas fees, but also increased their revenue stream in the form of microtransaction fees from the Lottery Ticket NFTs processing. The root hashes containing all of the whitelisted addresses' data were written directly on the blockchain, meaning circumvention was practically impossible. Furthermore, until these root hashes were generated, any number of whitelist addresses could be freely added or removed scalably in our centralized database. Our knowledge of complex data structures ultimately enabled us to devise a solution that optimized cost-efficiency, scalability and security.

"Apollo Launchpad was exceptional in terms of time management and going above and beyond to deliver high-quality work. Their dedication and commitment to the project was unparalleled, and it was a pleasure to work with a team who consistently exceeds expectations."
- Josh Kim, Chief Excecutive Officer of Hydra Launchpad