Wallet layer
FlapSpin uses the browser's injected EVM provider when available. On connection, the site requests the selected account and checks chain ID 56, the BNB Smart Chain mainnet. If the wallet is on another network, the app requests a network switch using 0x38.
network: BNB Smart Chain
nativeAsset: BNB
walletModel: Injected EVM provider
Token-gated eligibility
Once the $FlapSpin token address is configured, the frontend can call the standard BEP-20 balanceOf(address) function. The launch configuration defines the minimum token units required to unlock the wheel.
Spin quota
The interface exposes a maximum of three spins. For a production launch, spin usage must be persisted outside the user's browser—either through a smart contract mapping, a signed backend ledger, or another tamper-resistant source.
A simple model is wallet → spinsUsed. The system checks the value before issuing an outcome and increments it only after a valid spin is accepted.
Reward settlement
The production design expects a secure endpoint or contract to return the authoritative reward result. The frontend then rotates the wheel, reveals the selected mystery box and displays settlement status.
Request
Wallet address + chain state are submitted to the settlement layer.
Validate
Eligibility and unused spin quota are checked before accepting the spin.
Settle
The selected bStock reward is recorded and transferred or made claimable.
Security boundaries
- The website never needs a seed phrase or private key.
- Wallet connection alone must not authorize token transfers.
- Outcome authority should not live in client-side JavaScript.
- Spin quota should not rely on local storage in production.
- Reward transactions should be independently inspectable on BscScan.
- Contract addresses and treasury addresses should be published before launch.
