[{"data":1,"prerenderedAt":108},["ShallowReactive",2],{"\u002Fcase-studies\u002Fmetaloto":3},{"id":4,"title":5,"anonymised":6,"body":7,"client":66,"country":67,"description":68,"duration":69,"extension":70,"hero":71,"industry":72,"meta":73,"metaTitle":74,"navigation":75,"outcomes":76,"path":93,"seo":94,"services":95,"stack":98,"stem":105,"updated":106,"__hash__":107},"cases\u002Fcase-studies\u002Fmetaloto.md","MetaLoto: a fully on-chain lottery, built and audited",false,{"type":8,"value":9,"toc":58},"minimark",[10,15,19,23,26,29,36,40,48,51,55],[11,12,14],"h2",{"id":13},"the-situation","The situation",[16,17,18],"p",{},"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.",[11,20,22],{"id":21},"what-we-built","What we built",[16,24,25],{},"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.",[16,27,28],{},"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.",[30,31,33],"callout",{"type":32},"warning",[16,34,35],{},"\"Audited\" and \"launched\" are two different sentences, and a site that blurs them is lying to whoever reads it next.",[11,37,39],{"id":38},"how-it-went","How it went",[16,41,42,43,47],{},"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 ",[44,45,46],"code",{},"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.",[16,49,50],{},"MetaLoto has not launched on any production chain. We are not going to claim otherwise.",[11,52,54],{"id":53},"what-we-would-do-differently","What we would do differently",[16,56,57],{},"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.",{"title":59,"searchDepth":60,"depth":60,"links":61},"",2,[62,63,64,65],{"id":13,"depth":60,"text":14},{"id":21,"depth":60,"text":22},{"id":38,"depth":60,"text":39},{"id":53,"depth":60,"text":54},"MetaLoto","Global","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.","3 years, February 2023 to April 2026","md",null,"Web3 gaming, decentralised lottery",{},"MetaLoto: an on-chain lottery, built and audited",true,[77,81,85,89],{"metric":78,"value":79,"how":80},"Test coverage","47 tests, 93.6% statement coverage","Hardhat test suite (11 describe blocks, 47 tests) and solidity-coverage report: 88 of 94 statements covered.",{"metric":82,"value":83,"how":84},"Audit rounds","3 internal audit rounds","Internal audit reports dated 26 to 28 April 2026, covering the latest contract diff and overall launch readiness.",{"metric":86,"value":87,"how":88},"Launch-readiness blockers closed","8 of 10 blockers closed","Launch-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.",{"metric":90,"value":91,"how":92},"Mainnets scripted for deployment","7 mainnets scripted, 3 environments actually deployed","Deployment 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.","\u002Fcase-studies\u002Fmetaloto",{"title":5,"description":68},[96,97],"custom-software-development","cloud-devops-data-engineering",[99,100,101,102,103,104],"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","case-studies\u002Fmetaloto","2026-09-25","KVq6Ss9-eHZbuY1zeT7n_YEYmWE8PaocM2U8YG8ExwE",1791749788778]