# LUXY Core

[LuxyCore](https://polygonscan.com/address/0x21C90bcE2943dD2B706248E906D4DF9637be27C4#code): 0x21C90bcE2943dD2B706248E906D4DF9637be27C4

### Match Orders

This is the core function of the Marketplace. Through this function the maker and taker orders are matched and executed in the following order:

1. Marketplace fee transfer
2. Royalty array transfer <mark style="color:green;">(Direct Royalty Payment)</mark>
3. Payout transfer (ERC-20, ERC-1155, Native Blockchain Token)
4. NFT payout transfer (ERC-721 )

The Payout transfer indication is due to the fact that any royalty or fee will be applied to those contracts only. Since ERC-721 is unique the protocol will never try to extract fees /royalties from the NFT payout. Given the scenario that an exchange between two different NFTs is made royalties or fees are not applied. Also, there is a priority order for the fee to be applied (it's only applied to one side of the transaction) which will go first to Native Blockchain Token, then to ERC-20, and finally to ERC-1155.


---

# Agent Instructions: 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.luxy.io/help-center/developers/smart-contracts/luxy-core.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.
