# Token Transfers

### ERC20 Tokens

Standard ERC20 token transfers to and from the DEX contract are paid to users with `transfer()` calls and collected from users with `transferFrom()`calls. Users need to `approve()` or `permit()` against the `CrocSwapDex` contract for any tokens they're planning to deposit or sell in a swap.&#x20;

Tokens being received from the DEX do not require any approval calls. Tokens that are traded through the surplus collateral facility do not recall any approval. For example a short-term speculator could buy a token, have it settle to their surplus collateral deposit, and sell it back for USDC without ever needing to approve the token.

### &#x20;Native Ethereum

Ambient supports the use of the chain's native token (e.g. ETH on Ethereum) without resorting to ERC20 wrappers.

Native ETH paid by the DEX to the user is sent directly to the user's wallet address.

Native ETH deposited or swapped into the DEX must be sent in the `msg.value` of the contract call or transaction. If the user knows the exact quantity of ETH required by the transaction they can set `msg.value` exactly. Otherwise the user should attach the upper-bound of the ETH debit they expect the contract to incur. All DEX transactions involving ETH will refund any overpaid amount in `msg.value` to the end-user.

**WARNING:** ETH refunds for `msg.value` will not be paid for any transaction not involving native ETH. (E.g. a swap between USDC and DAI.) `msg.value` should only be attached on transactions involving ETH deposits or pools.


---

# 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.ambient.finance/developers/token-transfers.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.
