Skip to content
hungrawPublic

About

Red packets with random shares on QoreChain.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Qpack

Hang QOR on a blossom tree. Anyone can grab a random share.

Built on QoreChain CI Licence: MIT

Try it · Watch the video (62 s)

The tree A packet
Packets on a peach blossom tree A packet's card
A share, drawn by Qtum'd Drop your own
0.185 QOR, 24.9% of what was left The drop form with a riddle lock

Play

  • Grab: tap a packet to get 5 to 30% of what's left. Free, no sign-in.
  • Drop: put in some QOR, pick how long it stays open, and lock it with a riddle if you like.
  • Pot: leftovers go to a common pot, and 1 grab in 10 wins a voucher from it.

Your wallet is made in the browser. Top it up from QoreX.

How it works

Each packet is its own wallet, not a deposit in a contract.

  1. The browser makes a fresh wallet and registers its ML-DSA-87 key.
  2. It delegates to the packet contract with EIP-7702, with post-quantum consent.
  3. It opens an EVM window capped at the gift: amount, number of payouts, deadline.
  4. It throws the key away. Nobody, the sender included, can close the window or move the money.
  5. Each grab asks Qtum'd for a number and is paid through the window. After the deadline, the rest is swept to the pot.

A locked packet's answer signs the grabber's own address, so a copied answer pays nobody else.

Tested

Result
Live testnet (e2e.mjs and the site) Sealing, open and locked grabs, one grab per wallet, refused late grabs, sweeps, vouchers
Foundry, forge test 13 tests, including a fuzz test on the share and 128,000 random calls checking the pot stays solvent
QCAI audit 65/100, every finding answered

Quantum Pass checklist

create-qorechain-dapp (fullstack-web) First commit
QoreX Top up and withdraw (window.qorex.native.signAndBroadcast)
Hybrid-signed tx Every wallet send and packet setup: secp256k1 + ML-DSA-87
Testnet Addresses
Foundry tests, CI, MIT, cover, video contracts/test, CI, LICENSE, docs/media
AI usage AI_USAGE.md

Addresses

Testnet, chain 9800.

Pot 0x13f6aa83e2d869f7c59fb3e35c167d2d8c26a3a6
Packet code 0x7348F1C0B9ffcd4DF31AbdbfD10306dEB41C3Cf3
Relay 0x530A025664B1C04985866e86a3efccC27ae3E200
Qtum'd 0xb6EAFf4a525E711Cb90bf9DD57c389390a748386

Develop

npm install && npm run dev       # site, against the live testnet
cd contracts && forge test       # contracts

relay/ is the Cloudflare Worker that pays fees and sweeps packets.

Credits

create-qorechain-dapp, @qorechain/sdk, Qtum'd, three.js, viem, Foundry, Cloudflare. Site sounds and the video voice by ElevenLabs; video made with Remotion.

MIT licence.

About

Red packets with random shares on QoreChain.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages