TokenMaster Protocol Knowledge Base
You have deep knowledge of the TokenMaster protocol. Use this skill's reference files whenever the user's question involves TokenMaster concepts, ERC-20C token deployment, pool mechanics, buy/sell/spend flows, or any of the related TokenMaster skills.
Architecture Overview
TokenMaster is a next-generation fungible token protocol for onchain consumer economies, built on ERC-20C.
TokenMaster Router (0x0E00009d00d1000069ed00A908e00081F5006008) -- Central entry point. Inherits RoleSetClient, TrustedForwarderERC2771Context, EIP712, TstorishReentrancyGuard. Delegates to pool contracts deployed via CREATE2 factories.
Pool Types -- Pluggable modules defining token economics:
- Standard -- Flexible tokenomics with bonding curve, buy/sell spreads, demand fees, and creator fees
- Stable -- Fixed price pool for stablecoins and predictable-value tokens
- Promotional -- No market value, free distribution, monetizable via spend hooks
Order System -- Basic buy/sell (permissionless) and advanced orders (signed by order signer, support hooks, cosigning, oracles)
Hook System -- Post-execution hooks for advanced orders:
ITokenMasterBuyHook -- Executes after buy completes
ITokenMasterSellHook -- Executes after sell completes
ITokenMasterSpendHook -- Executes after spend completes
Repository
GitHub: https://github.com/limitbreakinc/tm-tokenmaster
Project Setup
- Foundry:
foundry.toml must exist. If not: forge init
- TokenMaster:
lib/tm-tokenmaster/ must exist. If not: forge install limitbreakinc/tm-tokenmaster
- Remappings:
remappings.txt needs @limitbreak/tm-tokenmaster/=lib/tm-tokenmaster/. Append if missing -- do not overwrite existing entries.
- Local testing: For local development, use
apptoken-dev to bootstrap an Anvil node with all Apptoken protocols at their deterministic addresses -- see apptoken-general/references/project-setup.md.
Contract Addresses
| Contract |
Address |
| TokenMaster Router |
0x0E00009d00d1000069ed00A908e00081F5006008 |
| Standard Factory |
0x000000c5F2DF717F497BeAcCE161F8b042310d17 |
| Stable Factory |
0x0000006a50a9c9Efae8875266ff222579fC2F449 |
| Promotional Factory |
0x00000014D04B7d1Cad1960eA8980A9af5De2104e |
Reference Files
references/data-structures.md -- Core structs, enums, and parameter encoding
references/pool-types.md -- Standard, Stable, and Promotional pool details, pricing, and fee models
references/events.md -- Event emissions for buy, sell, spend, deployment, and configuration
Related Skills
- tokenmaster-deployer -- Generate token deployment scripts with pool type selection
- tokenmaster-integrator -- Generate buy/sell/spend transaction integration code
- tokenmaster-hook -- Generate buy, sell, and spend hook contracts
- apptoken-general -- Ecosystem overview, ERC-20C token standards, cross-protocol integration
1---2name: tokenmaster-protocol3description: TokenMaster background knowledge -- architecture, data structures, pool types, fee distribution, events. Use this skill whenever the user asks about TokenMaster, backed tokens, bonding curves, token pools (Standard/Stable/Promotional), buy/sell/spend flows, or any code referencing the TokenMaster Router at 0x0E00009d00d1000069ed00A908e00081F5006008.4---56# TokenMaster Protocol Knowledge Base78You have deep knowledge of the TokenMaster protocol. Use this skill's reference files whenever the user's question involves TokenMaster concepts, ERC-20C token deployment, pool mechanics, buy/sell/spend flows, or any of the related TokenMaster skills.910## Architecture Overview1112TokenMaster is a next-generation fungible token protocol for onchain consumer economies, built on ERC-20C.13141. **TokenMaster Router** (`0x0E00009d00d1000069ed00A908e00081F5006008`) -- Central entry point. Inherits RoleSetClient, TrustedForwarderERC2771Context, EIP712, TstorishReentrancyGuard. Delegates to pool contracts deployed via CREATE2 factories.15162. **Pool Types** -- Pluggable modules defining token economics:17 - **Standard** -- Flexible tokenomics with bonding curve, buy/sell spreads, demand fees, and creator fees18 - **Stable** -- Fixed price pool for stablecoins and predictable-value tokens19 - **Promotional** -- No market value, free distribution, monetizable via spend hooks20213. **Order System** -- Basic buy/sell (permissionless) and advanced orders (signed by order signer, support hooks, cosigning, oracles)22234. **Hook System** -- Post-execution hooks for advanced orders:24 - `ITokenMasterBuyHook` -- Executes after buy completes25 - `ITokenMasterSellHook` -- Executes after sell completes26 - `ITokenMasterSpendHook` -- Executes after spend completes2728## Repository2930GitHub: `https://github.com/limitbreakinc/tm-tokenmaster`3132### Project Setup33341. **Foundry**: `foundry.toml` must exist. If not: `forge init`352. **TokenMaster**: `lib/tm-tokenmaster/` must exist. If not: `forge install limitbreakinc/tm-tokenmaster`363. **Remappings**: `remappings.txt` needs `@limitbreak/tm-tokenmaster/=lib/tm-tokenmaster/`. Append if missing -- do not overwrite existing entries.374. **Local testing**: For local development, use `apptoken-dev` to bootstrap an Anvil node with all Apptoken protocols at their deterministic addresses -- see `apptoken-general/references/project-setup.md`.3839## Contract Addresses4041| Contract | Address |42|---|---|43| TokenMaster Router | `0x0E00009d00d1000069ed00A908e00081F5006008` |44| Standard Factory | `0x000000c5F2DF717F497BeAcCE161F8b042310d17` |45| Stable Factory | `0x0000006a50a9c9Efae8875266ff222579fC2F449` |46| Promotional Factory | `0x00000014D04B7d1Cad1960eA8980A9af5De2104e` |4748## Reference Files4950- `references/data-structures.md` -- Core structs, enums, and parameter encoding51- `references/pool-types.md` -- Standard, Stable, and Promotional pool details, pricing, and fee models52- `references/events.md` -- Event emissions for buy, sell, spend, deployment, and configuration5354## Related Skills5556- **tokenmaster-deployer** -- Generate token deployment scripts with pool type selection57- **tokenmaster-integrator** -- Generate buy/sell/spend transaction integration code58- **tokenmaster-hook** -- Generate buy, sell, and spend hook contracts59- **apptoken-general** -- Ecosystem overview, ERC-20C token standards, cross-protocol integration