Share it as a Blink
Rendered from the GET response. A wallet's POST gets back a v0 transaction: compute budget, join, mint_receipt. Unfurling on X needs a public HTTPS host, which comes after this local-only stage.
The bigger the flock, the lower the price.
Fall short and you still get paid.
Steer the flock · tap or click to add buyers
Tap an ending to play it
The on-chain math, line for line from logic.rs. Hours into a 7-day window.
| Buyer | Units | Joins at h | Leaves at h | Weight | Deposit | Gets back | Net per unit |
|---|
Test wallets, the program's own math, nothing sent anywhere.
| Wallet | Balance | Pledge | Weight | Units | Actions |
|---|
Local chain One tap, one transaction, one receipt.
Every card is drawn from a real localnet run of client/solana-test.ts. Test wallets and test USDC; nothing here is on devnet or mainnet yet.
Rendered from the GET response. A wallet's POST gets back a v0 transaction: compute budget, join, mint_receipt. Unfurling on X needs a public HTTPS host, which comes after this local-only stage.
The wallet POSTs its address and signs what comes back. The POS finds the payment by its reference key (). In the test run this lookup found exactly that signature. The domain is a placeholder; the test ran on 127.0.0.1.
A non-transferable credential copied from the on-chain seller profile. Anyone can refresh it and nobody can inflate it. Other protocols read the score without asking Flocca.
| Field | First sync | After a refresh |
|---|
| Transaction (measured) | Compute units |
|---|
| Account rent (refundable) | SOL |
|---|
v0 transactions with a per-campaign address lookup table. Priority fee taken from recent fees on the campaign account (zero on a local chain).
A 2-of-3 vault holds the upgrade authority and the fee admin, behind an on-chain timelock. Tested against the real Squads program cloned from mainnet.
Jupiter swap instructions and the join run in one atomic v0 transaction. Locally the swap is a mock with Jupiter's instruction format, since real routes need mainnet liquidity.
Bubblegum cNFT receipts for very large campaigns. They need a Merkle tree and a DAS indexer, so they aren't built yet. See CRYPTO_DESIGN.md.
Leaving is frozen during the lock window. A buyer can't pull out at the last second to push a campaign under its threshold and farm the bonus with a second wallet.
People who leave early pay into the bonus pool. On success it goes back to the merchant, and on failure it goes to the buyers who stayed.
A merchant can cancel before the deadline, but buyers are then paid exactly as in a failed campaign, bonus included.
Finalize is permissionless. A sold-out campaign settles immediately at the deepest tier.
A new seller must stake at least 5% of the first tier's raise. A proven seller can go as low as 1%. Cancels cost 150 points each.
Every payout uses floor rounding from one vault. The leftover dust is always smaller than the number of claimants, and it is swept to the treasury when the vault closes.
A dominant assurance contract built into a volume-priced group buy. Either the group forms and you pay the group price, or it doesn't and you are paid for having tried. Staying out is never better.
A seller can hold back part of the proceeds until the order ships. Buyers can flag a bad delivery, and the held money is only ever split across all of them.
Sample campaigns The money stays in your wallet. The mandate can spend only its budget, and only where every rule holds.
Sample data A local test run, read back by the indexer. Not real activity.
| Seller | Score | W / L / C | Bonus floor | Volume |
|---|
| Recent campaign | State | Units | Price |
|---|
Tap a milestone
Every account, and who moves money between them.
An Anchor 0.31 program with a pure math module and unit tests, localnet integration tests and an end-to-end demo. Accounts: config, treasury, campaign[id], vault[campaign], pledge[campaign, buyer], merchant[seller], plus Token-2022 mints receipt[campaign, buyer] and credential[seller].
Finds expired or sold-out campaigns, finalizes them, settles merchants and sweeps empty vaults. Every step is permissionless.
A TypeScript port of the program math. It quotes deposit, early weight, current price and the bonus a pledge would earn if the campaign failed today.
A merchant API answers HTTP 402 with a pledge request. An app or agent checks it against the live campaign and its budget, pledges on-chain, and retries with the signature.
| Instruction | Who | What it does |
|---|---|---|
| initialize | Upgrade authority | Creates config and treasury, and sets the protocol fee (10% max) and the admin timelock. Only the program's upgrade authority can call it. |
| propose_fee / apply_fee | Admin | Queues a fee change that applies only after the timelock. Open campaigns keep the fee they started with. |
| withdraw_treasury | Admin | Moves protocol revenue (fees and rounding dust) to an admin account. |
| create_campaign | Merchant | Validates tiers and schedule (90 days max), checks the bonus against the seller's reputation floor, opens the vault, and deposits the bonus. |
| join | Buyer | Deposits units at the ceiling price. A repeat join tops up the same pledge. |
| leave | Buyer | Allowed before the lock. Refunds the deposit minus the exit fee and closes the pledge. |
| finalize | Anyone | After the deadline or at sell-out, marks the campaign Succeeded at the clearing price, or Failed, and records the outcome on the seller's profile. |
| cancel | Merchant | Before the deadline. The campaign fails, buyers keep the bonus, and the seller's profile records a cancel. |
| claim | Buyer | Pays the rebate, or the refund plus weighted bonus, and closes the pledge. |
| settle_merchant | Anyone | Pays proceeds minus the fee plus the pool to the merchant, and the fee to the treasury. |
| sweep | Anyone | Once everyone is settled, sends rounding dust to the treasury and closes the vault. |
| mint_receipt | Anyone (buyer in a Blink) | Mints the buyer's soulbound Token-2022 receipt with campaign, join order, tier, units and status in on-chain metadata. |
| retire_receipt | Anyone | After claim or leave: marks the receipt settled on success, or burns it and closes the mint on refund, returning the rent to the buyer. |
| sync_credential | Anyone | Mints or refreshes the seller's soulbound credential from the on-chain seller profile. |
| configure_escrow | Merchant | Before the first join: share of the net to hold back (up to 50%), time to ship, length of the dispute window. |
| mark_shipped | Merchant | Posts a 32-byte shipping proof before the ship-by time and opens the dispute window. |
| dispute | Buyer | Flags a shipped order inside the window. A vote toward a 20% quorum, never a payout. |
| release_escrow | Anyone | Refunds the held part if nothing shipped, releases it under quorum, opens arbitration at quorum, or applies the 50% default if the arbiter is silent. |
| resolve_dispute | Arbiter | Rules a refund share for all buyers by units; the rest goes to the seller. |
| set_arbiter | Admin | Names the arbiter (a Squads multisig in production). |
| create_mandate | Buyer | Gives an agent key a budget, price ceiling, per-campaign cap, seller floor, escrow minimum and expiry; the mandate becomes the delegate for exactly the budget. |
| join_via_mandate | Agent | Pledges with the buyer's funds after every mandate rule passes; the pledge is the buyer's. |
| revoke_mandate | Buyer | Clears the delegation and closes the mandate. |