---
referrals: 3
kind: program
payer: domain:settle.example
code: example_settle
category: stablecoin
status: open
at: 2026-10-30T00:00:00Z
---
# Example stablecoin settlement share

Rates, amounts and names in this file are placeholders, not recommendations or market rates. Each party sets its own terms.

In plain words: a referrer earns 7% of the fee the payer keeps on referred stablecoin volume, for 12 months per customer. It earns nothing on the volume itself.

Ask a lawyer about: whether paying on these flows, or receiving and forwarding them, needs a money transmission license, whether pay tied to a sale or trade of tokens needs a license, and what your sanctions and identity checks must cover. Whoever pays handles those. A check here says nothing about any of them.

Change first: `payer`, `code`, the rate and the asset. The asset below is a made-up address.

## Rules

### fee_share

- on: stablecoin_settlement
- basis: percent
- rate: 7%
- of: fee
- recurring.months: 12

## Attribution

- model: last_touch
- window_days: 30
- allowed_kinds: link, code, intro

## Settlement

- holdback_days: 30
- clawback_days: 60
- cycle: monthly
- payout_asset: caip19:eip155:8453/erc20:0x0000000000000000000000000000000000000001
- rails: stablecoin

## Regulated

- fields: money_transmission

## Assets

| asset | scale |
|---|---|
| caip19:eip155:8453/erc20:0x0000000000000000000000000000000000000001 | 6 |

## Example

Made-up lines. Two settlement batches from the payer's own ledger. Part of the first is returned, which takes back a tenth of its fee.

To run it, save this file as `REFERRALS.md` and these lines as `referrals.jsonl`, then run `node referrals.mjs run REFERRALS.md referrals.jsonl --as-of 2027-03-01T00:00:00Z`.

As of: 2027-03-01T00:00:00Z

```jsonl
{"type":"agreement","code":"partner_one","partner":"domain:partnerone.example"}
{"type":"event","at":"2026-11-15T00:00:00Z","kind":"stablecoin_settlement","source":"ledger:batch_1","customer":"cu_92b3c4d5e6f70819","amount":"1000000.000000","fee":"3000.000000","asset":"caip19:eip155:8453/erc20:0x0000000000000000000000000000000000000001","token":"rf1.example_settle.partner_one.st1.tnsqo0.dhw.n.-"}
{"type":"event","at":"2026-12-15T00:00:00Z","kind":"stablecoin_settlement","source":"ledger:batch_2","customer":"cu_92b3c4d5e6f70819","amount":"500000.000000","fee":"1500.000000","asset":"caip19:eip155:8453/erc20:0x0000000000000000000000000000000000000001"}
{"type":"event","at":"2026-12-20T00:00:00Z","kind":"refund","source":"ledger:return_1","customer":"cu_92b3c4d5e6f70819","amount":"100000.000000","fee":"300.000000","asset":"caip19:eip155:8453/erc20:0x0000000000000000000000000000000000000001","reverses":"ev_fbaa3195cdaf04a111dd6cc6"}
```

## Worked result

Computed by `run_ledger` as of 2027-03-01T00:00:00Z, on the made-up lines above. Computed amounts are arithmetic on the records and terms you sent. They do not say what anyone owes. Your contract decides that.

| Event | Who | Working | Computed | Note |
|---|---|---|---|---|
| stablecoin_settlement, 2026-11-15 | partner_one | 7% of 3000.000000 | 210.000000 |  |
| stablecoin_settlement, 2026-12-15 | partner_one | 7% of 1500.000000 | 105.000000 |  |
| refund, 2026-12-20 | partner_one | Reverses what was computed on stablecoin_settlement, 2026-11-15 | -21.000000 |  |

| Payee | Asset | Earned | Reversed | Net | Held | Payable |
|---|---|---|---|---|---|---|
| partner_one | caip19:eip155:8453/erc20:0x0000000000000000000000000000000000000001 | 315.000000 | -21.000000 | 294.000000 | 0.000000 | 294.000000 |


## Why these settings

Paying on `fee` means the referrer earns only when the payer does, which removes the reason to send volume that exists just to earn on it.
