Token distribution protocol
Airdrop to thousands.
Commit 32 bytes.
YieldStream is a multi-tenant Merkle distributor for Stellar Soroban. Issuers lock a recipient list into one root hash, the contract escrows the pool, and every recipient claims with a cryptographic proof — no per-recipient transactions, no ledger bloat.
RFC 6962 domain separation · sorted-pair proofs · dual MIT/Apache-2.0
32 bytes
committed on-chain per campaign
log₂N
proof size — 14 hashes for 10,000 recipients
21
contract tests + pinned vectors
LIVE
full lifecycle verified on testnet
Live on testnet
CC25WDHZ7SQC2UMZJHIPYM2U5ROYFXVDZMP3THMIL3IJY6HOCGGX2FPG
campaign created
root committed, 120,000 units escrowed
dc347bc74e98…recipient claimed
inclusion proof verified, paid out
0a2b6d2de6ee…
Full lifecycle verified on-chain: two funded campaigns, proof-checked claims, double-claim rejected, cancel → sweep refunded the treasury to the unit.
The mechanism
How it works
Build the tree off-chain
Compile your recipient list (address + amount) into a Merkle tree. One pass, any size — 10 or 100,000 recipients.
Commit one 32-byte root
Publish just the root hash on-chain with your campaign budget and deadline. No recipient list is ever stored per-campaign in the ledger.
Fund the escrow
The contract custody-locks your token pool. Multi-tenant by design: every project runs independent campaigns on one deployed contract.
Recipients claim with proofs
Each claimer submits a tiny inclusion proof from their browser. The contract verifies it against the root and pays out — then unclaimed funds sweep back to you after expiry.
The math
Why it's cheap
Issuer pays once
A naive batch send costs N transactions for N recipients. YieldStream commits one root; each claimer pays for their own claim.
List never touches the ledger
Recipients stay off-chain until they claim: the ledger holds one root, not the roster. Packing claimed state into ~40 bitmap entries for 10,000 claims is open backlog work.
Nothing is stranded
Unclaimed funds aren't a reconciliation chore: after expiry or cancellation, one sweep call returns the remainder to your treasury.
For builders
Contract interface
| Entry point | Auth | Purpose |
|---|---|---|
| initialize | admin auth | Set the contract administrator. |
| create_distribution | creator auth | Commit root, budget, recipients count, deadline; escrow funds. |
| claim | recipient auth | Verify inclusion proof; transfer allocation. |
| cancel | creator auth | Halt claims on an active campaign. |
| sweep | creator auth | Recover unclaimed funds after expiry or cancellation. |
| get_distribution / is_claimed | view | Read campaign state and claim status. |
Built in the open — funded by the wave
YieldStream is maintained as a three-repo system: the Soroban contract, this app, and a TypeScript SDK. The roadmap ships as 31 tiered contributor issues — from a 256-leaf claim bitmap that shrinks 10,000 ledger entries to about 40, up to threshold-signature custody. Pick one, ship it, earn on the Drips Wave.
Browse the issue backlog