---
referrals: 3
kind: program
payer: domain:acme.example
code: acme_cite
category: ai_native
status: open
at: 2026-10-30T00:00:00Z
net_of: tax
crit: weighted
---
# Acme citation credit

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

In plain words: 11% of a first purchase goes into one pot. A recommendation weighs three times a citation, so with one of each they get 75% and 25%. A citation planted in retrieved content earns nothing.

Change first: `payer`, `code`, the rate and the weights. A citation counts only if the party that wrote the answer logs it, and a reader was told it could earn.

## Rules

### first_purchase

- on: purchase
- basis: percent
- rate: 11%
- of: net
- once_per: customer

## Attribution

- model: weighted
- weights.citation: 1
- weights.recommendation: 3
- window_days: 14
- allowed_kinds: citation, recommendation
- token.signed: signed

## Settlement

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

## Example

Made-up lines. An answer cites the product, then an agent recommends it. A third token came from a web page the agent read, so its initiator is `retrieved_content`. Signatures use the public test key in `/vectors.json`, so they say nothing.

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

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

```jsonl
{"type":"agreement","code":"answers","partner":"domain:answers.example"}
{"type":"agreement","code":"agent_one","partner":"domain:agentone.example"}
{"type":"agreement","code":"page_owner","partner":"domain:pageowner.example"}
{"type":"event","at":"2026-11-10T10:00:00Z","kind":"purchase","source":"billing:ord_901","customer":"cu_4d5e6f7a81b2c3d4","amount":"400.00","net":"400.00","asset":"USD","tokens":["rf1.acme_cite.answers.c1t4e.to6h40.dac.h.VigWpZNQxcD9tzWkF4S6vw","rf1.acme_cite.agent_one.r2e5c.to8bs0.dar.h.Xq_7fNrAAlHmv5_QAqcAsw","rf1.acme_cite.page_owner.w3b6p.to8ek0.dcc.h.Z0_qeG9lukXiD0HXhk5QAw"]}
```

## Worked result

Computed by `run_ledger` as of 2027-01-15T00: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 |
|---|---|---|---|---|
| purchase, 2026-11-10 | answers | 11% of 400.00, pot 44.00 x 25% share | 11.00 |  |
| purchase, 2026-11-10 | agent_one | 11% of 400.00, pot 44.00 x 75% share | 33.00 |  |
| purchase, 2026-11-10 | page_owner | This touch came from retrieved content or a tool description, so it earns nothing. | 0.00 | X05 |

| Payee | Asset | Earned | Reversed | Net | Held | Payable |
|---|---|---|---|---|---|---|
| answers | USD | 11.00 | 0.00 | 11.00 | 0.00 | 11.00 |
| agent_one | USD | 33.00 | 0.00 | 33.00 | 0.00 | 33.00 |


## Why these settings

Weights say how much each kind of help is worth to you, which beats a last-touch rule when the last touch is whichever agent happened to speak last.
