Protocol

Relay Economics

Testnet coins are worth nothing. The relay economics are the same on testnet and on mainnet.

Relays deliver messenger traffic and hold messages until the recipient collects them. The network pays them out of every block. It pays for what can be checked without a committee and without anyone's signature: the relay is in the on-chain registry, meets the stake requirement for payout eligibility and regularly sends a heartbeat (a short on-chain record saying the relay is alive). Delivery quality is checked by the apps: a message counts as accepted once 4 of 5 relays confirm it, and apps route around relays that do not answer.

Where the money comes from

  • A share of each block. 3% of the reward in the first era (an era is the roughly four years between halvings, when the block reward is cut in half) and 6% after. In both the first and the second era that is the same 75 XMOR per block: the share rises at the halving by exactly enough to keep the delivery budget from halving.
  • Name fees. 80% of MORID registration and renewal fees accumulate in the relay pool and are paid out by the same queue on top of the block share. This income grows with the number of users, not with miners' computing power.

A payout epoch is 10,080 blocks, about a week. In the first two eras the epoch pool is 75 × 10,080 = 756,000 XMOR a week, plus 80% of that week's name fees.

The payout queue

In each block, the relay share goes to the eligible relay that has gone the longest without a payout. It is a round-robin queue, not a lottery: with N eligible relays, each gets 75 XMOR every Nth block. On a tie, the relay registered earlier goes first.

A relay is eligible when:

  • its registry record is active;
  • its stake is at least S(E − 2), the requirement from two epochs earlier;
  • its latest heartbeat is no older than 1,440 blocks (about a day);
  • its income this epoch has not yet reached the cap.

If no relay is eligible, the relay share in that block goes to the miner. It neither accumulates nor disappears.

The income cap

In one epoch a relay receives no more than the cap:

C(E) = epoch pool / max(N̄, N_ref)
N_ref = max(30, ⌈0.75 · N̄⌉)

N̄ is the lower median of the number of active relays over the last four epochs. While there are fewer than 30 relays, each gets at most a thirtieth of the pool — 25,200 XMOR a week — and whatever relays do not claim stays with the miners. That way five relays at the start do not take the whole pool for themselves.

The stake

Registration requires the current stake S(E). Payout eligibility uses S(E − 2), giving existing relays two epochs to top up after the requirement rises.

The network calculates the stake, not a person:

S(E) = T(E) × epoch pool / max(N̄, N_ref)

T is "weeks of income", which the network counts in half-weeks.

  • Ramp-up: for the first 26 epochs T = 8 half-weeks, i.e. 4 weeks of income.
  • Maturity: then T rises step by step to 30 half-weeks — 15 weeks of income.
  • Step: the stake moves by at most 25% per epoch in either direction.
  • Minimum stake: the stake never goes below 15,000 XMOR; at the start it is also 15,000 XMOR.
  • Top-up: if the calculated stake rises, a relay has two epochs to top up. Otherwise it drops out of the queue until it does.

The stake is coins locked to the relay owner's key (an output to the hash of that key). Each relay holds its own stake output, so a hundred fake relays cost a hundred stakes.

What this means at 30, 100 and 300 relays

A pool of 756,000 XMOR a week, name fees not counted, all relays identical and honest, their number steady from the first epoch.

Relays in the network Income per relay per week Calculated stake at T = 4 weeks Time to earn the stake amount at T = 4 weeks Calculated stake at T = 15 weeks Time to earn the stake amount at T = 15 weeks
30 25,200 XMOR 100,800 XMOR 4 weeks 378,000 XMOR 15 weeks
100 7,560 XMOR 30,240 XMOR 4 weeks 113,400 XMOR 15 weeks
300 2,520 XMOR 15,000 XMOR (minimum stake) 6 weeks 37,800 XMOR 15 weeks

The formula sets the stake at T weeks of rewards: as the number of relays grows, each relay’s reward decreases, and its stake decreases with it. The minimum stake and reward cap change this ratio. For example, with 300 relays during the initial period, the calculated stake falls below 15,000 XMOR. The minimum of 15,000 XMOR applies, and earning that amount takes 6 weeks. With 1,000 relays, the stake is also 15,000 XMOR and the reward is 756 XMOR per week, so earning the stake amount takes about 20 weeks.

Name fees are added to the pool, so they raise income and the stake in the same proportion.

The heartbeat

A relay sends a heartbeat to the chain — an MRHB record. It points at a recent block no older than 120 blocks, and every new heartbeat must point at a later block than the one before. It is signed with the relay's service key or its owner key.

If a relay has not sent a heartbeat for more than 1,440 blocks, it drops out of the queue on its own, without anyone's signature. Once it sends one again, it is back.

Exit and getting the stake back

The operator takes the relay out of the registry with an on-chain record. After that the stake can be spent no earlier than 43,200 blocks later — 30 days.

What the network does not do

There is no committee that decides whom to pay, and no administrative "switch this relay off" button either. That choice has a cost: a relay with a stake and a heartbeat that does not answer clients stays in the queue. What limits it is the stake on every copy, the income cap and the apps themselves: they pick relays only from a mailbox's five, keep their own score of relays from receipts, and route around those that do not answer.

See also