# Ethena \[Distribute sUSDe staking yield, with cooldown exits handled by keepers]

:::info
Railnet connects Ethena through the **`EthenaVehicle`** adapter.
:::

Ethena issues USDe, a synthetic dollar, and pays its yield to holders who stake it into sUSDe. Unstaking goes through Ethena's cooldown, so exits are not instant; the Vehicle turns that into a pending withdrawal Railnet's keepers finish.

## At a glance

| | |
|---|---|
| **Protocol** | [Ethena](https://ethena.fi), synthetic dollar staking |
| **Yield** | sUSDe staking rewards, through a rising exchange rate |
| **Vehicle** | `EthenaVehicle` (native adapter, not upgradeable) |
| **Deposits** | Instant |
| **Withdrawals** | `sUSDe.cooldownDuration()` at redeem time, instant when zero |
| **Networks** | Ethereum mainnet |
| **Deposit assets** | USDe |
| **Status** | Available|

## How Railnet integrates it

On deposit the Vehicle stakes USDe into sUSDe and holds it, in one Query, so deposits are instant. When `cooldownDuration()` is above zero, a redeem clones an Account dedicated to that Query, moves its sUSDe there and calls `cooldownShares`; the Query sits in `PROCESSING` until the cooldown elapses, then `unstake` on the clone returns USDe to the receiver. Ethena tracks one cooldown per address, so the per-Query clone keeps concurrent exits from resetting each other. If Ethena sets the duration to zero, the Vehicle redeems synchronously instead. `totalAssets()` is `previewRedeem` over the accounted sUSDe shares, so Ethena's withdrawal fee is already in the share price and donations cannot move it; `maxDeposit` and `maxRedeem` follow sUSDe's limits, capped by account balances.

## Considerations

* A redeem Query stays pending for the whole cooldown. Show an unlock date, not a spinner.
* The cooldown is Ethena's parameter and can change, including to zero. The Vehicle follows it per Query.
* sUSDe returns come from Ethena's strategy, not a lending rate, and can be low. See [Risk management](/strategies/risk-management).
* ENA and other incentives sit outside the share price; your Conduit decides where they go ([Rewards](/conduits/rewards)).

## Spawn parameters

`stakedUSDe` is the only source-specific field, and the deposit asset is its USDe. Put a Conduit on it: see [Quick start](/conduits/quick-start), then [Integrate a Conduit](/developers/integrate-conduit) for the pending state.

```solidity [Solidity]
EthenaVehicleFactory.SpawnParams memory params = EthenaVehicleFactory.SpawnParams({
    stakedUSDe: STAKED_USDE_ADDRESS,
    accessControl: accessControl,
    feeManager: FeeManager(address(0)),            // address(0) for none
    modulesManager: ModulesManager(address(0)),
    querySalt: bytes32(0),
    deploymentSalt: keccak256("platform-ethena-v1"),
    forbiddenAddresses: new address[](0),
    initialExpectedSupply: 0.8e18,                 // 18 decimals, 1 USDe seed
    queryRegistry: queryRegistry
});
```

## Next steps

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

  <Card title="Sync vs async" description="How pending Queries settle." icon="timer" to="/developers/contracts/sync-vs-async" />
</Cards>
