For the complete documentation index, see llms.txt. This page is also available as Markdown.

Fees and app registration

How fees work in OCC v1: a base fee, an app owner fee, and app registration through an app ID.

Every exchange on OCC v1 has two kinds of cost: the network fee of the blockchain, and a protocol fee set per app.

Parties

Party
Role

User

Sends the exchange and pays the network fee and the app's required fee

App integrator

Registers an app (app ID) with the AppFeeManager contract and collects the app integrator fee for it

Protocol owner

The owner of the fee-collecting contract; collects the base fee

The original protocol-fees schematic links the base fee to Level-1 integrators and the app ("dApp owner") fee to Level-2 integrators (Integration paths); whether this still applies is to be confirmed.

How it works

  1. An integrator registers an app and receives an app ID through the AppFeeManager contract.

  2. The app passes its app ID when it sends a mail or a chat message.

  3. The Mail or Chat contract reports the fee required for that app ID (getAppRequiredFee); the SDK reads it and sends it with the exchange.

  4. If the amount sent is too low, the contract rejects the exchange (InsufficientFeeSent). Otherwise it records the fee as two parts, a base fee and an app integrator fee (FeesCollected), and handles any excess as the contract defines.

  5. The app integrator withdraws the app's collected fees (withdrawAppFees); the protocol owner withdraws the base fees (withdrawOwnerFees).

Figure: the required fee paid with an exchange is recorded as a base fee and an app integrator fee, each withdrawn by its party. Derived from the contract interface used by SDK 0.5.x.

The exact split rules are defined in the contracts. The original schematic is the protocol fees schematic.

Fee amounts differ per network and per app, and can change. This page gives no amounts.

Last updated