
Reading the chain

Reading the chain
Protocol
The whole mechanism in one page: what the vault holds, who can write, how the seal and the hash make the text verifiable, and where every BNB of tax goes.
01
02
A book is a list of chapters. Each chapter is a UTF-8 string of at most 16,384 bytes with a title, appended by one transaction. The vault stores every byte in contract storage, not in logs and not on IPFS. The factory records title, author, license and language at launch.
Onchain
Chapter titles and contents, metadata, chapter count, total bytes.
Offchain
Drafts and the original file. Nothing about readers.
03
Sealing is one call by the creator (or the Guardian). It sets a flag and the block number. After it, append reverts forever. A book that is not sealed may still grow, and the reader says so.
Onchain
The sealed flag and the sealed block.
Offchain
The decision to seal.
04
The vault keeps a rolling keccak256: h0 is zero, and each append sets h to keccak256(h, chapter). The reader recomputes the chain from the chapters it downloaded and compares with the stored value. A match proves the text read is exactly the text published.
h(0) = 0x00...00 h(i) = keccak256(h(i-1) || utf8(chapter(i))) contentHash() = h(n), frozen at seal
05
Every launch through the V2 factory carries the same economy. Each trade pays a 3% tax in BNB through the Flap tax processor, cut in three parts:
| Share | Of the tax | Of the trade | Paid by |
|---|---|---|---|
| Protocol treasury (Book Vault team) | 16.67% | 0.5% | the vault, distribute() |
| Author (creator of the token) | 33.33% | 1% | the vault, distribute(), once the book is sealed |
| Holders, BNB dividends | 50% | 1.5% | the Flap dividend tracker |
On the launch form this reads as vault share (mktBps) 5000 and dividend share 5000 of the tax, deflation 0, LP 0, dividend token BNB. The vault recognizes what it receives by balance delta and books 33.33% for the treasury and 66.67% for the creator. Payouts are pulled: anyone calls distribute and the vault sends the treasury share at once and the creator share (to the payout address the creator set) once the book is sealed; until then the creator share accumulates in the vault. A failed transfer stays pending instead of blocking the other party.
06
50% of every tax payment, 1.5% of the trade, goes to the Flap dividend tracker attached to the token, in native BNB. Every wallet holding at least 10,000 tokens earns its share, pro rata, and claims it on the flap.sh token page. The vault never touches this part.
Onchain
Dividend contract of the token, BNB sent to it, claimable balance per holder.
Offchain
Nothing. Claiming is one transaction on flap.sh.
07
08
09
Public domain texts stored so far: The Law by Frederic Bastiat (1850, 1874 translation by Patrick James Stirling, Project Gutenberg eBook 15962) and the Bitcoin whitepaper by Satoshi Nakamoto (2008, MIT license).
10
A book is launched as a tax token on flap.sh. The token trades on the Flap bonding curve, then on PancakeSwap once 80% of the supply is sold. Every trade pays a fixed 3% tax in BNB. The Flap tax processor sends 50% of it to the dividend tracker of the holders and 50% to the vault, which pays 33.33% to the protocol treasury and 66.67% to the author once the book is sealed. The diagram shows the flow for 1 BNB traded.
Three steps for a creator, all on the launch page: prepare the text, create the token from your wallet with the Book Vault factory (flap.sh stays an option), then write the chapters and seal.