zkBNB
Launch token

Donation rings.

A cause has a name, a URI, a shielded public key and encryption key (taken from a zkbnb1… address), a fallback wallet and an owner. Registering costs a small anti-spam fee (0.002 BNB by default) that goes to the treasury. A ring is a fixed, ordered list of causes with an epoch length. Ring 0 is the global ring maintained by the operator. Anyone can create more on Donate.

How a ring is funded

  • Coins that chose Donate send their 0.80% into pot[ringId] on every trade.
  • donate(ringId) adds to a ring's pot publicly. donateToCause(causeId) pays one cause right away, as a shielded note if it has a key, otherwise to its fallback wallet.
  • "Donate privately" on the Donate page is a transfer inside the shielded pool to the cause's key. Nothing on-chain links your wallet to it.

Settlement

Once per epoch, anyone can call settle(ringId), and the keeper does so automatically. The whole pot goes to the next active cause in turn via depositFor(pubKey, blinding), with blinding = keccak("ring", ringId, epoch, causeId) mod p, and the ring moves on to the following cause. Inactive causes are skipped.

  • Rings cannot be changed after creation. A cause owner can deactivate their cause, and settlement then skips it. If every cause in a ring is inactive, the pot waits.
  • If the pool or the fallback wallet refuses a payment, it is held as pending for that cause to withdraw, so a ring can never get stuck.
  • Every settlement is a public Settled event with the ring, epoch, cause and amount, listed on Rings.