Mantle Builder Sessions: MINAmal VRF

06/19/235 min read

Mantleby Mantle





Mantle Builder Sessions: MINAmal VRF

Mantle Network recently hosted an AMA session with the creators of “MINAmal VRF”, a zero-knowledge (ZK) random number generator created at the ETHGlobal Tokyo hackathon event. This groundbreaking technology offers a completely verifiable and lightweight solution for generating random numbers — a crucial component in various applications, particularly in gaming, where continuous and trustworthy randomness is essential. In contrast to the commonly used Chainlink VRF, which incurs high costs of up to $20 for obtaining 1–500 numbers, MINAmal VRF presents a more sustainable and cost-effective alternative.

Overcoming the challenge of obtaining random numbers reliably and transparently is important to prevent potential exploits such as predicting specific outcomes, manipulating games, or tampering with airdrops and raffle tickets. With this in mind, the team behind MINAmal VRF sought to create a solution, prioritizing the development of a verifiable ZK structure that delivers dependable randomness while maintaining a lightweight infrastructure.

The Team’s Background

The paths of three individuals — Cam, Chee, and Chen, three contributors to Nethermind — first converged at ETHDenver. Later, at ETHGlobal Tokyo, they joined forces with Kenk, who had spent the past three years in web3 development and hacking. Their collective experience in the crypto industry, stemming from the last bull run of 2017, has instilled a deep passion for building within the web3 space. Embracing the decentralized and open-source nature of blockchain technology, the team found resonance with the values driving the industry forward.

Kenk’s involvement in ETHGlobal and other hackathons has greatly influenced his perspective on building an interconnected network of applications. He sees composability as a tangible expression of the openness inherent in the crypto and blockchain ecosystem.

The Hackathon Experience

Cam has a less technical development background, and more experience in project management, ideation, and product design. For him, hackathons are not merely an opportunity to build applications, but also as a spot to network and engage with other builders in the space. The energy and excitement at hackathons provide a stark contrast to the perceived crypto bear market, showcasing the innovative projects and the collaborative spirit prevailing in the community.

Furthermore, the team acknowledges hackathons as valuable learning experiences. Each blockchain technology stack presents unique challenges, and participating in hackathons offers a space to push one’s boundaries, explore new ideas, and collaborate with experts from various domains.

The Tech Stack: ZK Proofs

The MINAmal VRF is proud to have built such an important infrastructure component in blockchains, specifically Mantle Network, where gaming applications will be popular, and random numbers are crucial. During the AMA, the team provided more technical details about how exactly the Verifiable Random Function (VRF) works.

The random numbers originate from a hash function, which takes an arbitrary input to produce a fixed-bit output. To produce the input to the hash function in a trustless and safe manner, the seed (input to the hash function) is split into multiple parts, one of which is the user’s secret. To ensure that no one can manipulate the outcome of the hash function, the protocol relies on the “game hash”. The game hash consists of the commitments of every player’s user secret, meaning a single participant cannot control it.

When the first round of a random number is generated, a proof is created to show that it was created out of the user’s secret, and the commitment has to match the user’s secret. This allows the user to take charge of his/her randomness, without having a single person control the outcome.

The first randomly generated number is then passed to the next participant. The next player’s input will then consist of his/her own user secret, the committed hash, and the previous random number. As the previous random number cannot be predicted, the hash output will be random. Thus, by passing on the random number generated by other players, the system can repeatedly produce a random number that no one can predict. This is how MINAmal VRF leverages ZK proofs.

Compared to an oracle-based VRF, such as Chainlink, MINAmal VRF has a unique advantage in that it can compute a series of random numbers first, and then prove it’s correct after.

Future Plans

The team encourages anyone to use the protocol, allowing tweaking of the hash function or the proving method based on a project’s needs. The protocol acts as a stepping stone to enable unique applications. Although the team may implement additional features in the future, the fundamentals around producing interactive randomness are sound.

Looking beyond random numbers, the team is keen on exploring other use cases and proving certain trust-based operations.

Building Together

The MINAmal VRF team each had a unique skill set that helped them be very complementary to one another, and create such a distinct product in a short period of time. With each member focusing on a specific task, such as Kenk with front-end development, or Chen with smart contract and the custom relay development, MINAmal VRF team was in a great position to succeed from the beginning.

The team took home a slew of prizes after submitting the project at the very last second and getting barely an hour of rest over the hackathon period.

The team unanimously agreed that building on Mantle Network was smooth and painless, and that they faced no issues in deploying contracts on the chain. All the functions worked as intended, and the team didn’t have to spend much time debugging.

We’re thrilled that MINAmal decided to #BuildOnMantle, and hope their hackathon story can be inspiration for you to do the same!

Join the Community