> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lynex (lynex)

> Linea-native ve(3,3) DEX and liquidity marketplace.

Linea-native ve(3,3) DEX and liquidity marketplace. Solidly-fork with gauge voting and support for both stable and volatile pool types on the Linea zkEVM network.

| Fact | Value |
| - | - |
| Category | DEX |
| Family | none |
| Namespace | `Lynex` on linea |
| Chains | linea |

## What it offers

* **swap**: Swap tokens with route-based routing specifying stable or volatile pool type

## Notes

* Solidly-fork routes contain `{from, to, stable}` tuples (NO `factory` field)
* Two pool types: `stable=true` for correlated assets, `stable=false` for uncorrelated
* ve(3,3) model: LYNX token holders vote-lock to direct gauge emissions
* Linea-only deployment
* LP tokens can be staked in gauges for LYNX emissions
* Input token must be ERC20-approved to the Router

## Its names in a program

On Linea, `Lynex` is a namespace: its contracts need no import.

```ts theme={null}
function main() {
  // Linea's router, `0x610D2f07b7EdC67565160F587F37636194C34E74`.
  require(Lynex.Router != 0);
}
```

## Deployments

| Chain | Contract | Address | In a program |
| - | - | - | - |
| [Linea](https://docs.eco.com/sauce-sdk/reference/chains/linea.md) | router | `0x610D2f07b7EdC67565160F587F37636194C34E74` | `Lynex.Router` |

## ABI

### `LynexRouterABI`

`import LynexRouterABI from "./protocols/lynex/LynexRouterABI.json";` Speaks for: router.

* `swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, (address from, address to, bool stable)[] routes, address to, uint256 deadline) returns (uint256[] amounts)`
* `addLiquidity(address tokenA, address tokenB, bool stable, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns (uint256 amountA, uint256 amountB, uint256 liquidity)`

## Next steps

* [Protocols](https://docs.eco.com/sauce-sdk/reference/protocols.md): the other protocols, by what they do.
* [Protocols and tokens](https://docs.eco.com/sauce/names.md): calling a contract by its namespace, or through its ABI.
* [Glossary](https://docs.eco.com/sauce/glossary.md): the words these pages use, in plain terms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.