# Swap & Bridge

## Overview

evently integrates [LiFi](https://li.fi) for cross-chain swaps and bridges, accessible directly from the app at no extra cost beyond protocol fees.

* **Swap page** — swap any token to USDm (or any other token) on MegaETH mainnet
* **Bridge page** — bridge assets from Ethereum or other chains to MegaETH

Both features are available without leaving the evently interface.

***

## Getting USDm

USDm is the base trading token for all evently prediction markets. To get USDm:

1. Go to [evently.market/swap](https://evently.market/swap)
2. Select your input token (ETH, USDC, USDT, etc.)
3. Select USDm as output
4. Confirm — your USDm is ready to trade instantly

***

## Bridging to MegaETH

To move assets from Ethereum or other L2s to MegaETH:

1. Go to [evently.market/bridge](https://evently.market/bridge)
2. Select your source chain and token
3. Select MegaETH as destination
4. Confirm — bridging typically takes seconds

LiFi supports **60+ routes** across major chains and bridges.

***

## Swap Points

Every swap recorded through evently earns **Swap Points**, stored permanently onchain in `EventlyProfiles.sol`.

* **Rate:** 5 points per $0.01 USD volume
* **Cooldown:** 30 seconds between recorded swaps
* Volume is tracked in USD cents

This creates a loyalty incentive for routing swaps through evently rather than external DEX aggregators.

***

## Technical Integration

The swap and bridge widgets are powered by the LiFi SDK (`@lifi/widget`). The frontend component is `LiFiSwap.tsx`.

MegaETH is configured as a supported chain in the LiFi widget:

```ts
// Chain ID 4326 — MegaETH Mainnet
chains: { allow: [4326] }  // Destination
```

***

## Supported Chains (Bridge)

| Chain            | Support    |
| ---------------- | ---------- |
| Ethereum Mainnet | ✅          |
| Arbitrum         | ✅          |
| Base             | ✅          |
| Optimism         | ✅          |
| Polygon          | ✅          |
| BNB Chain        | ✅          |
| + 30 more        | ✅ via LiFi |

***

## USDm Contract

```
USDm (MegaETH Stablecoin)
Address: 0xFAfDdbb3FC7688494971a79cc65DCa3EF82079E7
Chain: MegaETH Mainnet (Chain ID 4326)
```
