Twice the cost
You will learn
How the project prices an operation and what a month of tokens buys.
Every dollar becomes tokens at one rate, TOKEN_MICRO_USD 5000: a token is half a cent. price_tokens sells an operation at twice what it costs, MARKUP_PCT 200, and rounds up so nothing sells below that: a cost of 12300 micro-dollars is 5 tokens. month_tokens turns $20 into 4000 tokens, which is 14 reels of 270 tokens or 333 portraits of 12.
Try it
Find the costs that give exactly 1 token; then find the monthly price that buys 36 reels.

Drag what an operation costs the project and what a person pays a month: price_tokens sells it at twice the cost in half-cent tokens, and month_tokens turns dollars into tokens.
specs/automation/token-wallet.t27
// SPDX-License-Identifier: Apache-2.0
// specs/automation/token-wallet.t27 -- the token wallet of the agent market: every dollar a
// person pays becomes tokens at ONE rate, every operation is sold at twice what it costs, and
// tokens that are not spent within a month burn.
// Host: 999-multibots-telegraf apps/vibee-editor/packages/vibee-atoms/src/token-wallet.ts
// (the month a package buys, what it is worth in reels and portraits, when it burns),
// read by the mini app's welcome screen and package cards (player/src/pages/Welcome.tsx,
// player/src/components/Agents/PackageCards.tsx) and by render's billing
// (render/src/agent/billing-shared.ts: the rate and the markup every price is made with).
// Generated: `t27c gen-ts` of this file is vendored into the host as
// apps/vibee-editor/packages/vibee-atoms/src/spec/token-wallet.gen.ts. The host imports
// the numbers from there and never restates them; a host test runs this file's vectors
// against the host.
// Why a burn: the owner, 2026-10-01: all money goes into tokens, and the tokens must be spent
// within the month or they burn -- so a person who paid makes content instead of saving
// tokens. Kling and Runway burn a month of plan credits the same way; Kling spends the
// credits that burn soonest first, and so does this.
// Why one rate: every price is made at $0.005 a token, but the Stars packs (render-server.ts
// PACKS) sell a token for 1.1-1.5 Stars, about three times that (tools.ts SALE_USD_PER_TOKEN).
// A package month is sold at THIS rate; moving the Stars packs onto it is the owner's call.
// Claim status: v1 (2026-10-01). The rate, the markup and the start gift are what the host
// already charges. The month, the burn and the spend order are DECIDED but not yet in the
// ledger: render/src/token-ledger.ts keeps one balance with no dates; the batches with an
// expiry are the next change, and the burn must not be sold before it lands.
// Owner decision still open: whether tokens bought on top of a package burn in 30 days like
// the package month (the owner's rule, kept here) or live longer, as Kling's and Runway's
// bought credits do (TOPUP_DAYS is the one line to change).
// phi^2 + 1/phi^2 = 3 | TRINITY
module automation::token_wallet {
pub const KIND : str = "automation";
pub const ID : str = "token-wallet";
pub const REPO : str = "999-multibots-telegraf";
pub const VERSION : u8 = 1;
// ---- One rate, one markup -----------------------------------------------------------
pub const TOKEN_MICRO_USD : u32 = 5000; // one token is half a cent, everywhere
pub const MARKUP_PCT : u32 = 200; // an operation is sold at twice what it costs us
pub const MICRO_PER_USD : u32 = 1000000;
// ---- What a month buys ----------------------------------------------------------------
// A package's monthly price, in whole dollars, becomes tokens at the one rate: nothing is
// kept back, the margin is the markup on what is spent and whatever burns.
pub const SETUP_INCLUDES_MONTH : bool = true; // the launch price carries the first month
// ---- The burn -----------------------------------------------------------------------
pub const MONTH_DAYS : u16 = 30; // a package month burns 30 days after it lands
pub const TOPUP_DAYS : u16 = 30; // owner's rule: bought tokens burn the same way
pub const START_DAYS : u16 = 30; // the start gift burns too
pub const SPEND_ORDER : str = "soonest-burn-first";
pub const BURNS_BACKDATED : bool = false; // tokens held before v1 never burn
pub const WARN_DAYS_FIRST : u16 = 7;
pub const WARN_DAYS_SECOND : u16 = 3;
pub const WARN_DAYS_LAST : u16 = 1;
// ---- The start gift -------------------------------------------------------------------
pub const START_TOKENS : u32 = 20; // granted once, on the first paid call
// ---- What tokens are worth, in things a person can picture ----------------------------
// The reference reel is the story reel's own estimate (crm-story-reel.t27
// PRICE_ESTIMATE_TOKENS: three stills, three lines, 13 s of lip-sync, one cut); the
// portrait is the lead magnet's price (crm-lead-magnet.t27 OP_TOKENS). A host test holds
// both to those specs, so the welcome screen cannot promise a reel at an old price.
pub const REEL_TOKENS : u32 = 270;
pub const PORTRAIT_TOKENS : u32 = 12;
// Dollars a month to tokens a month.
fn month_tokens(usd: u32) -> u32 {
return usd * MICRO_PER_USD / TOKEN_MICRO_USD;
}
// An operation's price in tokens from what it costs us, in micro-dollars: rounded up, so
// nothing is sold below twice its cost.
fn price_tokens(cost_micro_usd: u32) -> u32 {
return (cost_micro_usd * MARKUP_PCT / 100 + TOKEN_MICRO_USD - 1) / TOKEN_MICRO_USD;
}
// Whole reels a number of tokens buys.
fn reels_in(tokens: u32) -> u32 {
return tokens / REEL_TOKENS;
}
// Whole portraits a number of tokens buys.
fn portraits_in(tokens: u32) -> u32 {
return tokens / PORTRAIT_TOKENS;
}
// Days left before a batch granted on `granted_day` burns, on `today` (0 when gone).
fn days_left(granted_day: u16, today: u16, life: u16) -> u16 {
if (today >= granted_day + life) {
return 0;
}
return granted_day + life - today;
}
test "every dollar of a package month becomes tokens at the one rate" {
assert(month_tokens(15) == 3000);
assert(month_tokens(35) == 7000);
assert(month_tokens(50) == 10000);
assert(SETUP_INCLUDES_MONTH);
}
test "an operation is sold at twice its cost, rounded up" {
assert(MARKUP_PCT == 200);
assert(price_tokens(30000) == 12);
assert(price_tokens(20000) == 8);
assert(price_tokens(1) == 1);
}
test "a month burns on day thirty and nothing held before it burns" {
assert(days_left(0, 0, MONTH_DAYS) == 30);
assert(days_left(0, 23, MONTH_DAYS) == 7);
assert(days_left(0, 30, MONTH_DAYS) == 0);
assert(TOPUP_DAYS == MONTH_DAYS);
assert(SPEND_ORDER == "soonest-burn-first");
assert(!BURNS_BACKDATED);
}
test "the warnings come at seven, three and one day left" {
assert(WARN_DAYS_FIRST > WARN_DAYS_SECOND);
assert(WARN_DAYS_SECOND > WARN_DAYS_LAST);
assert(WARN_DAYS_FIRST < MONTH_DAYS);
}
test "the start gift buys one portrait and no reel" {
assert(portraits_in(START_TOKENS) == 1);
assert(reels_in(START_TOKENS) == 0);
}
test "a Blogger month is twenty-five reels" {
assert(reels_in(month_tokens(35)) == 25);
assert(reels_in(month_tokens(15)) == 11);
assert(reels_in(month_tokens(50)) == 37);
assert(portraits_in(month_tokens(35)) == 583);
}
}
// phi^2 + 1/phi^2 = 3 | TRINITY
All lessons
Module 1 · The task
An issue becomes work only once it is shaped: the sections it lacks are written or asked for, its boundary names real files, and one filter reads every kind of task.
Module 2 · Who goes next
The order the Queen takes issues in: a label ages one step, at most 3 criticals run as critical, and nothing new starts while finished work waits for review.
Module 3 · A bee's life
From candidate to done: twelve states and sixteen events, a ship in the game that flies home, and a deploy that does not cut a bee short.
Module 4 · The reviewer bee
Finished work is judged on its own clock: enough reviews at once to keep up, a pause that doubles for a row that waits, and a merge gate that zero checks cannot open.
Module 5 · The review jam
A pull request that will not move is in exactly one of ten cases, each with the Queen's move, and a red check is inherited only when master says so.
Module 6 · Keys
A bee's model key can be refused: the code in the body sorts the refusal, a transient one rests the key for seconds, and the bee moves on to the next free key.
Module 7 · Credit and money
Lending a key earns no credit, an operation is sold at twice its cost in half-cent tokens, and tokens burn 30 days after they land.
Module 8 · Agents among themselves
One bot per agent in one group: who is called, a chain three bot messages deep, and the clocks that keep agents from flooding a chat.
Module 9 · Night and the board
What the hive shows: a night watch that opens, comments on and closes issues, the columns of the public board, and the comb that flashes for each event.