> ## Documentation Index
> Fetch the complete documentation index at: https://docs.immutable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Royalties

Immutable's ecosystem enforces royalty fees to content creators when assets are bought and sold. Royalty fees are set during minting and configured in the smart contract.

<Card title="Contracts Repository" icon="github" href="https://github.com/immutable/contracts">
  View royalty implementation source code
</Card>

## How Royalties Work

When an NFT or SFT is sold on the secondary market, a royalty fee automatically directs a portion of the transaction value to the original creator.

| Component              | Description                                                                 |
| ---------------------- | --------------------------------------------------------------------------- |
| **Royalty Percentage** | Set at contract deployment (e.g., 5% = 500 basis points)                    |
| **Recipient**          | Address that receives royalties (can be a Fee Splitter)                     |
| **Standard**           | EIP-2981 for on-chain royalty info                                          |
| **Enforcement**        | Via [Operator Allowlist](/docs/products/asset-contracts/operator-allowlist) |

<Info>
  Royalty fees are optional—it's up to the collection owner. If set, Immutable's ecosystem enforces payment.
</Info>

## Setting Royalties

### Via Hub

1. Go to [Hub](https://hub.immutable.com) → **Contracts** → **Deploy**
2. Select your contract type (ERC-721 or ERC-1155)
3. Configure:
   * **Royalty Recipient**: Address to receive royalties
   * **Royalty Percentage**: Percentage of sale price (e.g., 5%)
4. Deploy contract

### Via Code

```solidity theme={null}
import "@imtbl/contracts/contracts/token/erc721/preset/ImmutableERC721.sol";

contract MyNFT is ImmutableERC721 {
    constructor(
        address owner,
        string memory name,
        string memory symbol,
        string memory baseURI,
        string memory contractURI,
        address operatorAllowlist,
        address royaltyReceiver,  // Royalty recipient
        uint96 royaltyFeeNumerator // 500 = 5%
    ) ImmutableERC721(
        owner, name, symbol, baseURI, contractURI,
        operatorAllowlist, royaltyReceiver, royaltyFeeNumerator
    ) {}
}
```

## Fee Splitter

For distributing royalties to multiple recipients, use the Fee Splitter contract.

<Card title="Fee Splitter Contract" icon="github" href="https://github.com/immutable/contracts/tree/main/contracts/payment-splitter">
  View the Fee Splitter source code
</Card>

### Key Features

* **Multi-Recipient Support**: Allocate fees to multiple recipients
* **On-Chain Transparency**: Wallet addresses and shares stored on-chain
* **Gas Efficiency**: More efficient than real-time splitting

### How It Works

1. Set the Fee Splitter contract as your royalty recipient
2. Configure recipients and their percentage shares
3. Fees accumulate in the Fee Splitter contract
4. Call `releaseAll()` to distribute accumulated fees

```solidity theme={null}
// Releasing fees to all recipients
feeSplitter.releaseAll([USDC_ADDRESS, WETH_ADDRESS]);

// Release only native token (IMX)
feeSplitter.releaseAll();
```

### ERC-20 Allowlist

The Fee Splitter includes an allowlist for accepted tokens:

```solidity theme={null}
// Add token to allowlist
feeSplitter.addToAllowlist(ERC20_ADDRESS);

// Remove token from allowlist
feeSplitter.removeFromAllowlist(ERC20_ADDRESS);
```

<Warning>
  Unlisted tokens sent to the Fee Splitter won't be distributed until added to the allowlist.
</Warning>

### Updating Allocation

Admin users can update fee allocation. When updated:

* All unreleased fees are redistributed according to the new configuration
* Existing minted assets automatically use the new configuration

<Tip>
  Call `releaseAll()` before changing allocation to distribute fees according to the original configuration.
</Tip>

## Multiple Fee Splitters

Different scenarios require separate Fee Splitter contracts:

| Scenario              | Solution                                      |
| --------------------- | --------------------------------------------- |
| Different recipients  | One contract per unique recipient combination |
| Different percentages | One contract per unique split ratio           |
| Multiple games        | One contract per game/collection              |

## Royalty Enforcement

Royalties are enforced through the [Operator Allowlist](/docs/products/asset-contracts/operator-allowlist). Only allowlisted marketplaces (like [Immutable's Orderbook](/docs/products/orderbook/overview)) can transfer tokens, ensuring royalties are always paid.

<CardGroup cols={2}>
  <Card title="Operator Allowlist" icon="shield-check" href="/docs/products/asset-contracts/operator-allowlist">
    Learn how royalty enforcement works
  </Card>

  <Card title="Deploy Contract" icon="rocket" href="/docs/products/asset-contracts/overview">
    Deploy a contract with royalties
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Operator Allowlist" icon="shield-check" href="/docs/products/asset-contracts/operator-allowlist">
    Learn about royalty enforcement
  </Card>

  <Card title="Deploy Contracts" icon="rocket" href="/docs/products/hub/deploy-contracts">
    Deploy via Hub with royalties
  </Card>

  <Card title="Contracts Overview" icon="file-contract" href="/docs/products/asset-contracts/overview">
    Explore contract options
  </Card>

  <Card title="Orderbook" icon="book" href="/docs/products/orderbook/overview">
    Enable secondary trading
  </Card>
</CardGroup>
