> For the complete documentation index, see [llms.txt](https://docs.collection.xyz/guides/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collection.xyz/guides/technical-reference/royalties/how-are-royalties-implemented.md).

# How are royalties implemented?

The main on-chain implementation of royalties is ERC2981. ERC2981 is a standard that advises on a particular amount `royaltyAmount` and royalty receiver address `receiver` given a `tokenId` and overall `salePrice`. (<https://eips.ethereum.org/EIPS/eip-2981>) For example, to say that royalties are 1% would be to input `10000` in `salePrice` and get `100` as the `royaltyAmount`

Other royalties numbers can be off-chain by collection owners on third party websites such as Opensea or Looksrare, but can only be gotten periodically and thus done on a error-prone best effort basis.

The advisory nature of ERC2981 makes it an incomplete solution. As the most widely adopted royalty standard at the moment, we integrate with it in a nuanced way: We use the derived royalty percentage as an override, while in order to prevent pool creators from siphoning off royalties from NFT collections maliciously, we allow royaltyRecipient to be set as a fallback, a place to be sent if the `receiver` is not set to any value, as per ERC2981


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.collection.xyz/guides/technical-reference/royalties/how-are-royalties-implemented.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
