# How it Works

> 📢 Paying gas from your Safe is a native functionality of the Gnosis Safe contracts. For more information, check out [the contracts](https://github.com/safe-global/safe-contracts/blob/main/contracts/Safe.sol) or reach out to our team.

### Requirements

1. Transactions with Safe gas payments must be created in Den. See the FAQ to learn how to make any transaction pay gas from your Safe.
2. Your Safe must have enough native tokens (e.g. ETH on Ethereum Mainnet, MATIC on Polygon, etc) to pay the gas fee.

### How it Works

When a transaction is created in Den, it is configured by default so the Safe pays the cost of gas to any executing wallet. After you click execute on Den, a relayer executes the transaction on your behalf and is reimbursed by the Safe automatically. You can choose to override this relayer, and execute with your own wallet. In that case, your wallet is reimbursed instead.

If you end up executing this transaction elsewhere, the wallet that executes will be reimbursed instead.


---

# 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.onchainden.com/pay-gas-from-safe/how-it-works.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.
