TECHNICAL DOCUMENTATION · BSC MAINNET

Build with SINGULAR

SINGULAR's native-BNB pool manager and Chainlink VRF 2.5 adapter are deployed on BNB Chain Mainnet. The App reads this deployment and uses real BNB. This deployment has not completed an independent audit.

Network

Use the contract addresses below to independently verify the deployment before sending real BNB. The website is an interface; the deployed contracts govern balances and outcomes.

NETWORKBNB Smart Chain Mainnet
CHAIN ID56
NATIVE ASSETBNB
Before you sign

Confirm the chain, destination address, source verification and transaction amount in your wallet. A new deployment has a different address. This version has not completed an independent audit.

Connect Wallet

The App requires an EIP-1193 wallet on chain 56 and requests a network switch when needed. Buying entries and claiming on Mainnet use real BNB and gas.

BNB Pools

Fixed prize, entry price, capacity, duration and fee are set onchain before the first entry. Every payment uses native BNB and must exactly equal entry price multiplied by quantity. Standard planned tiers are 0.05 BNB / 6 tickets / 10 minutes, 0.1 BNB / 11 tickets / 10 minutes, 0.5 BNB / 55 tickets / 20 minutes and 1 BNB / 110 tickets / 30 minutes, each at 0.01 BNB per ticket. Inspect each pool's actual terms; pilot pools may differ.

Pool Lifecycle

WAITING → LIVE → DRAWING → COMPLETED, or LIVE → EXPIRED. A DRAWING pool also becomes refundable if VRF remains unresolved for 6 hours. The first entry starts the timer. Only a successfully resolved recurring pool creates a same-parameter successor. Expired refund pools do not automatically renew; the fixed pool creator may create a replacement manually.

Ticket System

Sequential zero-based ticket IDs map to purchasers. The interface displays one-based ticket numbers. Pool share equals owned entries divided by entries sold; winning odds at capacity equal owned entries divided by capacity.

Winner Selection

The Chainlink coordinator verifies VRF proof before calling the provider adapter. The adapter passes the random word to the manager; the winning zero-based index is randomWord % capacity. The recorded ticket owner is the only winner. There is no administrator-chosen winner or reroll after resolution.

Refunds

Call claimRefund(poolId) if an incomplete pool reaches its deadline, or if a full pool's VRF request remains unresolved for 6 hours. The contract checks each wallet's contribution and prevents double claims. A late VRF response after timeout cannot select a winner. Refund claims require a wallet transaction and gas; time passing alone does not send BNB.

Protocol Fees

Only completed pools accrue a fee. It may be swept once to the isolated fee vault. Incomplete expired pools accrue no fee.

SingularNativePoolManager

SOLIDITY
function buyEntries(uint256 poolId, uint32 quantity) external payable;
function claimPrize(uint256 poolId) external;
function claimRefund(uint256 poolId) external;

SingularFeeVault

Receives only realized fees from the manager. Prize and refund liabilities remain with the manager, not in the fee vault.

Chainlink VRF 2.5

The deployed provider adapter requests Chainlink VRF 2.5 using a mainnet subscription and native BNB billing. The subscription must remain funded and the adapter must remain an authorized consumer; otherwise a full pool can remain pending. Inspect the deployed adapter and official network configuration before relying on them.

SOLIDITY
interface IRandomnessProvider {
  function requestRandomness(uint256 poolId) external returns (uint256 requestId);
}

Events

Read PoolCreated, PoolStarted, EntriesPurchased, PoolFilled, RandomnessRequested, OutcomeResolved, PoolRenewed, PoolVrfTimedOut, PrizeClaimed, ProtocolFeeAccrued and RefundClaimed from the verified deployment block onward. Deduplicate by transaction hash and log index.

Custom Errors

Handle exact-value mismatch, expired pool, oversell, non-winner claim and unavailable refund distinctly. Always re-read the pool before a wallet write.

Reading Pools

Use getPool(poolId), wallet ticket IDs and contribution/claimable getters. Loading is not the same as zero pools. UI labels such as CONVERGING are presentation states, not contract authority.

Buying Entries

JAVASCRIPT
buyEntries(poolId, quantity)
msg.value = entryPriceWei * BigInt(quantity)

Claims

Only the recorded winner can claim a completed prize. An expired participant can claim their exact contribution. Refresh chain state and wallet BNB balance after confirmation.

Event Indexing

Scan from the deployment block in bounded ranges, then process new confirmed logs. Event history informs the display; the contract remains authoritative for all writes and claims.

Trust Model & Public Verification

In this source version, the manager has no withdrawal function for participant BNB. Its constructor-fixed pool creator can create new pools only; it cannot pause entries, modify an existing pool, change the constructor-fixed randomness provider, select a winner or reroll. There is no ownership transfer, proxy or upgrade function in the manager.

The fee vault is separate: anyone may transfer a completed pool's realized protocol fee into it once. Only its constructor-fixed fee recipient may withdraw, only up to availableFees and only to that same address. The prize and refund liabilities remain in the manager. A new deployment is a different contract, so always verify the exact address. A lost fixed key cannot be changed in place.

Flap integration is still local-only. Its vault would receive token tax revenue in a separate balance; a Flap-page ticket purchase would forward the exact BNB payment to the pool manager, recording the user's own wallet as ticket owner. Permissionless claim triggers still pay the winner or contributor directly from the manager. Neither the Flap factory nor its Guardian has manager withdrawal, winner-selection or pool-editing access. The actual Flap page and VaultPortal have not been tested yet; do not treat this as a live participation route.

To independently check a draw, compare verified manager and provider bytecode and their constructor settings; read PoolCreated, ticket purchase events, RandomnessRequested, the coordinator-authenticated fulfillment and OutcomeResolved; calculate randomWord % capacity and read that ticket's recorded owner. Compare the manager's liabilityDiagnostics() and the vault's availableFees with balances and fee events. Local tests are not an independent audit.

Known Limitations

This is a real-BNB Mainnet deployment, but no independent audit is claimed. Confirm source verification and constructor settings on BscScan yourself. The subscription owner must keep VRF configured and funded. If a randomness request remains unresolved for 6 hours, contributors can claim refunds; the expired pool is not automatically renewed. A participant whose receiving contract rejects BNB cannot redirect a claim. RPC outages can hide history temporarily; the frontend must never synthesize a result.