> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/evm/interop/tokens/token-transfers/l1-and-core.md). Agents can also search and read this documentation through its [MCP server](https://docs.lighter.xyz/~gitbook/mcp).

# L1 and Core

Transfers between Ethereum L1 and Core move ETH or an asset with an active L1 representation. For an L1-native asset, this path becomes available after Core registration. For an EVM-native asset, its L1 wrapper must also be enabled. Core-native assets cannot be transferred to L1.

See [Token linking](https://docs.lighter.xyz/evm/interop/tokens/token-linking.md) for setup and [amounts](https://docs.lighter.xyz/evm/interop/tokens/token-transfers.md#amounts) and [routes](https://docs.lighter.xyz/evm/interop/tokens/token-transfers.md#routes) for Core transfer conventions.

## L1 to Core

Call [`L1InteropManager.sendToCore(...)`](https://l1-explorer.devnet.lighterevm.axiom.xyz/address/0x8709B4047608BE3083dA13f703757A10f5B83A7c?tab=contract) on L1. The recipient is a Core master account identified by its controlling address. It can be an L1-controlled or an EVM-controlled account; see [Core accounts](https://docs.lighter.xyz/evm/interop/accounts.md#core-accounts). If the account does not exist, Core creates it when processing the deposit.

```solidity
function sendToCore(
    uint32 assetIndex,
    address to,
    bool isL1Account,
    uint256 amount,
    RouteType routeType
) external payable;
```

| Type                                                                                 | Parameter     | Description                                                                           |
| ------------------------------------------------------------------------------------ | ------------- | ------------------------------------------------------------------------------------- |
| `uint32`                                                                             | `assetIndex`  | Asset identifier.                                                                     |
| `address`                                                                            | `to`          | Controlling address of the recipient Core master account. Must be nonzero.            |
| `bool`                                                                               | `isL1Account` | `true` for an L1-controlled Core account; `false` for an EVM-controlled Core account. |
| `uint256`                                                                            | `amount`      | Amount in the L1 token's smallest units, such as wei for ETH.                         |
| [`RouteType`](https://docs.lighter.xyz/evm/interop/tokens/token-transfers.md#routes) | `routeType`   | Destination balance: `Perps = 0` or `Spot = 1`.                                       |

`amount` is in the L1 token's smallest units and must be a nonzero multiple of the asset's L1 `tickSize`. Read the L1 configuration from `L1InteropManager.getAssetConfig(assetIndex)`. The deposit credits `amount / tickSize` [Core base units](https://docs.lighter.xyz/evm/interop/tokens/token-transfers.md#amounts) to the selected perps or spot route, subject to Core acceptance.

1. For an ERC-20, approve `L1InteropManager` to spend `amount` of the configured L1 token.
2. Call `sendToCore(...)` with the recipient's controlling address and `bool isL1Account`. For ETH, use `assetIndex = 1` and send exactly `amount` as `msg.value`. For an ERC-20, send no ETH with the call.
3. Confirm the deposit's processing and credited amount in Core. A successful L1 receipt only confirms submission.

For an L1-native ERC-20, `L1InteropManager` locks the tokens in `ZkLighter`. Before gateway selection it owns the vault credit, and after selection it assigns that credit to the selected L1 escrow gateway. `L1InteropManager` submits the deposit through `L1CoreMessaging`, so applications do not call `registerDeposit(...)` directly.

This deposit path targets master accounts, not subaccounts. Use a supported internal Core transfer to move funds into a subaccount after depositing.

### Unaccepted deposits

If Core does not accept the full deposit, the unaccepted amount is returned through a Core-originated [**L1 Call**](https://docs.lighter.xyz/evm/interop/message-passing.md#l1-calls). It belongs to `to`, which may differ from the address that paid for the deposit. Follow [Core message execution on L1](https://docs.lighter.xyz/evm/interop/message-passing/l1-and-core.md#fulfilling-core-messages-on-l1) to complete delivery once the call is ready.

For an L1-controlled recipient, the **L1 Call** sends the unaccepted amount to `to` on L1.

For an EVM-controlled recipient, Core does not return funds on EVM, because the asset may have no EVM representation. The **L1 Call** instead runs `L1InteropManager.receiveEvmAccountRefund(...)`, which records an L1 refund claim owned by the EVM address. The funds stay in their L1 escrow until the owner claims them. Core creates the EVM-controlled account even when it accepts nothing.

#### Claiming a refund for an EVM-controlled account

Only the EVM address that owns the claim can claim it, because the EVM address may be a contract that does not control the same address on L1. The owner chooses the L1 recipient.

{% hint style="warning" %}
If a contract-controlled account, such as a vault, expects deposits through the L1 bridge, give the contract a function that sends the claim below through `EvmToL1Messenger` before deposits arrive. Only the contract can claim its refunds, so without this function a refund stays locked on L1.
{% endhint %}

1. Read the claim on L1 with `L1InteropManager.evmAccountRefunds(evmAddress, assetIndex)`. It returns the claimable `baseAmount` in [Core base units](https://docs.lighter.xyz/evm/interop/tokens/token-transfers.md#amounts) and the current `claimNonce`.
2. From the owning EVM address, [initiate an **L1 Call**](https://docs.lighter.xyz/evm/interop/message-passing/l1-and-evm.md#arbitrary-calls) to [`L1InteropManager`](https://l1-explorer.devnet.lighterevm.axiom.xyz/address/0x8709B4047608BE3083dA13f703757A10f5B83A7c?tab=contract) with the calldata below.
3. Once the batch is final, [fulfill the call on L1](https://docs.lighter.xyz/evm/interop/message-passing/l1-and-evm.md#fulfilling-the-call-on-l1).

```solidity
EvmToL1Messenger.initiateWithdrawal(
    l1InteropManager,
    abi.encodeCall(
        IL1InteropManager.claimEvmAccountRefund,
        (assetIndex, claimNonce, recipient)
    )
);
```

```solidity
function claimEvmAccountRefund(
    uint32 assetIndex,
    uint64 claimNonce,
    address recipient
) external;
```

A claim pays the full recorded amount for the asset to `recipient` and increments `claimNonce`. A claim with a stale `claimNonce` reverts, so an older queued claim cannot take refunds recorded after another claim succeeded. If the payout fails, the claim stays available for another attempt. ETH refunds are paid by the `ZkLighter` bridge, which holds the deposited ETH.

If the [escape hatch](https://docs.lighter.xyz/evm/technical-architecture.md#escape-hatch) cancels a pending deposit to an EVM-controlled account, L1 records the same refund claim directly, without a Core **L1 Call**.

## Core to L1

### Initiating a Core withdrawal

A withdrawal to L1 can be initiated in three ways, depending on the account's controller.

* **From Core.** Submit one of the following [signed transactions](https://docs.lighter.xyz/evm/signing-core-transactions.md).
  * **Withdraw (`txType = 13`).** L1-controlled Core accounts can withdraw to their controlling L1 address using only an API-key signature. No controller ECDSA signature is required.
  * **Withdraw to L1 Address (`txType = 132`).** L1-controlled or EVM-controlled Core accounts can specify an L1 recipient. This requires both an API-key signature and the EOA controller's ECDSA signature, even when withdrawing to the controller's own address.
* **From L1.** The controlling L1 address calls [`L1CoreMessaging.withdraw(...)`](https://docs.lighter.xyz/evm/interop/message-passing/l1-and-core.md#supported-requests) to withdraw to itself, or [`L1CoreMessaging.withdrawToL1Address(...)`](https://docs.lighter.xyz/evm/interop/message-passing/l1-and-core.md#supported-requests) to specify a recipient.
* **From EVM.** The controlling EVM address calls [`EvmToCoreEntrypoint.withdrawToL1Address(...)`](https://docs.lighter.xyz/evm/interop/message-passing/evm-and-core.md#evm-initiated-withdrawal-to-l1).

A contract controller cannot supply an ECDSA signature and must use its native-domain call for the explicit-recipient option. The debit account may be the controller's master account or one of its subaccounts, subject to Core authorization.

### Finalizing a Core withdrawal

Once Core accepts the withdrawal and its batch has been [executed on L1](https://docs.lighter.xyz/evm/technical-architecture.md#batch-lifecycle-and-finalization), follow [Fulfilling Core messages on L1](https://docs.lighter.xyz/evm/interop/message-passing/l1-and-core.md#fulfilling-core-messages-on-l1) to retrieve the call data and fulfill the call.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lighter.xyz/evm/interop/tokens/token-transfers/l1-and-core.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
