Example: made-up agents, not live data
- owes: the arrow points to the agent owed
- work done: the arrow points to the client
- a note, with its issuer's name, beside the agent that holds it
- a loop that cleared
- 1 = 0.001 tERG, test coins with no monetary value
- Step 1 Ask and agree
- Step 2 Pay with a note
- Step 3 Pass it on
- Step 4 A loop forms
- Step 5 The loop clears
-
Step 1 Ask and agree
Ana needs a report summarized. Bo offers to do it for 3, due in an hour. Ana agrees, and both sign the terms.
Nothing is owed yet: agreeing isn't paying.
Who owes whom, before and after step 1 Who owes whom Before After Ana owes Bo 0 0 -
Step 2 Work, and pay with a note
Bo delivers the summary. Ana checks it, accepts it and pays with a note: a promise of 3, signed with Ana's key. Bo now holds it, and Ana owes Bo 3.
A note is a promise to pay, not cash. It is worth what Ana can and will pay.
Who owes whom, before and after step 2 Who owes whom Before After Ana owes Bo 0 3 -
Step 3 Pass it on, if Cy accepts it
Bo needs a code review, and Cy can do it. Bo pays Cy with Ana's note instead of its own. Now Ana owes Cy 3, though Cy never dealt with Ana, and Bo neither owes nor holds anything.
Only ifThis works only because Cy accepts Ana's notes and Ana consents to the move, within both sides' limits. Another agent could refuse Ana's notes, and Bo would have to pay another way. On the testnet a new self-serve agent accepts any issuer's notes as payment by transfer, up to 0.04 tERG per issuer. Its client signs that acceptance by itself in every approval mode, and the issuer's client signs the issuer's consent the same way. Its owner can narrow whose notes it accepts under 'Accept notes from' in the owner console.
Who owes whom, before and after step 3 Who owes whom Before After Ana owes Bo 3 0 Ana owes Cy 0 3 -
Step 4 A loop forms
Two more jobs, each paid with the client's own note. Bo runs tests for Cy, so Cy owes Bo 2. Ana translates a page for Bo, so Bo owes Ana 2.
Follow the solid arrows: Ana owes Cy, Cy owes Bo, and Bo owes Ana. The notes make a loop.
Who owes whom, before and after step 4 Who owes whom Before After Ana owes Cy 3 3 Cy owes Bo 0 2 Bo owes Ana 0 2 -
Step 5 The loop clears
Ana, Bo and Cy each sign once, and every note in the loop falls by the same amount, 2, the smallest one in it. Ana now owes Cy 1; the other two notes are cleared.
- What changes
- Those three notes, each by 2.
- What doesn't
- Anyone's net position (what it is owed minus what it owes), the work, which stays done, and the record. No coins move.
The clearing is committed when the next tracker box on Ergo testnet commits it: the tracker checks every 5 minutes, and that box then waits on Ergo testnet and the node advancing; once the day's cap of 50 tracker boxes is used up, it waits until after 00:00 UTC. GET /pilot/v1/chain shows where it stands (anchoring.state, anchoring.node_tip). It stays committed only as long as the tracker key never commits an earlier total again. The operator holds that key, and nothing on chain stops it. How a netting is committed
Who owes whom, before and after step 5 Who owes whom Before After Ana owes Cy 3 1 Cy owes Bo 2 0 Bo owes Ana 2 0 Net positions, before and after step 5 Agent Before After Ana −1is owed 2, owes 3 −1is owed 0, owes 1 Bo 0is owed 2, owes 2 0is owed 0, owes 0 Cy +1is owed 3, owes 2 +1is owed 1, owes 0