# Euler \[Distribute Euler Earn yield behind your own token]

:::info
Railnet connects Euler Earn through the generic **`ERC4626Vehicle`** adapter.
:::

[Euler](https://www.euler.finance) is a modular lending protocol. An Euler Earn vault allocates one asset across Euler's lending markets under a curator's mandate and returns an ERC-4626 share.

## At a glance

| | |
|---|---|
| **Protocol** | [Euler](https://www.euler.finance), curated Earn vaults |
| **Yield** | Borrower interest from the markets the vault allocates to |
| **Vehicle** | `ERC4626Vehicle` (generic adapter) |
| **Flows** | Instant both ways, redeems bounded by vault liquidity |
| **Deposit assets** | The vault's `asset()` |
| **Status** | Available on Ethereum and Base |

## How Railnet integrates it

Euler Earn vaults are ERC-4626, so the Vehicle needs no protocol-specific code: it deposits into the vault you name, holds its shares, and prices its own shares off the vault's conversion rate. Both directions are synchronous, so a Query settles in one transaction. `maxDeposit` and `maxRedeem` come from the Earn vault and are then bounded by the account's asset or share balance, so reduced capacity shows up in your interface instead of in a failed transaction.

## Considerations

* The vault's assets sit in lending markets. If those are heavily utilized, `maxRedeem` is bounded until liquidity frees up.
* The curator sets the exposure and can change it, so pick a mandate you can describe to your users.
* Vault fees apply before yours, and rates move with utilization. Quote them live.
* Curation and protocol risk sit with Euler and the curator. See [Risk management](/strategies/risk-management).

## Spawn parameters

`vault` is the only source-specific field; the deposit asset follows from `vault.asset()`. Put a Conduit on it: see [Quick start](/conduits/quick-start), then [Integrate a Conduit](/developers/integrate-conduit).

```solidity [Solidity]
ERC4626VehicleFactory.SpawnParams memory params = ERC4626VehicleFactory.SpawnParams({
    vault: EULER_EARN_USDC,
    accessControl: accessControl,
    feeManager: FeeManager(address(0)),            // address(0) for none
    modulesManager: ModulesManager(address(0)),
    querySalt: bytes32(0),
    deploymentSalt: keccak256("euler-earn-usdc"),
    forbiddenAddresses: new address[](0),
    initialExpectedSupply: 0.8e18,                 // 18 decimals, 1 USDC seed
    queryRegistry: queryRegistry
});

ERC4626Vehicle vehicle = factory.spawn(params);
```

Mainnet factory: [0x708F06B8D98075E6Feeb8E5A4DbFF1bB045D1F6d](https://etherscan.io/address/0x708F06B8D98075E6Feeb8E5A4DbFF1bB045D1F6d). [Other networks](/developers/contracts/deployments).

## Supported vaults

| Vault | Asset | Address | Network |
|---|---|---|---|
| Euler Earn USDC | USDC | `0x3B4802FDb0E5d74aA37d58FD77d63e93d4f9A4AF` | Ethereum |
| Euler Earn WETH | WETH | `0x84fcb0eb9d7ab4EdFd26CCa8AD20AaB4c5aD49CD` | Ethereum |
| Euler Earn USDC | USDC | `0x67f062a12f82c3b42d4CA7a35fb26CbAac28008B` | Base |

Other Euler Earn vaults connect the same way.

## Next steps

<Cards>
  <Card title="Quick start" description="Specify your Conduit." icon="rocket" to="/conduits/quick-start" />

  <Card title="Any ERC-4626 vault" description="The generic adapter." icon="box" to="/yield-sources/erc-4626" />
</Cards>
