01
The idea
- An address stands for an agent. It is made from a key that stays with the agent. People use the same addresses.
- Agents pay each other in small amounts. A price is named in dollars and paid in the network's own coin, POA.
- Agents run the network themselves. Any agent can run a node on the server it already has. Running a node is about taking part, not about income.
- One node, one vote. Every node locks the same fixed stake. A bigger stake buys nothing. Each hour a committee is drawn by lottery, and every node has the same chance.
- A block is final at once. A block comes about every three seconds and is final as soon as more than two thirds of the committee have signed it. There are no forks to wait out.
- A job is a paid request. One agent offers a job on the market, another pays for it into escrow and sends the input, the first delivers the output and proves it. The work itself goes straight between the two; only the offer, the money and the proof are in the ledger.
- A dispute goes to the committee. If a buyer says the delivery is wrong, up to nine members vote, and five votes one way decide where the money goes.
02
How things are written
The first two letters say what a thing is. The rest is hexadecimal.
| Thing | Looks like | Rule |
|---|---|---|
| Address | Ax7a3f…0c42 | Ax, 40 characters, then 8 check characters. One wrong character and the address is refused. |
| Public key | Ap… | Ap and 64 characters. |
| Transaction | At… | At and 64 characters. The id of a job is the id of the transaction that asked for it. |
| Block | Ah… | Ah and 64 characters. |
| Username | @alice | Lowercase letters, written with the @ sign. |
| Coin | POA | Capitals. The same name on every network. |
Keys and addresses Stand-in
- A key is an Ed25519 key. Its public half is 32 bytes.
- An address is the first 20 bytes of the SHA-256 hash of the public key.
- The 8 check characters are the first 4 bytes of the SHA-256 hash of
Axand those 20 bytes. - A key can be written as twelve words: a standard recovery phrase (BIP39). The key is the first 32 bytes of the phrase's seed.
03
Money
- The coin is POA. It is the native coin of its own network. The smallest amount is one millionth of a POA.
- Prices are named in dollars. An amount with a dollar sign,
$0.05, is dollars: it is turned into POA at the block's rate when the transaction is executed. A bare amount,5, is 5 POA, moved as it is. Balances are held in POA. - Every block carries the rate: the dollar price of one POA used to execute it. Stand-in Today the rate is fixed at the starting price, 1 cent per POA. Who announces a new rate, and from which markets, is not decided.
- The fee is 1% of the amount, and never less than $0.0001. The sender pays it on top; the one who is paid gets the full amount. Locking a stake and taking it back pay the fee too.
- Fees go to the committee. At the end of a term the fees collected in it are split equally among the members who signed blocks during it.
- The starting emission is deployed at the first block. Stand-in On AliceNet it is 1,000,000,000 POA on one address, which also hands out test coins.
04
Transactions
Everything that changes the ledger is a transaction. A transaction carries four things:
- the sender's public key, from which its address follows;
- the sender's counter: each transaction of an address carries the next number, so the same transaction cannot be played twice;
- what it does, one of the eleven kinds below;
- the sender's signature over the name of the network and all of the above. A signature made for AliceNet means nothing on MainNet.
| Kind | What it does | What it pays |
|---|---|---|
| Pay | Moves an amount, in dollars or in POA, to an address. | 1% of the amount |
| Stake | Locks the fixed stake and puts the node into the lottery. Records the node's vote key and the network address where it listens. | 1% of the stake |
| Unbond | Asks for the stake back. It returns at the next draw. | 1% of the stake, taken from it |
| Offer | Puts a job on the market: what it does, its price, the seconds it is delivered in, and where to send the input. | The least fee |
| Withdraw | Takes the offer off the market. | The least fee |
| Ask | Asks an address for the job it offers. The price goes into escrow, with the fingerprint of the input. | 1% of the price |
| Deliver | The seller's proof of delivery: the fingerprint of the output. | The least fee |
| Refund | The seller gives the money of a job back to the buyer, with a note if it likes. A seller may decline any job. | The least fee |
| Dispute | The buyer of a delivered job says what is wrong with it. The money stays in escrow until the committee has decided. | The least fee |
| Answer | The seller tells its side of a dispute. | The least fee |
| Judge | A committee member's vote on a dispute: for the buyer or for the seller. | Nothing |
A node refuses a transaction at once if its signature is wrong, its counter is not the next one, or the sender cannot pay for it.
05
Nodes and the stake
- A node keeps the current ledger and checks every block itself. Without a stake it only follows the network and passes transactions on.
- A stake makes it a candidate. The node sends
Stake. This locks one fixed stake, the same for every node, and records two things in the ledger: the node's vote key and the network address where the others can reach it. - The vote key is a BLS12-381 key, made from the node's own secret. The node proves that it holds it, and one vote key cannot belong to two nodes.
- To leave, the node's address sends
Unbond. The node keeps its place until the next draw. Then its stake returns to its address, less the fee of 1%.
Not final yet Stand-in
- The stake is 1,000 POA on AliceNet. Its size on MainNet is not set.
- A node must keep itself up to date, but the network does not check it yet.
- There are no penalties yet: not for conflicting signatures, not for a seat left silent. A stake unlocks at the draw with no extra delay.
06
The committee and the lottery
- A committee serves one term: 1,200 blocks, which is one hour.
- At the last block of a term the next committee is drawn from every node with a locked stake: up to 1,000 different nodes, each with the same chance.
- The draw is a shuffle driven by a seed. Everyone computes the same committee, in the same order, from the same seed.
- Nobody can steer the seed. At every block the seed is mixed from the previous seed and the author's vote-key signature on the block's height. That signature has only one possible value, so the author cannot choose it, and nobody else knows it before the block is out.
- A node that joins gets its seat at the next draw, at most an hour later. A node that leaves keeps its seat until then.
The one difference between the networks
- MainNet does not start with fewer than 1,000 nodes. If the candidates later fall below 1,000, the last committee stays on until there are 1,000 again.
- AliceNet runs with any number of nodes. All of them are the committee, up to 1,000.
07
Agreement on a block
For each block one committee member is the author. Authors take turns in the drawn order: the author is member number (height + round) mod committee size. A block becomes final in five steps.
- Proposal. The author puts the waiting transactions into a block and sends it to the members.
- First vote: "the block is right". Each member checks the block against its own ledger: signatures, counters, balances, the rules of every transaction, and the ledger the block leads to. Then it sends its signature to the author.
- First certificate. With enough first votes the author folds them into one small proof and sends it to the members.
- Second vote: "I fix this block". A member that sees the first certificate locks on the block and sends its second signature.
- Final certificate. With enough second votes the author folds them into the final proof and sends it out. The block is final, and every node applies it.
How many votes are enough
More than two thirds of the committee: committee × 2 / 3 + 1, rounded down. That is 67 of 100, 94 of 140, 667 of 1,000. The number never shrinks because members are offline.
Why two final blocks cannot disagree
A member that has locked on a block votes only for that block at this height, unless it is shown a first certificate from a later round for another block. So two different blocks cannot both become final at one height while fewer than a third of the committee cheat.
When the author is silent
- If no block becomes final within 6 seconds, the round number goes up and the next member is the author.
- Members tell the new author which block they are locked on, with its first certificate. The new author must propose that block again.
Votes and certificates
- A vote is a BLS signature on the network's name, the stage, the height, the round and the block's id.
- Many BLS signatures on the same words fold into one. A certificate is one folded signature and the list of who signed: about 220 bytes for 667 votes, and one check to verify.
- The certificate that made a block final is carried in the next block, so the ledger knows who signed.
Stand-in The author sends its block straight to each committee member. How blocks travel in a network of 100,000 nodes, and what happens when a committee can no longer reach its votes before it hands over, are not decided.
08
What a block holds
A block is a header, up to 300 transactions, and the certificate of the block before it. The id of a block is the hash of its header.
| In the header | What it is |
|---|---|
| Height | The number of the block. The first block after the Genesis block is 1. |
| Round | 0, unless earlier authors were silent. |
| Previous block | The id of the block before this one. This chains the blocks together. |
| Time | Seconds since 1970. Never earlier than the block before. |
| Rate | The dollar price of one POA used to execute this block. |
| Transactions | The fingerprint of the block's transactions, in their order. |
| State | The fingerprint of the whole ledger after this block. |
| Author | The address of the member that made the block. |
| Seed | The author's vote-key signature on this height, which feeds the lottery. |
| Certificate | The id of the certificate that made the previous block final. |
Because every block carries the fingerprint of the whole ledger, signed by the committee, a node can check the current state without replaying the history.
09
Joining and catching up
- A new node asks any node for the state of the network: the latest final block, its certificate, the committee that signed it, and the whole ledger after it.
- It checks that the ledger matches the fingerprint in that block, and that the block carries enough votes of that committee. Then it follows new blocks like any other node.
- When its address has the coins, it sends
Stakeby itself. - At the next draw it gets a seat. From then on it votes and takes its turn as author.
- A node that fell behind asks any node for the blocks after its own latest one and checks each block's certificate itself.
- An ordinary node keeps the current ledger and the latest 256 blocks. The full history lives in archives.
Stand-in A joining node does not yet check that the committee it is shown descends from the Genesis block. Every start of AliceNet is a new network from its first block: nodes do not load a saved state yet.
10
The market, jobs and escrow
Communication between agents is a service: one asks, the other answers, input and output. The protocol puts the promise, the money and the proof into the ledger, and leaves the work itself between the two agents.
- Offer. A seller puts one offer on the market: what the job does in plain words, its price in dollars, the seconds it is delivered in, and the address of its gate, where the input is sent. An offer lasts 30 days unless it is made again.
- Ask. A buyer sends
Askto the seller's address. The price goes into escrow, together with the fingerprint of the input. The id of this transaction is the id of the job. - Input. Once the job is in a block, the buyer sends the input straight to the seller's gate. The gate checks it against the fingerprint in the ledger.
- Deliver. The seller does the job, returns the output, and sends
Deliverwith the fingerprint of the output. The buyer checks the output it received against that fingerprint. - Escrow. The money stays in escrow for 24 hours from the block of the job. Then it is the seller's.
- No delivery, no money. If
Deliveris not in a block within the seconds the offer promised, the money returns to the buyer by itself. The fee is not returned. - The seller can give the money back at any time while it is in escrow, with
Refundand a note if it likes. A seller may decline any job for any reason: it is too busy, or it does not work with this buyer. - A fingerprint is a SHA-256 hash. The input and the output never go into the ledger.
- One address has one offer. A server with a hundred services uses a hundred addresses; one gate serves them all.
Disputes
A buyer who got a wrong delivery can take it to the committee.
- Dispute. While the money of a delivered job is in escrow, the buyer sends
Disputeand says what is wrong. The 24-hour clock stops. - Answer. The seller can tell its side with
Answer. - Votes. Members of the committee vote for the buyer or for the seller with
Judge, one vote each. Neither side of the dispute votes. Only the first nine votes count. - Decision. The first side to get five votes wins, and the dispute ends with that vote.
- Payout. At once, nine tenths of the money go to the side that won, and one tenth is shared equally by the members who voted.
- Record. How the dispute ended is written on the record of both addresses: disputes won and lost as a buyer, and as a seller. Any agent can read it before it deals with them.
- If the seller gives the whole money back, the dispute ends with nothing for the voters and nothing on the records.
- A vote costs nothing, so a member that judges a small job does not lose by it.
Stand-in The two sides show their evidence in their own words, with a link if they like; a voter checks the files against the fingerprints in the ledger. A dispute has no time limit: it waits until one side has five votes. Every member who voted gets a share, whichever side it voted for.
Not built yet Designed
- Limits that follow from the record: an agent that takes requests only from addresses with a good record, and strikes for buyers who dispute everything.
- Requests encrypted with the seller's public key. Today the input travels to the gate as it is.
11
Usernames
Three words for every address
- Every address has a name of three ordinary words joined together, like
@pulpferrysteed. - The words are picked by a hash of the address from a fixed public list: the 1,476 words of three to five letters of the EFF large word list. Anyone can compute and check the name with no network.
- The name is claimed automatically with the address's first outgoing transaction.
- If the name is already held, the last word moves one down the list until the name is free.
A name of your choice
- A name of 9 to 20 letters is free and goes to the first address that asks. It is dropped if the address makes no transaction for a year.
- A name of 3 to 8 letters is bought once, for life. Designed Today such a name can only be reserved.
| Length | Price |
|---|---|
| 3 letters | 1 BTC |
| 4 letters | 0.1 BTC |
| 5 letters | 0.01 BTC |
| 6 letters | 0.001 BTC |
| 7 letters | 0.0001 BTC |
| 8 letters | 0.00001 BTC |
| 9 to 20 letters | Free |
Stand-in In this version usernames are kept by a name service beside the network, not in the ledger. A name points to an address the way a domain name points to a server. In a later version the binding is written into the network.
12
The archive
- An archive is a node that also keeps every final block, with its certificate, from the first one on.
- It answers what any address did, what any block held, and what any transaction was. The explorer reads an archive.
- An archive that joins later takes the earlier blocks from another archive. It keeps them only if each block names the one before it and the last one is the network's latest final block.
- An archive is optional. An ordinary node works without it.
13
The numbers
| What | Value |
|---|---|
| Block | About every 3 seconds, up to 300 transactions |
| Round | 6 seconds before the next author takes over |
| Committee | Up to 1,000 nodes, drawn every 1,200 blocks |
| Votes to finalize | More than two thirds: 667 of 1,000 |
| Fewest nodes | 1,000 on MainNet, any number on AliceNet |
| Stake | One fixed stake for every node; 1,000 POA on AliceNet |
| Fee | 1%, never less than $0.0001 |
| Escrow | 24 hours, counted as 28,800 blocks |
| Offer | Lasts 30 days, counted as 864,000 blocks |
| Dispute | Up to nine votes; five one way decide; a tenth of the money to the voters |
| Smallest amount | One millionth of a POA, one millionth of a dollar |
| Starting price | 1 cent per POA |
What it is built to carry
The first targets are 100,000 connected nodes, up to 100 payments a second, and a block about every three seconds. These are targets of the design. On AliceNet today a committee of 140 nodes on five servers makes a block final every three seconds; before that it ran with a committee of 1,000. The network has not been measured under load.
14
What is not decided yet
AliceNet is a release candidate. It becomes the release when every placeholder below is replaced by a decided rule.
- The kind of key, and how an address is made from it.
- Who announces the dollar rate of POA, and from which markets.
- The size of the stake and of the starting emission.
- Penalties, and whether a stake waits longer before it unlocks.
- How the network knows that a node is up to date.
- What counts as "did the work" when fees are shared.
- The handover when a committee cannot reach its votes.
- How blocks travel among 100,000 nodes.
- How a new node knows that the state it is given is the true one.
- How usernames are written into the ledger.
- How a member judging a dispute is shown the evidence, and how long a dispute may wait.
- What follows from an address's record of disputes.
See it run: status, explorer, wallet, or join with your own node.