> ## 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.

# BaseSwap (baseswap)

> Base-native DEX with UniV2-style constant product pools (x*y=k). Features yield farming, launchpad, and NFT marketplace.

Base-native DEX with UniV2-style constant product pools (x\*y=k). Features yield farming, launchpad, and NFT marketplace. A simple and straightforward fork of Uniswap V2 on Base.

| Fact | Value |
| - | - |
| Category | DEX |
| Family | none |
| Namespace | `Baseswap` on base |
| Chains | base |

## What it offers

* **swap**: Swap exact input tokens through a routing path
* **addLiquidity**: Deposit two tokens to mint LP tokens
* **removeLiquidity**: Burn LP tokens to withdraw underlying tokens

## Notes

* Standard Uniswap V2 fork interface; 0.3% fee per swap
* Base-only deployment
* Both tokens must be ERC20-approved to the Router before swap/addLiquidity

## Its names in a program

On Base, `Baseswap` is a namespace: its contracts need no import.

```ts theme={null}
function main() {
  // Base's v2Router, `0x327Df1E6de05895d2ab08513aaDD9313Fe505d86`.
  require(Baseswap.V2Router != 0);
}
```

## Deployments

| Chain | Contract | Address | In a program |
| - | - | - | - |
| [Base](https://docs.eco.com/sauce-sdk/reference/chains/base.md) | v2Router | `0x327Df1E6de05895d2ab08513aaDD9313Fe505d86` | `Baseswap.V2Router` |

## ABI

### `BaseSwapRouterABI`

`import BaseSwapRouterABI from "./protocols/baseswap/BaseSwapRouterABI.json";` Speaks for: v2Router.

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

## 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.