Oceanprotocol datatokens connect ERC20 licenses to specific data services
Oceanprotocol datatokens are ERC20 tokens a payer spends to order a specific data service. Each datatoken contract connects to a data NFT and defined usage terms. The selected service and contract template determine the payment path, permitted use and treatment of the token during consumption.
The Access License and Its Limits
Datatokens represent permission to use an associated data asset under its license terms. Those terms govern what a consumer may do with the service and any material it returns. Access can cover a download or computation against data, depending on the published service. A token balance describes the holder’s on-chain asset. It does not establish unrestricted reuse, permission to redistribute the dataset or successful delivery by the service.
The NFT Link and Service Selection
A single data NFT can support several datatoken contracts with different licensing terms. The ERC721 NFT represents the base intellectual property claim; the linked ERC20 contracts represent sublicenses. Buying a service permission leaves that NFT with its owner. The service selection also matters: an order identifies the relevant service through its service index. Holding the appropriate token does not let a consumer substitute an unrelated service.
Regular and Enterprise Consumption
The datatoken template determines whether consumption transfers the token or burns it. The regular implementation is
ERC20Template
, with template ID 1, while
ERC20TemplateEnterprise
uses template ID 2. Their shared ERC20 interface does not make their ordering behavior identical.
Regular Template
The Order Debit
The regular template’s
startOrder
function spends exactly 1.0 datatoken per order.
Its payer must hold at least that amount when the function runs. The token quantity identifies the access unit; it does not set the service’s price in another payment token.
The Payment Recipient
The regular contract sends the datatoken amount to the payment collector after deducting the configured community consumption fee. If no payment collector is set, the linked NFT owner is the fallback recipient. This transfer concerns datatokens, so it differs from the base-token proceeds of a fixed-rate sale.
Enterprise Template
The enterprise contract burns 1.0 datatoken when it starts an order. Its
buyFromFreAndOrder
method combines a fixed-rate purchase with ordering. The
buyFromDispenserAndOrder
method combines dispenser distribution with ordering. These methods handle acquisition and consumption in one call.
A combined enterprise order can leave no retained datatoken from its purchase, even after successful ordering.
Fixed-Rate Purchases and Free Distribution
A fixed-rate exchange prices datatokens in its configured ERC20 base token. The base token pays for acquisition; the datatoken represents the service permission. The exchange owner can update the stored rate, so fixed pricing does not promise an unchanged price indefinitely. Mint-enabled exchanges can create datatokens when their configuration and minting permission allow it. Other configurations rely on token inventory. The exchange must supply the datatoken the selected service uses.
A free-pricing dispenser supplies datatokens without an acquisition price, although blockchain transaction costs remain. Free distribution leaves the underlying license in place and does not convert compute access into permission to download data. The dispenser’s availability and distribution rules also determine whether a request can receive tokens.
Charges Beyond the Access Token
Order costs can include publishing-market charges, consuming-market charges and provider charges alongside datatoken acquisition. The fee structures identify a recipient, token and absolute amount. Those amounts are not automatically percentages of the dataset’s value or the payer’s balance. The provider signs its fee data, which the ordering contract checks. In these templates, the contract transfers each such fee only when its amount is positive and its token and recipient addresses are nonzero.
Fee currencies can differ from the exchange’s base token. Costs in different currencies need separate balances; adding their raw token quantities would produce a meaningless total. Network transaction costs form another expense. The selected exchange, market configuration and provider quote determine the payable amounts. A free datatoken can therefore accompany separately charged service access.
Can Another Wallet Pay for My Data Access?
The ordering functions allow the payer and consumer to be different addresses. The payer supplies datatokens and any required fee tokens, while the consumer address identifies the wallet the service should authorize. This supports paying for another wallet without first sending it the datatoken. Eligibility and service access conditions still apply to the designated consumer.
A confirmed
OrderStarted
event records both addresses, the service index and amount; it establishes ordering rather than completed delivery.
A Funded Order With a Separate Consumer
An empty consumer datatoken balance can coexist with a paid order when another wallet acts as payer. In this hypothetical example, the payer holds 1.7 datatokens for an active regular-template service. The designated consumer satisfies the access terms. The payer is neither the payment collector nor the community fee collector; all additional fees use other tokens with sufficient balances and approvals.
The payer orders the service for that consumer. The standard 1.0-datatoken debit leaves 0.7 datatokens with the payer. A confirmed
OrderStarted
event names both wallets and the selected service index. The consumer never needed to receive the datatoken before that order.
The paid order covers the designated consumer under that service’s terms. The remaining balance cannot fund another full order without additional datatokens. Actual delivery still requires the provider to supply the selected service.
Order Reuse and Provider Access
An existing order can remain valid after provider access expires, which is the case
reuseOrder
addresses. In the regular and enterprise templates, this method references the previous order and processes the provider fee without another datatoken payment. The provider must still accept the underlying order as valid. Reuse concerns access under that existing order; it does not buy a different service or create unrestricted access.
The service can impose its own access period or usage conditions. Reuse does not change those terms. An older order can still exist after the requested use stops meeting its conditions.
Service Type and Algorithm Permissions
The selected service determines whether consumption permits a download or Compute-to-Data execution. A compute service permits an algorithm to run against data in the configured environment and returns its results. That permission does not, by itself, include downloading the underlying dataset. The datatoken controls access to the service, while the service’s configuration determines the permitted operation and output.
Any configured algorithm allowlist still applies to compute access. Spending the token does not override that restriction. A task requiring a dataset download needs a service granting that access. For computation, the next choice is a service permitting the intended algorithm and its output.
Things people ask about Oceanprotocol datatokens
Does Holding a Datatoken Let Me Mint More Access Tokens?
Only an address with the minter role can mint datatokens in the regular template. Buying or receiving tokens does not grant that role. The NFT owner or an authorized ERC20 deployer manages minter assignments, so owning access tokens and controlling their supply are separate permissions.
Can a Data NFT Exist Before Its Publisher Creates Any Datatokens?
A publisher can create a data NFT before deploying any linked datatoken contracts. The publisher can add datatokens later when ready to grant access under defined terms. The NFT’s existence alone therefore does not establish an available, token-priced data service.
Is OCEAN the Same Token as a dataset’s Datatoken?
OCEAN is a separate ERC20 token from the datatoken a particular data service accepts. OCEAN historically had ecosystem utility. Following Ocean’s departure from the ASI Alliance, its stated role has no intended platform, payment or governance utility. The access license belongs to the service’s configured datatoken, so holding OCEAN does not establish possession of that license.
Will a Free Dispenser Always Send More Datatokens?
A dispenser sends tokens only when its configuration and inventory permit the request. It must be active, the request must stay within its amount limit and the destination’s existing balance must be below its balance threshold. A configured allowed-caller restriction also applies. Minting can replenish inventory only when the dispenser holds the minter role.
Which Allowances Does the Payer Need for Order Fees?
A payer needs sufficient allowance for each separately payable ERC20 fee token. The datatoken contract draws those fees from the payer, so the allowance must name that contract as spender. For a direct regular-template startOrder call, the contract transfers the datatoken from the caller internally; that debit does not require an allowance to a separate contract.
Can I Transfer an Unspent regular-template Datatoken to Someone Else?
An unspent regular-template datatoken supports ordinary ERC20 transfers. The recipient receives the token balance and can use it for its associated service under the applicable conditions. That transfer moves the access token; it neither transfers the linked data NFT nor copies the underlying dataset into the recipient’s wallet.
How Can I Distinguish Datatokens That Share a Name or Symbol?
A datatoken’s network and deployed contract address distinguish it from tokens with the same display name or symbol. The service’s configured datatoken address identifies the token it accepts. Matching ticker text cannot establish that relationship, and an address on a different network does not automatically identify the same deployed contract.