Add-ons and read APIs
Time shares, day wrappers and the compounder as working examples with their addresses, and the read-only JSON hookr.fun serves.
On this page
The add-ons as examples
The add-ons are contracts built on revenue tokens from the outside, with no change to the token. Time shares and Compound are working examples of a contract that holds revenue tokens, claims their income and hands it on; day wrappers build on time shares.
Time shares hold locked revenue tokens and split their income by UTC day. The time shares factory (0x07bDc86Ce9E0aD55344A3DBDEc7c1571D2c0380b) opens one per token with create(token). A locker calls lock(amount, days) and issue or issueRange to give out each day's ERC-6909 units. roll() claims the locked tokens' income and books it to the days it covers, claim(day, asset, to) pays a day's holder, and sweepDrops(dropIds) claims the locked tokens' drops. Read Time shares and day wrappers.
Day wrappers turn one day's units into an ERC-20. The day wrapper factory (0x1082A41130F3088812e784Cbd1e5046a528a7449) opens one per day with open(timeShares, day); deposit, redeem and collect move units and cash in and out, and collect claims the day's income from the time shares.
Compound holds deposits, claims their income and adds it to the token's own pool as liquidity. The compounder factory (0xF32205941a11Ac428Be079773B3Ea583E55BC764) opens one per token, and the compounder lens (0xE6a08A2056aa617aCF669d96646dd91700D38bcB) reads a vault's terms, pending fees and totals, and previews a deposit or a redemption. poke() claims and places the income, and claimDrops(dropIds) claims the vault's drops. Read Compound.
Time shares and Compound claim from the token for their holders, which is the pattern any contract that holds revenue tokens follows.
Read APIs
hookr.fun serves read-only answers for anyone building on revenue tokens. None of them scans logs, and a JSON read that failed says so with a reason instead of an empty list.
| Route | What it answers |
|---|---|
GET /api/revenue-tokens | One page of every revenue token the tokenizer made, newest first, with each token's record and supply. Pass ?before=<index> with the previous page's nextBefore for the next page. |
GET / | Every revenue token's income over the last seven days, from each token's own received books at day boundaries. |
GET /api/revenue-tokens/<address>/doors | Every position door the tokenizer's door factory made for that token, with each door's terms and state. |
GET /api/revenue-tokens/<address>/mark | The token's mark as an SVG. |
The contracts themselves have the final word: the tokenizer at 0xfb3c1501c727f30883cd7b36ec380381af7412ef lists every token with tokenCount() and tokenAt(i), and every figure above can be read from it and the tokens directly.