Core contracts
Important functions
Market creation and control
computeModelId(repository, revision, task)derives the canonical key.commitLaunch(commitment)protects a creator-bound launch before its parameters enter the mempool.launchModelAndMarket(params, launchSalt)consumes the prior-block commitment and performs the complete launch atomically.previewCurve(curveConfigId, creditToken)returns token ordering, ticks, and starting price.setMarketLpFee(modelId, newFee)schedules a pool-fee change within current bounds.applyMarketLpFee(modelId)applies it after the one-hour safety delay;cancelMarketLpFeeUpdate(modelId)lets the creator cancel it first.collectAndDistributeFees(tokenId, deadline)collects and splits accrued LP fees.
Provider offers
registerOffer(params)creates an active offer and tariff version 1.proposeTariff(...)creates a delayed pending tariff.activateTariff(offerId)activates it after the delay.setPayout,updateManifest, andsetStatusare operator controls.quarantineandclearQuarantineare protocol owner controls.
Inference permits
openPermit(modelId, pinnedOfferId, amount, expiresAt)deposits credits.topUpPermit(permitId, amount)increases an open permit.requestClosePermit,cancelClosePermit, andclosePermitmanage delayed refunds.settleandsettleBatchverify signed usage receipts and distribute credits.
Privileged controls
The protocol owner can:- Change the global inference protocol fee.
- Pause or retire model listings.
- Add or disable curve presets.
- Change allowed LP-fee bounds.
- Quarantine provider offers.
- Rotate the Gateway signer and protocol treasury.