Web3 gaming, decentralised lottery · Global · 3 years, February 2023 to April 2026

MetaLoto: a fully on-chain lottery, built and audited

MetaLoto is a provably fair lottery on smart contracts: verifiable randomness, 47 tests at 93.6% coverage, and three audit rounds. Built, not yet launched.

MetaLoto

Outcomes

MetricResultHow
Test coverage47 tests, 93.6% statement coverageHardhat test suite (11 describe blocks, 47 tests) and solidity-coverage report: 88 of 94 statements covered.
Audit rounds3 internal audit roundsInternal audit reports dated 26 to 28 April 2026, covering the latest contract diff and overall launch readiness.
Launch-readiness blockers closed8 of 10 blockers closedLaunch-readiness audit findings dated 26 to 28 April 2026. The remaining two were non-code items such as social handles, seed liquidity and geo-blocking.
Mainnets scripted for deployment7 mainnets scripted, 3 environments actually deployedDeployment scripts target seven mainnets: Ethereum, Polygon, Arbitrum, Base, Optimism, BSC and Avalanche, plus testnets; only Sepolia, localhost and Docker deployments exist in the repository to date.

Stack

  • Solidity on Hardhat
  • OpenZeppelin contract libraries
  • Chainlink VRF for on-chain randomness
  • Node.js and Express, MongoDB
  • Nuxt 4 frontend and admin panel
  • Terraform on AWS ECS

Services

The situation

A lottery only earns trust if nobody has to trust the operator. That is a harder engineering problem than it sounds: ticket sales, the random draw, the prize split, and referral payouts all have to execute on-chain. MetaLoto is our own attempt at building that properly, end to end, rather than bolting "on-chain" onto a backend that still does the parts that matter.

What we built

The contracts are Solidity 0.8.28 on Hardhat, using OpenZeppelin for the parts that should never be reinvented, with Chainlink VRF supplying the randomness a lottery cannot fake. The core contracts, the lottery itself, the games controller, the referrer system, and the shared libraries for game state and ticketing, implement a configurable prize split, ticket caps, and a referrer discount that is capped and validated on-chain so nobody can quietly hand out a 90% discount to themselves. Payouts use the pull-payment pattern: the contract never pushes money anywhere, a winner claims it.

Around the contracts sit an event-indexing service that mirrors on-chain activity into MongoDB so the product does not have to query the chain for every page load, a public Nuxt 4 frontend with wallet connection across multiple chains, and an admin panel for the operational side that has no custody over the draw itself. Deployment is scripted for seven mainnets, Ethereum, Polygon, Arbitrum, Base, Optimism, BSC and Avalanche, plus testnets, though only test and local deployments exist so far; nothing has gone to a production chain.

How it went

We built a real test suite, 47 tests across 11 areas of the contract behaviour, and pushed statement coverage to 93.6%. We ran three internal audit rounds in April 2026. The most recent one passed the latest contract changes but was direct about what it found in the pre-existing code: one high-severity issue, a zero value for the per-player ticket cap could brick ticket purchases entirely, and one medium issue around using selfdestruct after the Ethereum network's Cancun upgrade changed how that opcode behaves. A separate launch-readiness review found 8 of the 10 blockers closed; the remaining items were non-code, such as social handles, seed liquidity and geo-blocking.

MetaLoto has not launched on any production chain. We are not going to claim otherwise.

What we would do differently

We would have kept a single production-readiness checklist from the first audit onward instead of assembling one retroactively across three separate reports, which made it harder to see, at a glance, how much of the non-code work was actually done.

Tell us what you are trying to build

Chat on WhatsApp

We reply on WhatsApp within one business hour (Sunday to Friday, 09:00 to 18:00 Gulf time) and within 24 hours otherwise.

Call +971 55 950 2669

Speak with us directly during business hours.

Send a written brief

Prefer email. Tell us the brief and we reply with next steps.