---
description: The Ocean Protocol defines various fees for creating a sustainability loop.
---
# Fees
One transaction may have fees going to several entities, such as the market where the asset was published, or the Ocean Community. Here are all of them:
* Publish Market: the market where the asset was published.
* Consume Market: the market where the asset was consumed.
* Provider: the entity facilitating asset consumption. May serve up data, run compute, etc.
* Ocean Community: Ocean Community Wallet.
### Publish fee
When you publish an asset on the Ocean marketplace, there are currently no charges for publishing fees :tada:
However, if you're building a custom marketplace, you have the flexibility to include a publishing fee by adding an extra transaction in the publish flow. Depending on your marketplace's unique use case, you, as the marketplace owner, can decide whether or not to implement this fee. We believe in giving you the freedom to tailor your marketplace to your specific needs and preferences.
| Value in Ocean Market | Value in Other Markets |
| --------------------- | ------------------------------ |
| 0% | Customizable in market config. |
### Consume(aka. Order) fee
When a user exchanges a [datatoken](datatokens.md) for the privilege of downloading an asset or initiating a compute job that utilizes the asset, consume fees come into play. These fees are associated with accessing an asset and include:
1. **Publisher Market** Consumption Fee
* Defined during the ERC20 [creation](https://github.com/oceanprotocol/contracts/blob/b937a12b50dc4bdb7a6901c33e5c8fa136697df7/contracts/templates/ERC721Template.sol#L334).
* Defined as Address, Token, Amount. The amount is an absolute value(not a percentage).
* A marketplace can charge a specified amount per order.
* Eg: A market can set a fixed fee of 10 USDT per order, no matter what pricing schemas are used (fixedrate with ETH, BTC, dispenser, etc).
2. **Consume Market** Consumption Fee
* A market can specify what fee it wants on the order function.
3. **Provider Consumption** Fees
* Defined by the [Provider](../provider/README.md) for any consumption.
* Expressed in: Address, Token, Amount (absolute), Timeout.
* You can retrieve them when calling the initialize endpoint.
* Eg: A provider can charge a fixed fee of 10 USDT per consume, irrespective of the pricing schema used (e.g., fixed rate with ETH, BTC, dispenser).
4. **Ocean Community** Fee
* Ocean's smart contracts collect **Ocean Community fees** during order operations. These fees are reinvested in community projects and distributed to the veOcean holders through Data Farming.
* This fee is set at the [smart contract](https://github.com/oceanprotocol/contracts/blob/main/contracts/communityFee/OPFCommunityFeeCollector.sol) level.
* It can be updated by Ocean Protocol Foundation. See details in our [smart contracts](https://github.com/oceanprotocol/contracts/blob/main/contracts/pools/FactoryRouter.sol#L391-L407).
Update Ocean Community Fees
The Ocean Protocol Foundation can [change](https://github.com/oceanprotocol/contracts/blob/main/contracts/pools/FactoryRouter.sol#L391-L407) the Ocean community fees.
```solidity
/**
* @dev updateOPCFee
* Updates OP Community Fees
* @param _newSwapOceanFee Amount charged for swapping with ocean approved tokens
* @param _newSwapNonOceanFee Amount charged for swapping with non ocean approved tokens
* @param _newConsumeFee Amount charged from consumeFees
* @param _newProviderFee Amount charged for providerFees
*/
function updateOPCFee(uint256 _newSwapOceanFee, uint256 _newSwapNonOceanFee,
uint256 _newConsumeFee, uint256 _newProviderFee) external onlyRouterOwner {
swapOceanFee = _newSwapOceanFee;
swapNonOceanFee = _newSwapNonOceanFee;
consumeFee = _newConsumeFee;
providerFee = _newProviderFee;
emit OPCFeeChanged(msg.sender, _newSwapOceanFee, _newSwapNonOceanFee, _newConsumeFee, _newProviderFee);
}
```
Customizable by the Provider Owner.
E.g. USDC
Compute: COST_PER_MIN
Environment: 1 CPU, 60 secs max
Compute: COST_PER_MIN
Environment: 1 CPU, 1 hour max