You buy. The cabal dumps on you. You're left holding the bag.
A new memecoin goes live, and you buy in. Minutes later, the cabal dumps their bags and the price crashes. You're left holding the bag. Fair Chance is a memecoin launchpad on NEAR. Every coin it launches slows the dump inside the coin itself, at launch and every day after, so snipers, the creator and whales sell a bit at a time. How much they can sell follows the pool's depth, and a whale cannot get around it by sending tokens to new wallets.
Built for NEAR HACKATHON, track Memecoins With Mechanics.
Watch the 3-minute demo video. It shows a launch in the live app and our test cabal selling into it, on NEAR testnet. Testnet only, not audited.
- Live app (NEAR testnet): https://fair-chance-rho.vercel.app
- Demo video (3:03): https://vimeo.com/1246907899
- Launch post: the thread on X
- The coin from the video: Bag Holders Club (
bagclub.factory.fairchance.testnet) - Coin code hash:
6Ld5DFTJ1BYc6uzb6YYvdK3yAMHdfBsvrwNEhsKE9er3, the same for every coin, and a local rebuild ofb42fddeprints it (Network) - Login: none to read. A NEAR testnet wallet is needed only to launch, buy or sell.
The coin page of Bag Holders Club, the coin from the video, read from NEAR testnet on 14 November 2026. The receipts show the test cabal's partial fills and the reason for each.
- Open the Bag Holders Club coin page. This is the coin launched in the video. The receipts list every sell that went through, with its fill and the reason in plain words: the test cabal's partial fills and the normal buyer's full sell.
- On the same page, open Coin account checks. The page reads the chain: the coin is a direct sub-account of the factory, runs the known code by hash, and has no access keys.
- Open the normal buyer's sell on the explorer: 3BLiLW…. It sold 2.7M of 2.7M BAGCLUB in full.
- To trade yourself, connect a NEAR testnet wallet on the live app and follow the "How to try" box. To rerun the sniper attack with no wallet and no key, see Run the sniper scene yourself.
The whole supply is minted once at launch, and no burn method exists. The rules slow a dump. They do not stop it. See Known limits.
- Judge path, 2 minutes, no install
- The problem
- What it does
- What is new here
- Why memecoins
- Try it in 90 seconds
- Run the sniper scene yourself
- For judges
- How it works
- Architecture
- The rules
- How this differs from a per-sell cap
- Network
- Check it yourself
- Check it from a terminal
- Measured results
- Known limits
- Not in this release
- Libraries and templates
- Layout
- License
Deeper pages: evidence, TLA+ model, OVERVIEW, INTERFACE, GLOSSARY, ADRs.
A new memecoin launches, and in the first minutes the creator and a few large wallets sell into the pool. Later buyers take the loss. Tools that warn a buyer act after the damage. A high fee on early buys is paid once, and it does not limit the later sells. OVERVIEW has the full case.
One preprint measured pump.fun on Solana from 8 August to 18 September 2026: retail buyers got back 0.754 per unit they put in, token creators 1.56, and launch-block buyers 1.49 (Gatto, SSRN 7676458, abstract). The author says the 2026 figures describe that market in that window, not memecoins in general.
Fair Chance is a launchpad where each coin limits its own sells, so snipers, the creator and whales cannot dump a whole bag on later buyers at once. Every holder can sell part of their bag at a time, and the amount follows how deep the pool is. Wallets that bought in the first blocks get a tighter limit, and their tokens cannot be sold while those blocks are open. A sell above a limit fills in part, and the rest stays in the wallet. The limits live in the coin contract, so no off-chain part can lift them. The rules lists each rule with its decision record. How it works follows one coin from launch to alert.
For a buyer, there are no extra steps: you buy and sell in the app as usual, and the coin applies the limits from the first block. The limits apply to every holder, you included. A bag smaller than one allowance has no allowance limit (Small bag). A sell above your allowance fills in part, and a buy in blocks 0 to 17 pays the higher early fee. When insiders sell, the price moves in small steps, not in one crash. For a creator, buyers can check the rules on chain before they buy, and the creator earns 30% of the 1% swap fee once the pool has held 10 real NEAR for 24 hours (ADR 0010).
Each row is a common anti-dump tool, where it falls short, and what Fair Chance does in its place. The last row is a tool Fair Chance uses as it is.
| Common tool | Where it falls short | What Fair Chance does |
|---|---|---|
| A max sell per transaction | It refuses a sell above a fixed amount. The seller splits the sell into many small sells. | The limit is per account per hour, not per sell, so many small sells in one hour fill the same as one sell. A sell above the limit fills in part instead of failing, and the rest stays in the wallet. |
| A cap with a fixed size | The same number is too loose in a thin pool and too tight in a deep one. | The limit follows the pool's depth. One allowance moves the price by 2% at most, at any pool size. |
| A lock or vesting for the team | It covers only the wallets the team names. Snipers who buy in the first seconds are free to dump. | Every wallet that buys in blocks 0 to 17 is treated like the creator group: all of them share one allowance per 24 hours. In our testnet runs, 10 sniper wallets shared one allowance and sold 5.2% to 7.8% of what they asked. |
| A limit per wallet | A whale sends its bag to many new wallets and sells from each one. | A large holder (2% of supply or more) cannot send tokens, and a send that would make the receiver large is refused. A buy is the one way to become large. |
| Limits per account only | Many accounts that each stay inside their limit can still drain the pool together. | One pool-wide cap: large, band and early-supply sells together can take out at most 5% of the pool's real NEAR per window. |
| A high fee on early buys | It is paid once and does not limit later sells. | Fair Chance uses one too: 50% at launch, falling to 1% by block 17. This part is not new. |
All of these rules run inside the coin contract, and the coin has no keys.
People buy memecoins for more than the price. In Kraken's 2025 survey of US crypto holders, the top reasons people first became interested in memecoins were the price swings, a tip from friends or family, and the fun, satirical nature of the coins. 23% said they bought memecoins as a source of entertainment (Kraken). A memecoin is a joke that a crowd shares, with a ticker, a picture and a price, and anyone can join with one buy.
NEAR already has memecoin launchpads, such as meme.cooking and nearly.trade (neartrade analytics), and this hackathon has a track for them. The fun ends when each new buyer is the exit for the insiders. A token is the right place for the fix, because every buy and sell goes through the token's own contract, so the rule runs on every trade and needs no app or server to enforce it.
You need the tools below. verify.sh doctor checks every pin and starts nothing.
- Rust 1.97.1 with the
wasm32-unknown-unknowntarget (rust-toolchain.tomlsets both) cargo-near0.21.1, Go 1.26, Node 24.13.1 (web/.nvmrc), Google Chrome- A
near-sandbox2.13.4 binary, withNEAR_SANDBOX_BIN_PATHpointing at it
-
Check the tools.
.claude/skills/verify/verify.sh doctor
You see one
doctor: okline per tool and thenverify: PASS (doctor). -
Launch a coin on a fresh sandbox, buy, sell, and read the receipt.
scripts/walking-path.sh
The script builds the contracts, starts a sandbox, launches one coin through the factory, buys, sells half, and prints the
fc_sellreceipt with the interface field names. The Go watcher then reads the same receipt and sends one alert to a fake sender. The script exits 0 when every step passes, and non-zero when any step fails. -
See a sell refused in part on purpose.
cargo test --locked -p fair-chance-rule-engine --test partial_fill_and_band_penalty \ a_large_sell_above_its_allowance_fills_the_allowance_left_and_the_rest_stays_in_the_walletThe test passes. A large holder asks to sell more than one allowance. The coin fills the allowance, and the rest stays in the wallet.
-
Run the whole judge path in one command.
scripts/judge-path.sh
The script launches the demo coin on a fresh sandbox and refuses an opening buy above 4% and an early-window sell. It then buys a large bag, refuses a send, fills a sell in part, and fills a sell up to the real NEAR cap. It shows the receipt on the coin page in headless Chrome and sends the watcher alerts to a fake sender. It prints one
PASSline per check and exits 0. The first failed check prints aFAILline and exits 1. It needsNEAR_SANDBOX_BIN_PATH.
One command plays a sniper cabal on a fresh local sandbox and prints its numbers:
scripts/sniper-scene.shIt takes about 3 minutes plus the first build. It needs near-sandbox 2.13.4 (NEAR_SANDBOX_BIN_PATH), cargo-near 0.21.1 and python3. Google Chrome makes the PNG charts (FC_BROWSER_PATH overrides the binary). Without Chrome you get the SVG charts only. It uses throwaway sandbox keys and never touches testnet.
What happens, with the fixed rules:
- The creator launches a coin with an opening buy.
- A funder makes 10 sniper wallets. They buy together in the first blocks, so all their tokens are early supply.
- Each sniper tries to sell its whole bag inside the early window (blocks 0 to 17). Every sell is refused with
FC_EARLY_WINDOW. - After the window, 3 ordinary buyers buy a small bag each. Then the snipers sell their whole bags, and then the buyers sell theirs.
- Last, the creator sells its whole bag. The snipers and the creator share one allowance, so the shared allowance left ends at 0.
The result of two clean runs, with the same numbers in both (group totals):
- Early-window sells: all refused with
FC_EARLY_WINDOW(FROM CHAIN). - The snipers' asked tokens that went through: 3.9% with Fair Chance (FROM CHAIN), all of them without (CALCULATED).
- The pool's real NEAR the snipers took: 2.9% with Fair Chance (FROM CHAIN), 60% without (CALCULATED).
- Price drop from the snipers' sells: 1.66% with Fair Chance (FROM CHAIN), 32.02% without (CALCULATED).
- The ordinary buyers' sells: filled in full (FROM CHAIN).
- The shared allowance left after the creator's sell: 0, except for rounding dust (FROM CHAIN).
The script writes summary.md, derived.json, run.json and the two charts to target/sniper-scene/<run id>/. FROM CHAIN means read from the sandbox receipts and views. CALCULATED means a plain pool with the same fee, the same start and the same order, with no Fair Chance limit (analysis/sniper-scene/analyze.py). Each sell matches fc_quote_sell read just before it, and a replay of the sniper receipts gives the chain's pool exactly. If an early sell lands after block 17, the script prints FAIL and no numbers.
Conditions:
- The shared allowance refills every 24 h. It slows the dump. It does not stop it forever.
- It binds before the 5% real NEAR cap only when the pool's real NEAR is above about a quarter of its virtual NEAR.
- The ordinary buyers' full fill is a same-hour round trip. A buyer who sells in a later hour is limited by its own allowance.
The scene ends with one more test on a second coin. Two accounts make the same buy: one in block 10 after launch, inside the early window, and one in block 23, after it. Both then sell their whole bag in the same hour as their buy.
- The early buy sold 16.3% of its bag. Its limit was the allowance. It also paid the early buy fee, so it got about 17.7% fewer tokens for the same NEAR.
- The late buy sold 100% of its bag, with no limit, because a round trip inside one hour fills in full.
So the quick flip is gone for the early buy. This is a local sandbox run, not testnet, and it says nothing about price. Command, commit and condition are in evidence/sniper-scene-local.md.
Each judging criterion, and where to check it. The demo video shows the app and the attack in 3 minutes.
| What is judged | Where you see it |
|---|---|
| Technical implementation | The rules run in the coin contract. Run step 2, then cargo test --workspace --locked (evidence). |
| Design | The coin page shows limits, receipts and refusals in plain words. Open the live site on NEAR testnet. The code is in web/. |
| Impact | The problem is in OVERVIEW. Demand is not measured, and the numbers are a replay and a simulation (measured results). |
| Originality | What is new here, differences from a per-sell cap and credits. The falling early fee is not new (ADR 0008). |
| Sustainability | The creator earns a fee share after the pool holds depth for 24 hours (ADR 0010). |
| The mechanic, not the chart | Sell limits, partial fills and the real NEAR cap sit in rule-engine/ and contracts/coin/. No price chart is a rule. |
| Mechanic in the contract, not a backend | One contract holds the token and the pool (ADR 0002). The watcher and the page read and explain. They hold no rule. |
| Parameters set at launch, no admin key | The coin account and the factory account have no access keys, and every value is a constant read with fc_rules (ADR 0006). |
| Sybil limits written plainly | Known limits and evidence. |
| A page with live state and a log | The Bag Holders Club coin page, the coin from the video, reads its state from NEAR testnet and shows one receipt row per sell. |
| A 60-day simulation under a few scenarios | analysis/FINDINGS.md |
flowchart LR
L[Creator calls launch on the factory] --> N["Coin account created, code used by hash, new runs: fc_launch"]
N --> B[Buy on the coin's own pool]
B --> Q[Sell request with 1 yoctoNEAR]
Q --> R{"Rule engine: early window, class, allowance, creator group, marked tokens, NEAR cap"}
R -- full --> E[fc_sell event]
R -- partial --> E
R -- refused --> X["FC_ refusal code, no state change"]
E --> W["Watcher: FastNEAR or block scan"]
W --> A[Plain alert and the public /check card]
E --> P["Coin page reads the same chain, no wallet"]
- Launch. A creator calls
launchon the factory with a name, a ticker and an optional opening buy. The factory sends one batch: create the coin account, use the coin code by its hash, callnew. The batch holds no key. An opening buy that takes the creator group above 4% of supply is refused withFC_CREATOR_CAP, and the whole batch rolls back and returns the deposit. After a good launch the factory logsfc_launch. Code:contracts/factory/. Check: thefc_launchevent, andfc_ruleson the coin. - Buy.
buy(min_tokens_out)swaps NEAR for tokens on the coin's own constant-product pool, which has a virtual NEAR reserve. A buy in blocks 0 to N is early supply. It carries the falling early fee and is marked. A buy that takes an account to 2% of supply makes it large and logsfc_became_large.FC_SLIPPAGErefuses a buy belowmin_tokens_out. A buy is never filled in part. Code:rule-engine/src/pool_math.rs,rule-engine/src/early_buy_fee.rs. Check:fc_quote_buy, then thefc_buyevent. - Send. A large account cannot send (
FC_LARGE_CANNOT_SEND). A send that would make a receiver large is refused (FC_RECEIVER_WOULD_BE_LARGE), and so is a send into the coin (FC_SEND_TO_COIN) andft_transfer_call(FC_TRANSFER_CALL). Marked tokens leave first. Code:rule-engine/src/holder_class.rs. Check:fc_accountshowscan_sendandmax_receive. - Sell request.
sell(amount, min_near_out)needs exactly 1 yoctoNEAR (FC_ONE_YOCTO). Marked tokens cannot sell in blocks 0 to N (FC_EARLY_WINDOW). A sell is never refused for exceeding a limit. A limit gives a partial fill instead. - Rule engine. The engine reads the account's class (small, band or large, with the class floor), then fills as far as these limits allow: the allowance of the window (net of buys), the shared early-supply allowance for marked tokens, the pool-wide NEAR cap, and the floor that always fills. A band account that sells above its first allowance pays a 10% penalty that stays in the pool. Code:
rule-engine/src/actions.rs,allowance.rs,early_supply.rs,real_near_cap.rs,creator_group.rs. Check:fc_quote_sellreturns the same answer as the real sell, with no state change. - The result. The fill is
full,partialornone.FC_SLIPPAGErefuses when the price per token of the filled part is belowmin_near_out(a partial fill does not fail slippage). Thelimit_reasonsays why a sell filled less:allowance,cap_fullorfloor. The coin logsfc_sell, andfc_cap_filledwhen the sell fills the cap. Check: the receipt on the coin page, or the event in the transaction on an explorer. - Watch. The watcher reads the coin's events with the FastNEAR transactions API on testnet, or by scanning blocks over plain NEAR RPC on a sandbox. It turns each limited-sell event into one plain sentence and sends it. It holds no NEAR key and signs nothing. The
/checkcommand reads the coin's views and writes a "who can sell now" card for any coin of the factory. Code:watcher/internal/eventsource/,watcher/internal/alerts/,watcher/internal/checkcard/. - Read and trade. The coin page reads the same views and events from the chain. Reading needs no wallet, no login and no key. To launch, buy or sell, a visitor connects a NEAR testnet wallet and signs each call in that wallet. The page holds no key. Code:
web/src/chain.ts,web/src/receipts.ts,web/src/page-wallet.ts.
When a step fails, the contract refuses with its code, and the call changes no state. Refusal texts are in refusal-texts/. The code list is in INTERFACE.
| Part | Where it runs | What it does | Can it move funds or change a limit? |
|---|---|---|---|
Factory (contracts/factory/) |
NEAR, one account (factory.fairchance.testnet) |
Launches each coin in one batch and records the one coin code hash. | Calls new once. No coin method gives it a special right. |
Coin (contracts/coin/) |
NEAR, one account per coin, no access keys | Token, pool and every rule. Calls into rule-engine/. Hard refusals return an FC_ code. |
Yes. It is the rule. |
Rule engine (rule-engine/) |
Compiled into the coin; also run by tests as plain Rust | The rules as pure functions. | Only through the coin. |
Coin page (web/) |
Static files in a browser, plus a read-only relay (web/api/rpc.js) on the hosted site |
Reads views from a NEAR testnet RPC and events from FastNEAR, and shows limits, receipts and refusals. On the hosted site, the views go through the relay. | No. |
Watcher and bot (watcher/) |
A Go process the builder runs | Reads events, sends alerts to the builder's private chat, answers /check. |
No. |
There is no backend that holds a rule or a signing key. On the hosted site, the page reads through a small relay at /api/rpc. It forwards only allowed query reads to a NEAR testnet RPC and cannot send a transaction. The rules run on chain. Each coin holds no key. The factory account has no access keys either. Its last key was deleted on 14 November 2026, so nobody can change the factory or how future coins launch. Each coin has no keys and runs its code by a fixed hash. The page is static. It reads the chain, and it sends a buy, a sell or a launch only when the visitor signs it in their own wallet. The watcher and the page can go offline, and the coin still enforces every rule.
Nobody can change a coin after launch. These three lines are the claim (ADR 0006):
- The coin account has no access keys.
- Its code is a global contract used by a stated code hash.
- The contract has no owner, pause, setter or upgrade method (
coin_method_listtest).
Values are the fixed constants in rule-engine/src/fixed_values.rs. Every coin gets the same ones. The creator fee share and its minimum depth may change in a later coin version. A coin that is already launched keeps its values, because nobody can change it (ADR 0010).
Words used here (full list in GLOSSARY):
- Cabal: a group of wallets that one person or team controls, such as snipers funded by one wallet. The coin cannot see who controls a wallet, so it limits early supply, the creator group and large accounts instead. Our test cabal is wallets we funded to attack our own coins.
- Early supply, also called marked tokens: tokens any account buys in blocks 0 to 17 after launch, and tokens the creator group buys or receives.
- Window: the time one allowance lasts. It is 1 hour for normal tokens and 24 hours for early supply. All windows count from the launch, so every account resets at the same moment.
- Allowance: the most an account may sell in one window. Pool depth sets its size. All early supply shares one allowance, split by balance.
- Small, band and large: the size of an account. A small account holds less than one allowance. A band account holds between one allowance and 2% of supply. A large account holds 2% of supply or more.
- Real NEAR cap: one limit for the whole pool. In one window, large, band and early-supply sells together can take out at most 5% of the real NEAR in the pool. A band account's first allowance does not count.
- Floor: a small amount, 0.1% of the pool's tokens, that a limited sell can always sell once per hour, even when the cap is full. Each normal account has its own floor. All early supply shares one floor.
- Virtual NEAR: 100 NEAR that the pool counts in the price from launch. Nobody put it in, and nobody can take it out.
| Rule | What it means for a trader |
|---|---|
| Window | Allowances reset on a fixed schedule that starts at launch: every hour for normal tokens, every 24 hours for early supply. |
| Allowance | Normal tokens: each account may sell up to one allowance per window. A band account may sell more and pays the penalty. Early supply: all early supply shares one allowance, split by balance. Pool depth sets the size, so that one allowance moves the price by 2% at most (p_bps 200) (ADR 0004, ADR 0001). |
| Small bag | If your bag is smaller than one allowance, you can sell all of it with no allowance limit. This holds if you were never large, did not hold more than one allowance earlier in this window, and hold no early supply. Tokens you bought this hour are different: selling them counts toward the cap, and when the cap has too little room, the profit on them is held back (ADR 0005). |
| Class | Your class is small, band or large. Large starts at 2% of supply. Within one 1-hour window, your class does not drop below the class you had just before your first action in that window. One exception: a large account that sells down to zero is band for the rest of the window. So splitting one sell into many small sells gives no advantage (ADR 0001, rule-engine/src/holder_class.rs). |
| Large holders | A large account cannot send tokens. A send that would make a receiver large is refused. A buy is the one way an account becomes large. A large account stays large until its balance is zero, then it is band for the rest of the window. |
| Partial fill | A large or early-supply sell above the allowance fills in part. The rest stays in the wallet (ADR 0004). |
| Band penalty | A band account may sell more than one allowance. It pays a 10% penalty on the NEAR from the part above the allowance, and the penalty stays in the pool. Its first allowance in each window always fills and does not count toward the real NEAR cap. The exception is tokens it bought in the same window (ADR 0004). |
| Real NEAR cap | In each window, large, band and early-supply sells together can take out at most 5% of the real NEAR in the pool (real_cap_c_bps 500). The coin checks this after every sell, at every pool depth. When the cap is full, a large or early-supply sell still fills its floor (0.1% of the pool's tokens in that window) once per hour. A band account's first allowance does not count toward the cap (ADR 0005). |
| Early window | A buy in blocks 0 to 17 after launch is early supply. The page labels it "bought in blocks 0 to 17". These tokens cannot be sold until block 17 has passed. After that, all early supply shares one allowance per 24 hours (ADR 0008). |
| Early fee | The buy fee starts at 50% at launch and falls to 1% by block 17. The fee goes into the pool, and no account is exempt. A falling fee is not a new idea. |
| Creator cap | The creator group may hold at most 4% of supply (ADR 0003). |
| Creator fee | The creator earns 30% of the normal 1% swap fee. A claim pays after the pool holds 10 real NEAR for 24 hours (ADR 0010). |
| Sell needs 1 yoctoNEAR | A leaked app login key cannot sell (ADR 0009). |
| Buy without storage | buy refuses an account with no storage record. Call storage_deposit before it, or send both calls in one transaction. |
- The limits follow pool depth, not a fixed share per sell (ADR 0001).
- A limited sell fills in part. It does not fail (ADR 0004,
partial_fill_and_band_penaltytests). - A large holder cannot split a bag by sends: large accounts cannot send, and a send cannot make a receiver large (
holder_class_and_sendstests). - The creator group shares one limit, and so does all early supply (ADR 0001).
- One cap limits all real NEAR paid out per window (ADR 0005,
real_near_captests).
In facts, against meme.cooking: its docs describe an auction where every depositor buys at the same price, then a pool on Ref Finance with locked LP shares. Fair Chance has no auction and no outside pool. The coin holds its own pool, and sells face the limits above.
Testnet only. Testnet NEAR and these tokens have no value.
-
Factory:
factory.fairchance.testnet -
First test coin, BAG:
bag.factory.fairchance.testnet -
Coin code hash:
6Ld5DFTJ1BYc6uzb6YYvdK3yAMHdfBsvrwNEhsKE9er3 -
Launch of BAG: explorer
-
Deployed commit, from the coin's source metadata:
b42fdde -
The coin from the demo video:
bagclub.factory.fairchance.testnet. Launch: explorer -
The factory account has no access keys. Its last full-access key was deleted on 14 November 2026: explorer. Launches still work, because
launchis a public method.
The coin's source metadata names commit b42fdde and the pinned build image, by digest. That is the NEP-330 record of a reproducible build. A local rebuild matches it: on 14 November 2026, cargo near build reproducible-wasm in contracts/coin/ at a clean checkout of b42fdde (host cargo-near 0.21.1, pinned image sourcescan/cargo-near:0.22.0-rust-1.97.1, Docker on Apple silicon) printed SHA-256 base58 6Ld5DFTJ1BYc6uzb6YYvdK3yAMHdfBsvrwNEhsKE9er3. That is the global_contract_hash the chain holds for each coin launched so far (CABAL, CABAL2, BAG, QALAUNCH and BAGCLUB), so the code on chain is the code at b42fdde in this repo.
The run in the demo video comes first. It was launched from the live app on 14 November 2026.
- BAGCLUB, the video run (
bagclub.factory.fairchance.testnet, launched from the app with no opening buy). One wallet funded 10 sniper wallets. They bought in the first blocks after launch, inside the early window (blocks 0 to 17), so everything they bought is marked. All 10 early sells (10 of 10) were refused withFC_EARLY_WINDOWwhile the window was open. After the window they asked to sell 38.27M and sold 2.99M (7.8%), read on chain fromfc_early_window.shared_allowance_used; the rest stayed in their wallets. Every limited sell filled above zero, and the smallest was 93.2K. Then a normal buyer, the builder's second account, bought 2.7M BAGCLUB for 0.3 NEAR after the window and sold all 2.7M for 0.294 NEAR, filled in full. Launch: explorer. Normal buy: explorer. Normal sell, in full: explorer. The coin page lists every sell receipt with its reason.
Three earlier runs are recorded, each in a file in evidence/. Text here gives group totals and percentages. Each sell and each hash is in the file. The two early-supply totals (6.91M and 2.98M) are the exact fc_early_window.shared_allowance_used values read from the chain after each run, with block height and block hash, in the chain_read field of each file; the chain resets that value when the early window ends. The other amounts are rounded as the run log printed them.
- BAG (
evidence/testnet-run.json). 20 buyers bought after the early window, so nothing is marked. 18 of them sold: 17 in full and 1 in part at the pool cap (limitcap_full). Together they sold 99.5% of what they asked to sell. Partial fill: explorer. - CABAL (
evidence/testnet-cabal-run.json). 10 wallets funded directly by the same wallet bought in block 12 after launch, inside the early window. Everything they bought is marked. All 10 early sells (10 of 10) were refused withFC_EARLY_WINDOW. After the window they asked to sell 134.1M and sold 6.91M (5.2%); the rest stayed in their wallets. The later buy, made after the window with nothing marked, was sold 100% in full. Launch: explorer. An early sell, refused: explorer. A later sell, in full: explorer. - CABAL2 (
evidence/testnet-cabal2-run.json). The same test on a second coin with smaller buys. 10 of 10 early sells were refused withFC_EARLY_WINDOW. The 10 wallets asked to sell 39.5M and sold 2.98M (7.5%). The later buy was sold 100% in full. Launch: explorer.
In the BAGCLUB run and both CABAL runs the 10 wallets share one early-supply allowance. Each partial fill ends at the allowance, the pool cap or the floor, and the sell's limit_reason says which.
The BAG buys landed in block 23 after launch, after the early window, so the BAG run shows no early fee and no marked token. The CABAL runs bought inside the window and show marked tokens and the early-window refusal on testnet. The early window is blocks 0 to 17. It lasts about 10.5 seconds at the measured testnet block time: 0.5812 seconds per block, from 1,000 final blocks in 581.165 seconds (evidence/testnet-run.json).
cargo test --workspace --locked # rule tests, property tests, sandbox tests
.claude/skills/verify/verify.sh # the merge gate: sandbox walking path, page in Chrome, private-string scanBuild the coin wasm the reproducible way (needs Docker and cargo-near 0.21.1, and the tree must be clean):
scripts/build-coin-reproducible.shThe script builds from a clone of the committed source, checks the hash against the wasm file, and prints build-coin-reproducible: commit <commit> code hash <hash>. It also leaves the hash in target/near-reproducible/fair_chance_coin/cargo-near-sha256-base58.txt.
Open docs/evidence.md for what each test proves. Sandbox tests need NEAR_SANDBOX_BIN_PATH and a built wasm (scripts/build-contracts.sh).
These calls only read. They need no wallet and no key. They use BAG, the first test coin. The same calls work for any coin, such as bagclub.factory.fairchance.testnet. The recorded output of each call is in docs/evidence.md.
COIN=bag.factory.fairchance.testnet
RPC=https://rpc.testnet.near.org
call() { curl -s $RPC -H 'content-type: application/json' -d "$1"; echo; }
# 1. The coin has no access keys: "keys" must be an empty list.
call '{"jsonrpc":"2.0","id":1,"method":"query","params":{"request_type":"view_access_key_list","finality":"final","account_id":"'$COIN'"}}'
# 2. The code hash the chain holds: read global_contract_hash (code_hash stays at the empty value).
call '{"jsonrpc":"2.0","id":1,"method":"query","params":{"request_type":"view_account","finality":"final","account_id":"'$COIN'"}}'
# 3. The coin's fixed rules and the hash the coin reports (JSON bytes in result.result).
call '{"jsonrpc":"2.0","id":1,"method":"query","params":{"request_type":"call_function","finality":"final","account_id":"'$COIN'","method_name":"fc_rules","args_base64":"e30="}}'
# 4. Where the code comes from: the source link, commit and build image the coin names.
call '{"jsonrpc":"2.0","id":1,"method":"query","params":{"request_type":"call_function","finality":"final","account_id":"'$COIN'","method_name":"contract_source_metadata","args_base64":"e30="}}'For BAG, call 2 gives global_contract_hash 6Ld5DFTJ1BYc6uzb6YYvdK3yAMHdfBsvrwNEhsKE9er3, and call 3 gives the same code_hash. The hash from call 2 is what the chain holds. The hash from call 3 is what the coin reports; the factory passed it to new at launch. The two must match each other, and the hash a reproducible build of the deployed commit prints. If they differ, the deployed code is not that commit. The local rebuild of b42fdde in Network prints this hash.
Call 1 returns an empty list for the factory too, and for any coin.
The partial fill of the BAG run is in the explorer and in evidence/testnet-run.json.
These are recorded runs. They do not predict results.
| What | Result | Conditions |
|---|---|---|
| Rule tests | 263 passed, 0 failed, 2 ignored (the 2 need Docker). Run on 13 November 2026 (UTC). | cargo test --workspace --locked |
| Property tests | Three random-sequence properties in real_near_cap_properties.rs, with 10,000, 1,000 and 1,000 cases. Failing cases are kept in rule-engine/proptest-regressions/. |
cargo test --locked -p fair-chance-rule-engine --test real_near_cap_properties |
| NEAR launch replay and 60-day simulation | See analysis/FINDINGS.md. | Public-chain replay and synthetic activity. Not a forecast. |
| SMDD replay | With the limits off, the creator sold 4.7% of all tokens sold in that run and took 10.2% of all NEAR paid out in that run in the first hour. With all rules together (early fee, allowance, class and cap), the creator sold 0.02% of all tokens sold in that run and took 0.02% of all NEAR paid out in that run. See the chart and table. | SMDD's first-hour trades on Solana, replayed in order on one Fair Chance pool, limits on in the same coin code, in the near-sdk in-process runner, with exact blocks and times. Groups only, minutes from launch. The difference comes from all the rules together. Sizing in the replay method. |
Notes on the SMDD replay:
Real coin: the creator sold 7.331% of supply. Replay with limits off: 6.77%. The gap comes from the curve shape (pump.fun's 1.073 billion virtual tokens).
5 wallets funded directly by one wallet before launch paid 0.5% of all NEAR paid in for buys in the first hour and sold none in the first hour.
The same-funder check sees direct funding only, so wallets funded through other wallets can sit in "other".
Numbers from a replay or a simulation show how the rules behave. They are simulation, not demand.
The rule slows a dump. Each line below is a way around it or a cost it leaves. Details and tests are in docs/evidence.md and OVERVIEW.
- The rules slow a dump. They do not stop it. The shared early-supply allowance refills every 24 hours, and it grows with the pool's depth, so early supply can leave in parts over several days.
- Wallet splitting. Small sells of tokens held from before the window never count toward the cap. A band holder or a late buyer who splits into small wallets skips the cap. Each fresh small wallet carries at most one allowance per window. Measured at a full cap: up to 0.31 of one allowance's NEAR per fresh wallet (ADR 0005).
- Creator-funded wallets. The contract cannot see who funded an account. A wallet the creator funds that buys after block N is unmarked.
- Late splitters. People who buy after block N through many small wallets at market price skip the early-supply rules.
- Floors above the cap. Each account has its own floor, so many accounts can each fill their floor at a full cap. A buy of X raises the cap by 5% of X, and an account with early supply can fill its sell into that room. The bound is at most one floor per window. Measured: up to 0.29 of one floor (0.031 of 0.106 NEAR, 2,340 swept shapes). Details are in ADR 0005.
- Bots at the reset. Every allowance and the cap reset at the same moment.
- Aggregators and routers cannot buy for users, because the caller holds the tokens.
- Account handover. A holder can give away a whole account, keys included.
- Plain
storage_unregisterdiffers from NEP-145 in two ways. It refuses while the window is open (FC_UNREGISTER_WINDOW_OPEN), and it refuses an account with tokens withFC_UNREGISTER_WITH_BALANCE. - Testnet tokens have no value. Screens marked "sample data" show no real trades.
- A separate Python model of the cap rules, written apart from the Rust code and compared with it case by case. It is not merged yet. The cap rules have rule tests, property tests, sandbox tests and a TLA+ model of one sell (how we checked it).
- Contracts:
near-sdk,cargo-near. Tests:near-sandbox,near-api,proptest,tokio. - Watcher: Go. Page: TypeScript, Vite, Vitest, Playwright core for browser checks.
- Prior curve designs: the constant-product pool with a virtual reserve comes from earlier launchpad curves (ADR 0002, ADR 0003). No code is copied from other launchpads.
- Where the rule design came from: exchange risk limits, which the builder knows as a Bybit trader. On Bybit, a larger position gets a tighter limit, and at the cap only orders that reduce the position are accepted. Fair Chance applies the same idea per holder inside the coin: larger holders get tighter limits, and a sell above a limit fills in part. Unlike an exchange, nobody can change these rules after launch.
- The launch replay and the simulation come from Kalu (analysis/FINDINGS.md).
- Code written before 1 November 2026: none. All code in this repo was written during the event.
rule-engine/ holds the rules as plain Rust. contracts/coin/ and contracts/factory/ wrap them. sandbox-tests/ runs them on a local chain. watcher/ is the Go alert service. web/ is the coin page. docs/ holds OVERVIEW, INTERFACE, the ADRs and GLOSSARY. The coin interface is version 1.0.0-rc.7.
MIT. See LICENSE.
