Fee Structure Overview
The marketplace supports four types of fees:- Publisher Market Order Fee - Absolute fee taken when an asset is ordered
- Publisher Market Fixed Swap Fee - Percentage fee when datatokens are bought from fixed rate exchange
- Consume Market Order Fee - Absolute fee taken when consuming an asset
- Consume Market Fixed Swap Fee - Percentage fee when buying datatokens as a consumer
Fee Configuration
Fees are configured through environment variables and the application configuration file.Fee Recipient Address
The Ethereum address where all marketplace fees will be sent.Default: Set in .env:
0x9984b2453eC7D99a73A5B3a46Da81f197B753C8dConfiguration in app.config.js:Publisher Fees
Publishers can earn fees from assets published on the marketplace.Publisher Market Order Fee
Absolute fee value taken upon ordering an asset. This fee is declared during ERC20 datatoken creation.Default: Example .env:
0Type: Absolute valueWhen charged: When a consumer orders/purchases an assetConfiguration in app.config.js:Publisher Market Fixed Swap Fee
Percentage fee received by the publisher market when a datatoken is bought from a fixed rate exchange.Default: Example .env:
0Type: PercentageWhen charged: When datatokens are purchased through fixed rate pricingConfiguration in app.config.js:Consumer Fees
Consumers pay fees when purchasing or accessing data assets.Consume Market Order Fee
Absolute fee value taken upon ordering an asset. This fee is specified at the time of order.Default: Example .env:
0Type: Absolute valueWhen charged: When a consumer places an order for an assetConfiguration in app.config.js:Consume Market Fixed Swap Fee
Percentage fee received by the consume market when a datatoken is bought from a fixed rate exchange.Default: Example .env:
0Type: PercentageWhen charged: When consumers buy datatokens through fixed rate pricingConfiguration in app.config.js:Fee Examples
Example 1: No Fees (Default)
By default, the marketplace operates with zero fees:.env
Example 2: Publisher-Only Fees
Charge publishers 1 token per order and 1% on fixed rate swaps:.env
Example 3: Consumer-Only Fees
Charge consumers 1 token per order and 1% on fixed rate swaps:.env
Example 4: Balanced Fee Structure
Charge both publishers and consumers:.env
How Fees Are Applied
Order Fee Flow
- Consumer initiates an asset purchase/order
- Order fee (if configured) is calculated
- Fee is transferred to the
marketFeeAddress - Remaining payment goes to the publisher
Fixed Swap Fee Flow
- User buys datatokens from fixed rate exchange
- Swap percentage fee (if configured) is calculated
- Fee is transferred to the
marketFeeAddress - Remaining tokens are delivered to the buyer
Fee Implementation Details
Fees are implemented at the smart contract level:- Order fees are declared during ERC20 datatoken creation and enforced on-chain
- Fixed swap fees are applied during the token exchange process
- All fees are automatically sent to the configured
marketFeeAddress