Contracts
Deployed
BSC mainnet (chainId 56), deployed after block 129997564:
| Contract | Role | Address |
|---|---|---|
| ZebraFactory | factory | 0x35a1A35ADbc9508F84A6690bCE917BC1b947c529 |
| ZebraLaunch | Classic template (cloned per round) | 0x87d3272fba0819eF9a7D41B9D949B95C7cC70511 |
| ZebraBinding | wallet binding | 0xDFe27AAf56723a3e4f61FB68a2952b00d8fF8497 |
| FlapAdapter | Flap adapter | 0xf7439D511f3605B5397888bf41b6d391101bf9B9 |
| Safe | Zebra DAO multisig (2 of 3) | 0xBB1ED7B0abdF3f6fce294BA0B5f9b7ed419f6481 |
Components
| Contract | Role |
|---|---|
ZebraFactory | Generic factory. Registers game templates (proposed by the multisig, usable after 1 day; immutable once registered, can be disabled) and creates each round with createLaunch(templateId, params) as an EIP-1167 clone of a template. Holds the settings every template shares: fee (1%–5%), DAO address, raise range (0.48–25 BNB by default; 0.48 BNB is about 10% progress on the BNB curve), pause for new rounds, each pool's average-price route, and the binding contract address (also changed only after 1 day). Settings only affect rounds created afterwards. |
ZebraLaunch (Classic template) | One round: subscribe, exit, launch, distribute, claim, refund. Shares are counted per Agent ID: the address holding the ID or the wallet bound to it may subscribe, one share per ID, and the first subscribing address is the round's payee for that ID. Checked at creation: each tax at most 10% (Flap's limit), a 1%–5% slippage cap on non-BNB pools, route pools keeping at least 30 minutes (1,800 observations) of price history. Funds can only go to Flap, subscribers or the DAO. |
ZebraBinding | Lets each Agent ID bind one ordinary wallet: the ID signs an EIP-712 authorization (no gas), the wallet submits it. One wallet belongs to one ID; 3-day cooldowns on both the ID side and the wallet side; either side can unbind at any time. No admin. |
FlapAdapter | Read-only helper: checks the issuer's Flap parameters and builds the token-creation call. |
TwapLib | Reads PancakeSwap V3 30-minute average prices (1–2 hops), checks spot deviation, and after the buy verifies Flap actually went through those pools (RouteNotUsed). |
Round functions
| Function | Caller | Does |
|---|---|---|
subscribe() payable | Agent ID holders, or the wallet bound to one | Subscribe or top up; the filling subscription only takes up to the target and returns the rest |
exit() | Subscribers | Exit before full, refunded minus the fee |
launch() | Anyone | Launch once full; reverts entirely on failure and can be retried |
distribute(n) | Anyone | Push tokens and unused BNB in batches |
claim() | Subscribers | Claim your own share |
abandon() | Anyone | Full refunds if not launched within 3 days of filling |
refund() / refundBatch(n) | Subscribers / anyone | Claim / push refunds in batches |
withdraw() | Anyone | Withdraw BNB that couldn't be pushed and was recorded instead |
withdrawTokens() | Subscribers | Withdraw tokens that couldn't be transferred at distribution and were recorded instead |
sweep() / sweepToken(t) | Anyone | After full settlement, send dust and stray tokens to the DAO |
Views: idOf(addr) (the ID this address acts for in the round), payeeOf(id) (the ID's payee in the round), creatorId(), stage(), raised(), subscriberCount(), subscribed(addr), exitQuote(addr), previewFor(addr), owedWei(addr), owedTokens(addr), totalOwed(), totalOwedTokens(), feeCharged(), spent(), tokensBought(), token(), cfg(), terms().
Events
Created(creator, creatorId, kind, quoteToken, target, feeBps, salt) · Subscribed(who, id, handle, amount, total, returned) · Exited(who, amount, fee, refunded, pushed) · Filled(raised, subscribers) · FeePaid(to, amount, atLaunch, pushed) · Launched(token, fee, spent, tokensBought, subscribers) · Abandoned() · Distributed(who, tokens, refundWei, pushed) · Refunded(who, amount, pushed) · Withdrawn(who, amount) · TokensOwed(who, amount) · TokensWithdrawn(who, amount) · DistributionDone() · Swept(to, bnb, tokens)
Factory: LaunchCreated(launch, creator, templateId) · TemplateProposed / TemplateActivated / TemplateCancelled / TemplateDisabled · BindingProposed / BindingActivated / BindingCancelled · RouteSet(quoteToken, pool1, pool2) · PolicyUpdated() · Paused(paused)
Binding contract: Bound(id, wallet, handle) · Unbound(id, wallet, by) · SignaturesRevoked(id, nextNonce)
External contracts (BSC)
| Contract | Address |
|---|---|
| Agent ID HandleRegistry | 0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F |
| Flap Portal | 0xe2cE6ab80874Fa9Fa2aAE65D277Dd6B8e65C9De0 |
| Flap VaultPortal | 0x90497450f2a706f1951b5bdda52B4E5d16f34C06 |
| Flap Split Vault Factory | 0xfab75Dc774cB9B38b91749B8833360B46a52345F |
Safety
- No admin withdrawal, no upgrades; the factory owner can only change policy for new rounds.
- A failed push never blocks others: BNB or tokens that can't be sent are recorded and the owner withdraws them.
- The launch fee is capped so that fee + BNB spent never exceeds the raise; any raise amount settles.
- Internal security review completed in October 2026: Slither and Aderyn static analysis, a function-by-function manual review, an independent second reviewer, about 2.3 million randomized calls of Foundry and Medusa fuzzing and invariant testing, and 41 tests (including real Flap on a BSC mainnet fork). All 8 issues found are fixed; the report is
audit/REPORT.mdin the contracts repository. A third-party audit is planned before launch.