# Cross-chain execution

In order to save gas, we don't run the full battle engine at the Ethereum layer. We use it as an interface to a cheaper L2, in our case, Arbitrum, which also provides us with extra security due to their rollups.

We still do perform some crucial checks in the L1, like NFT ownership, but we offload as much as possible to the L2.

To achieve that, we use [Axelar](https://axelar.network/) to send messages from L1 to L2 and vice versa. That means that our flows (like join Battle Royale queue and execute Battle Royale) are asynchronous. The full process is as follows:

1. **A transaction is sent to the Ethereum network**

The transaction will require a small amount of ETH apart from the transaction gas fee that will be used by Axelar to pay for the gas of executing the transaction at the destination L2. Since this is the cost for a L2 transaction execution, it translates to a negligible overhead.

2. **Axelar propagates the message from L1 to L2**

Axelar uses the ether provided in the 1st step to execute the desired message at the destination chain, after the message has reached the Axelar network. See [Monitor cross-chain actions](/unfungibles/troubleshooting/monitor-cross-chain-actions.md) for more details.

3. **The operation is executed at the target L2**

Here is where we execute expensive operations, like running the battle engine to resolve a Battle Royale, saving users hundreds of dollars in gas cost. This also allows for way more complex mechanics to be run, as the costs would increase exponentially on L1, but not on the L2.

4. **In some cases, another message is sent back to L1 - for example, to execute the prize payment to the game mode winner**

In some flows, like when a Battle Royale is fully executed, we need to use the L1 smart contract again to perform a final transfer of the total Battle Royale prize to the winner. This finishes the flow and cleans up the state.


---

# 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.unfungibles.xyz/unfungibles/technical-content/cross-chain-execution.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.
