Filter an airdrop
Airdrops attract sybil farms at industrial scale. OC Attest lets you filter candidate addresses down to those with non-trivial bonded stake, raising the per-sybil cost from free to real Bitcoin.
The patternLink to this section
- You start with a candidate list — addresses that completed some action (held an NFT, joined a Discord, signed a petition).
- Before distributing, filter the list by requiring each candidate to have an OC Attest proof that meets your threshold.
- Only addresses that pass get on the final allowlist.
InstallLink to this section
npm i -g @orangecheck/airdrop-gate
CLI modeLink to this section
oc-airdrop filter \
--min-sats 100000 \
--min-days 90 \
< candidates.txt > allowlist.txt
candidates.txt is one Bitcoin address per line; blank lines and # comments
are skipped. For each address the tool runs the SDK's check() in your own
process: it reads the attestation off Nostr relays and the coins from an Esplora
API, with no call to attest.ochk.io. The subset that passed goes to stdout;
progress and rejections go to stderr.
oc-airdrop filter \
--min-sats 100000 \
--min-days 90 \
--json \
< candidates.txt > allowlist.json
--json emits a report instead: the totals, the allowlist, and each rejection
with its reasons, so you can keep a record of each threshold check.
--concurrency <n> (1 to 64, default 4) sets how many checks run at once.
--allow-lookup-errors stops the run on a lookup error instead of rejecting
that address.
Programmatic modeLink to this section
import { filterAllowlist } from '@orangecheck/airdrop-gate';
const candidates = ['bc1qalice...', 'bc1qbob...', 'bc1qcarol...'];
const { ok, rejected } = await filterAllowlist(candidates, {
minSats: 100_000,
minDays: 90,
concurrency: 8,
});
console.log(ok); // addresses that met the thresholds, in input order
console.log(rejected); // array of { address, ok: false, reasons } for rejects
concurrency sets how many check() calls run at once, default 4. Each one
queries the relays and an Esplora API, so keep it modest on public ones. Pass
relays to read from relays you run.
Choosing thresholdsLink to this section
The math on sybil cost:
- An attacker with
N × min_satsbitcoin can spin upNpassing sybils (one per address). - They pay opportunity cost equal to the Bitcoin HODL return forgone during
min_days.
Concrete rules of thumb:
| Airdrop value per claim | Suggested min_sats | Suggested min_days |
|---|---|---|
| $5 ("welcome nudge") | 10k | 30 |
| $50 ("community reward") | 100k | 60 |
| $500 ("meaningful") | 1M | 90 |
| $5,000+ ("significant") | 10M | 180 |
These are not the answer. They're starting points. Pair them with other signals (OC Stamp for commit history, BrightID for humanness, your own activity metrics) for anything above the "welcome nudge" tier.
PitfallsLink to this section
Sybil wealth at scaleLink to this section
A single whale with 100M sats can produce 100 sybils at min_sats = 1_000_000.
OC Attest raises the cost; it does not eliminate it. For one-person-one-claim
guarantees you need an independent personhood signal on top (World ID,
BrightID). See Security — sybil at the economic floor.
Rate limitsLink to this section
The tool does not call attest.ochk.io, so attest.ochk.io's rate limits do not apply. The load falls on the Nostr relays and on the Esplora API (mempool.space, with blockstream.info as fallback), which may throttle you. For lists larger than a few thousand addresses, either:
- Pass
relaysin programmatic mode to read from relays you run. - Run the CLI with a modest
--concurrencyand a long timeline.
Front-runningLink to this section
If your airdrop is known and claims are open-ended, sybils can race. Make claims address-specific (the claimant proves they control each address on the allowlist via BIP-322) rather than open to anyone with knowledge of the list.
See alsoLink to this section
- OC Attest scoring — raw metrics, not the
score_v0number @orangecheck/airdrop-gate— full package reference- Security — sybil at the economic floor — choosing thresholds against attacker payoff