Core Concepts
Twin.fun introduces a few critical primitives that power the marketplace.
Digital Twin
An AI agent referenced on-chain by a 16-byte twin ID (bytes16). Metadata for each twin lives off-chain (IPFS, Arweave, or trusted HTTPS) and is surfaced inside the app experience.
Keys
Deterministic units tracked directly in contract mappings. Users acquire or redeem keys by calling bonding curve functions. Holding ≥1 key unlocks gated experiences tied to that twin. Keys were previously referred to as "shares" in early contract versions—you may still see buyShares and sellShares in the ABI.
Twin Owner
The address that receives the subject fee on each trade. Owners can update metadata URLs and manage brand assets for their twin.
Protocol Fees
A percentage of every trade is directed to the treasury address. Fee parameters are configurable by the protocol owner.
Bonding Curve
Twin.fun uses a quadratic, FriendTech-style curve where marginal price increases with supply. Buying keys pushes supply up the curve; selling does the opposite.
Gated Utilities
App features—chat, tools, or custom integrations—unlock when an address holds keys for a specific twin.
Subgraph / Indexer
The off-chain data layer that streams trades, holders, and analytics to the app and any external builders.
