On-chain Lifecycle
The full on-chain lifecycle of a smart product - from contract deployment through mint, transfer, burn, and settlement.
Every smart product goes through a series of on-chain transactions. This page covers each phase and the Chainhook events they trigger.
1. Deploy (DRAFT -> PUBLISHED)
The creator signs a contract deployment transaction. Once confirmed:
- A
DEPLOYChainhook fires SmartProduct.contractAddressis setSmartProduct.statusmoves toPUBLISHED
Initiated via POST /api/contracts/generate (returns Clarity source for signing).
2. Mint (instance created)
A collector signs a mint transaction. Once confirmed:
- A
MINTChainhook fires - A new
ProductInstanceis created with the nextinstanceNumber SmartProduct.currentInstancesincrements
3. Transfer (ownership change)
The current owner signs a transfer transaction. Once confirmed:
- A
TRANSFERChainhook fires ProductInstance.ownerAddressis updated
4. Burn (destruction)
The owner signs a burn transaction. Once confirmed:
- A
BURNChainhook fires ProductInstance.burnedAtis set (withburnTxId)SmartProduct.currentInstancesis decremented
There is no BURNED product status - a burn is recorded on the instance via burnedAt. Burned instances cannot be restored (a reorg that drops the burn tx is the only path back, handled by the reorg sweep).
5. Lock (PREDICTION only)
A lock transaction signals finalization. Once confirmed:
- A
LOCKChainhook fires SmartProduct.statusmoves toLOCKED- No new mints are accepted
6. Settle (PREDICTION only)
Results are submitted on-chain. Once confirmed:
- A
SETTLEChainhook fires SmartProduct.statusmoves toSETTLED- Prize claims become available
7. Archive
A manual API action. No on-chain transaction required. Sets SmartProduct.status to ARCHIVED.
Transaction signing
A user's transactions are sent from their own wallet. A bring-your-own wallet signs in the browser. For a hosted account (Google or X sign-in) the server signs on the user's behalf with its own authorization key on that wallet; the routes that sign for a user check their session first. A few protocol actions, such as posting results for a tournament settled by an outside count, are signed by the protocol's own wallet. The SDK provides helpers that construct the correct Clarity function call.
The Create-to-Earn Economy
How the protocol gives STX and sBTC two different jobs - gifted STX to create, earned sBTC to collect - and the seeder that makes a newcomer's first sBTC arrive as income.
Authentication
Two layers - an API key that identifies your app, and a user session that identifies the person acting. How they compose on a request.