---
referrals: 3
kind: program
payer: domain:onramp.example
code: example_onramp
category: onchain
status: open
at: 2026-10-30T00:00:00Z
---
# Example onramp wallet referral

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

In plain words: a wallet that sends someone to this onramp earns 13% of the fee the onramp keeps on that person's purchases, for 12 months.

Ask a lawyer about: whether this pay needs a license, since pay tied to a sale or trade of tokens may require one, whether the wallet's role counts as money transmission where it operates, and what identity and sanctions checks apply. Whoever pays handles those. A check here says nothing about any of them.

Change first: `payer`, `code` and the rate. The checker warns on this template on purpose, for the reasons above.

## Rules

### fee_share

- on: onramp
- basis: percent
- rate: 13%
- of: fee
- recurring.months: 12

## Attribution

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

## Settlement

- holdback_days: 30
- clawback_days: 60
- cycle: monthly
- payout_asset: USD
- rails: ach

## Regulated

- fields: money_transmission

## Example

Made-up lines. Two purchases by one person, who arrived through the wallet's link. 13% of 12.50 is 1.625, a tie that rounds to the even 1.62. 13% of 7.50 is 0.975, a tie that rounds to the even 0.98.

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-02-01T00:00:00Z`.

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

```jsonl
{"type":"agreement","code":"wallet_app","partner":"domain:walletapp.example"}
{"type":"event","at":"2026-11-08T00:00:00Z","kind":"onramp","source":"ledger:ramp_1","customer":"cu_a3b4c5d6e7f8091b","amount":"500.00","fee":"12.50","asset":"USD","token":"rf1.example_onramp.wallet_app.w1.to5pc0.dhw.n.-"}
{"type":"event","at":"2026-12-08T00:00:00Z","kind":"onramp","source":"ledger:ramp_2","customer":"cu_a3b4c5d6e7f8091b","amount":"300.00","fee":"7.50","asset":"USD"}
```

## Worked result

Computed by `run_ledger` as of 2027-02-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 |
|---|---|---|---|---|
| onramp, 2026-11-08 | wallet_app | 13% of 12.50 | 1.62 |  |
| onramp, 2026-12-08 | wallet_app | 13% of 7.50 | 0.98 |  |

| Payee | Asset | Earned | Reversed | Net | Held | Payable |
|---|---|---|---|---|---|---|
| wallet_app | USD | 2.60 | 0.00 | 2.60 | 0.00 | 2.60 |


## Why these settings

A share of the fee keeps the referrer's pay tied to what the onramp keeps rather than to the size of the purchase.
