Sysop Guide (BBS-Coin)

This document explains how a BBS sysop joins BBS-Coin, prepares reward data,
and publishes epochs
.

It is intentionally practical and minimal.
If you run a BBS and want to distribute BBS-Coin to your users, this is the only
document you need.


0. Mental Model (Read This First)

Everything else is off-chain bookkeeping.


1. Signup & Onboarding (Sysop ↔ Foundation)

What the Sysop Provides

What the Foundation Does

  1. Deploys your distributor
    BbsTreasury.deployDistributor(sysopOwner, bbsId, metadataURI)

  2. Registers it
    DistributorRegistry.register(...)

  3. Funds it
    BbsTreasury.fundDistributor(distributor, amount)

You receive a distributor address that is ready to use once funded.


2. Preparing Reward Data

At distribution time, produce:

[
  { "address": "0xUser1", "amount": "50000000000000000000" }
]

Rules:
- amount is base units (wei) BBS Token uses 18 decimals, so:
50 tokens = 50 × 10¹⁸ = 50000000000000000000
- One entry per address per epoch
- Amount is the total entitlement for that epoch


3. Leaf Hash (Authoritative)

Solidity:

keccak256(abi.encodePacked(account, amount))

Ethers v6:

ethers.keccak256(
  ethers.solidityPacked(["address","uint256"], [account, amount])
)

Any deviation breaks claims permanently.


4. Required Epoch Artifacts

You must persist:

Loss of these may prevent claims.


5. Publishing the Epoch

publishEpoch(root, uri)

Epochs are:
- Sequential
- Immutable
- Permanent


6. Claims

Users claim per epoch:

claim(epoch, amount, proof)

Unclaimed epochs do not expire.


7. Common Mistakes


Summary

Publish only what you are willing to make permanent.


← Back to Index