# Ecosystem

Koi Finance is part of a small product line built by the same team. Each product serves a different chain and use case.

### Mute

Mute was the earlier zkSync DeFi brand. Core protocol work continues under Koi Finance.

### Koi Finance

Koi Finance is our zkSync DeFi platform — swap, liquidity pools, farming, bonds, and veDAO governance. This documentation site covers Koi’s protocol, contracts, and integrations.

* Site: <https://koi.finance>

### Senddy

Senddy is our private payments product for USDC on Base. Same team, different chain and use case. Users can shield balances, send privately with ZK, and withdraw or spend when needed. Gasless UX and SDKs support consumers, institutions, and AI agents.

* [Senddy](https://www.senddy.com)
* [Senddy docs](https://www.senddy.com/docs)
* [Senddy blog](https://www.senddy.com/blog)

### Who Founded Koi and Senddy?

Koi was founded by Matt Tawil, who served as CTO focused on smart contract design, onchain UX, and security. More at [matt100x.dev](https://www.matt100x.dev).


# Overview

<figure><img src="/files/jYwxVbzCFmk01hHOzV8r" alt=""><figcaption></figcaption></figure>

## About

Koi is a DeFi platform, serving as a liquidity hub for all projects on [zkSync](https://zksync.io). Koi's dynamic dApp features both a concentrated and standard pool AMM DEX, complete with limit orders, a farming platform, and a bond platform.  Experience the evolution of DeFi 2.0 with low fees and gas-less swaps.

## The Team

The team behind Koi has a deep history with Zero-Knowledge protocols in crypto. Before Koi, the team created the first Zero-Knowledge Atomic Swap protocol between BTC and UTXO based chains, along with innovative work on Zerocoin and Sigma addressing schemes and transactions. Now, they bring that expertise to Koi and their new initiative: the Koi DAO. With a team that has a proven track record of innovation and expertise, Koi is ready to become a leading player in the zkDeFi space by building on zkSync and driving long-term value to its community.

## Resources

[Twitter](https://twitter.com/koi_finance)\
[Discord<br>](https://discord.koi.finance)[Telegram](https://t.me/mute_io)


# Introduction

Koi is one of the largest zkRollup DeFi Platforms built on [zkSync](https://zksync.io) Era. Invest & trade, earn yields, and participate in Bonds all on one decentralized, community driven platform. Leverage the security of Ethereum without high gas fees.<br>

Features include:

* AMM based DEX w/ Limit orders
  * Stable and Normal AMM curve pools
  * Variable LP fees: Stable (0.01%-2%), Normal (0.01%-10%)
  * Fixed and Dynamic Protocol fees
  * 0% LP minting fee
* 1-3s settlements
* 95%+ gas cost savings compared to L1 ETH
* [Yield Generation Platform ](/mute-switch/amplifier)
* [Bond Offerings](/mute-switch/bonds)
* [DAO](broken://pages/-MUByzMMEZcgPHIh9jWS)<br>


# Liquidity Pools

Pool Design

Koi is designed to have a dynamic setup for Liquidity Pools so that both ***Stable*** and ***Normal*** AMM curves can be utilized. Additional to these pools, Koi Finance also has Concentrated Liquidity pools as well.\
\
Stable Pool - Assets that trade within a close price range (e.g USDC/DAI)

Normal Pool - Assets that trade with no correlation (eg. ETH / WBTC)

Concentrated Pool - Custom price range based on user input

There can be a Normal, Stable, and Concentrated pool for the same assets. Koi will find the best priced trade regardless of pool type.&#x20;

\
Fees for each pool are independent of other pools. Each type of pool has a min-max fee that can be set by LPs:\
\
\- Stable: 0.01%-2%\
\- Normal: 0.01%-10%\
\- Concentrated: 0.01%, 0.10%, 0.3%, 0.5%, 1%

## LP Fees Notice for v2 pools

{% hint style="info" %}
If you are building external contracts to hold LP tokens, make sure they call the [claimFees() ](https://github.com/muteio/switch-core/blob/main/contracts/dynamic/MuteSwitchPairDynamic.sol#L490)function on the LP pair prior to moving or receiving tokens. LP fees accumulate on the account that holds them and are non transferrable directly.&#x20;
{% endhint %}

```solidity
// example for a contract that holds LP tokens
// before withdrawing LP from a contract, claim fees and distribute
// fees will be lost forever if not claimed eventually
IKoiSwitchPairDynamic pair = IKoiSwitchPairDynamic(lp);
(uint claimed0, uint claimed1) = pair.claimFees();
IERC20(pair.token0()).safeTransfer(feeReceiver, claimed0);
IERC20(pair.token1()).safeTransfer(feeReceiver, claimed1);
IERC20(address(pair)).safeTransfer(feeReceiver, pair.balanceOf(address(this)));
```

## Stable Pools

Stable pools are designed for assets that should be traded within a tight price range. This allows high volume trades to have capital efficient swaps. Once pricing is set upon pool creation, the trade price maintains tight a spread - make sure to set the proper pricing for these pools.

$$
(x^3 \* y) + (y^3 \* x) ≥ k
$$

## Normal Pools&#x20;

Normal pools are designed for non correlated and volatile priced assets. These pools use a generic AMM formula and are used for most trading pairs.

$$
x \* y ≥ k
$$

## Dynamic Pools

Koi allows for pools to be created with LP fees ranging from 0.01% all the way up to 10% for normal pools, and 2% for stable pools. Once set upon pair creation, these fees can only be changed with the [LP governance system](broken://pages/vrxkFLlf7sIxkIysc9UQ). An LP provider (or delegated provider) with 50%+ vote weight can always change this fee. To prevent from gaming the system, there is a 0.1% fee on total votes when changing the fee of pools. This prevents flash loans from changing fee structures without some sort of losses. \
\
The simplicity of the dynamic fee pool w/ governance allows for a powerful system and tool for many projects in DeFi & crypto. \
\
**Game Theory**  \
By observing traditional CEX markets and even most NFT marketplaces, it has been normalized for fees of 1%+ to be in place via marketmakers (spread), and content creators & teams (nfts). This fee system should empower not only individual LP providers, but also projects that focus on Protocol Owned Liquidity (POL) to set their base fee for their pairs to be able to build up a larger revenue stream for the project, versus what they can find on most traditional AMM based DEXs.&#x20;

## Governance

Koi comes prefabbed with a built in LP governance & delegation system. This allows for complex protocols to be built on-top of the Koi protocol, but also allows for dynamic fees within any LP pool.\
\
Each LP pool has a LP fee set upon pair creation. These fees can range from 0.1%-10%, depending on what the LP provider wants to set as the creator of the pool. Only one fee can be set at a time, meaning all LPs will be participating within that fee range. \
\
The LP governance system allows for the fee of the pool to be changed based on an account that controls more than 50% of the pool votes. Votes are directly correlated to the LP token supply balances. However, a LP provider may choose to delegate their 'votes' to another provider, allowing  parties to lobby for delegates, thus increasing their pool weight. \
\
Mute has opted for this design, instead of a multi fee pool type for numerous reasons; the major one being that the pool with the deepest liquidity will always be traded on in comparison to its counterparts (pools with lower fees & lower liquidity). Thus, it is better to concentrate liquidity within one pool, and allow a governance system that allows for dynamic fees.&#x20;

## Protocol Fees

The protocol has 2 type of fees:

* Dynamic (% of the LP pool fees)
* Fixed (fixed % of the overall trade)

If the protocol fixed fee is set and is larger than what the LP pool fees are, then LP providers earn no fees for trades. Protocol Fixed fees will only be used early upon launch until LP TVL grows to a sustainable amount. <br>

<br>


# Concentrated Liquidity Pools (v3)

### Introduction[​](https://docs.uniswap.org/concepts/protocol/concentrated-liquidity#introduction) <a href="#introduction" id="introduction"></a>

Based on Uniswap V3's implementation, Koi Finance's concentrated liquidity is liquidity that is allocated within a custom price range. In earlier versions, liquidity was distributed uniformly along the price curve between 0 and infinity.

The previously uniform distribution allowed trading across the entire price interval (0, ∞) without any loss of liquidity. However, in many pools, the majority of the liquidity was never used.

Consider stablecoin pairs, where the relative price of the two assets stays relatively constant. The liquidity outside the typical price range of a stablecoin pair is rarely touched. For example, the v2 DAI/USDC pair utilizes \~0.50% of the total available capital for trading between $0.99 and $1.01, the price range in which LPs would expect to see the most volume - and consequently earn the most fees.

With Concentrated Liquidity, liquidity providers may concentrate their capital to smaller price intervals than (0, ∞). In a stablecoin/stablecoin pair, for example, an LP may choose to allocate capital solely to the 0.99 - 1.01 range. As a result, traders are offered deeper liquidity around the mid-price, and LPs earn more trading fees with their capital. We call liquidity concentrated to a finite interval a position. LPs may have many different positions per pool, creating individualized price curves that reflect the preferences of each LP.

### Active Liquidity[​](https://docs.uniswap.org/concepts/protocol/concentrated-liquidity#active-liquidity) <a href="#active-liquidity" id="active-liquidity"></a>

As the price of an asset rises or falls, it may exit the price bounds that LPs have set in a position. When the price exits a position's interval, the position's liquidity is no longer active and no longer earns fees.

As price moves in one direction, LPs gain more of the one asset as swappers demand the other, until their entire liquidity consists of only one asset. (In v2, we don't typically see this behavior because LPs rarely reach the upper or lower bound of the price of two assets, i.e., 0 and ∞). If the price ever reenters the interval, the liquidity becomes active again, and in-range LPs begin earning fees once more.

Importantly, LPs are free to create as many positions as they see fit, each with its own price interval. Concentrated liquidity serves as a mechanism to let the market decide what a sensible distribution of liquidity is, as rational LPs are incentivize to concentrate their liquidity while ensuring that their liquidity remains active.

### Ticks[​](https://docs.uniswap.org/concepts/protocol/concentrated-liquidity#ticks) <a href="#ticks" id="ticks"></a>

To achieve concentrated liquidity, the once continuous spectrum of price space has been partitioned with ticks.

Ticks are the boundaries between discrete areas in price space. Ticks are spaced such that an increase or decrease of 1 tick represents a 0.01% increase or decrease in price at any point in price space.

Ticks function as boundaries for liquidity positions. When a position is created, the provider must choose the lower and upper tick that will represent their position's borders.

As the spot price changes during swapping, the pool contract will continuously exchange the outbound asset for the inbound, progressively using all the liquidity available within the current tick interval[1](https://docs.uniswap.org/concepts/protocol/concentrated-liquidity#fn-1) until the next tick is reached. At this point, the contract switches to a new tick and activates any dormant liquidity within a position that has a boundary at the newly active tick.

While each pool has the same number of underlying ticks, in practice only a portion of them are able to serve as active ticks. Due to the nature of the concentrated liquidity smart contracts, tick spacing is directly correlated to the swap fee. Lower fee tiers allow closer potentially active ticks, and higher fees allow a relatively wider spacing of potential active ticks.

While inactive ticks have no impact on transaction cost during swaps, crossing an active tick does increase the cost of the transaction in which it is crossed, as the tick crossing will activate the liquidity within any new positions using the given tick as a border.

In areas where capital efficiency is paramount, such as stable coin pairs, narrower tick spacing increases the granularity of liquidity provisioning and will likely lower price impact when swapping - the result being significantly improved prices for stable coin swaps.

For more information on fee levels and their correlation to tick spacing, see the Uniswap v3 [whitepaper](https://uniswap.org/whitepaper-v3.pdf).


# Koi Farming Pools

Info & Project Registration

Koi farming pools is a liquidity reward protocol that allows LPs to **gain additional revenue APY** & take part in the Koi ecosystem. Amplifier rewards are fueled by platform revenue and fees, which come directly from the buy back and make system the Koite DAO has in place. \
\
Do note, there are **not** amplifier pairs for every liquidity pair on the Switch. Rather, amplified pairs are decided up by the team and Koi DAO. There will be amplified pairs for important base liquidity pairs such as ETH/USDC, WBTC/USDC etc. These will be linked and updated on this page as those become available. <br>

The Koi Farming pool protocol has introduced a novel system that sets it apart from traditional dynamic farming models by implementing a static APY model. This innovative approach enables the protocol, as well as its partners & users, to generate calculated revenue based on the rewards distributed to farmers.\
\
The base APY in an amplifier is static. Additionally, if the pool has an extra amplifier APY set, the max apy is determined by a ratio of the users Ve vote share value to the lp  value being deposited. The Ve vote share $ value is 1:1 with the current koi price (i.e. 500 vote shares = 500 koi):<br>

$$
f(APY\_{amp}) = APY\_{base} + (clamp(user\_{veshares}/user\_{lpvalue}, 1) \* (APY\_{max} - (APY\_{max})) )
$$

{% hint style="info" %}
Remember, you can own Ve vote shares by either owning veKOI NFTs directly and having ownership over its delegation, or by having other veKOI owners delegate their vote share to you. The amplifier does not care whether you own veKOI or not, only if you own 'votes'. This allows for third party LP's to bribe veKOI owners for their votes.
{% endhint %}

### Example

> Providing $1k worth of LP on an ETH/USDC pair with an amplifier that has a **10% base APY** and up to **15% APY** if the user is fully amplified with veKO&#x49;**.** The user is delegated 500 Ve vote shares and the current koi price is $1

\
**Amplified APY** = 10% + ($500/$1000 \* 5%) = **12.5%**

Rewards are allocated immediately upon deposit and disbursed gradually over the month based on user redemptions. If the user chooses to withdraw their funds prematurely, they forfeit the remaining unmatured rewards.\
\
To own the max Amplified APY, you must have a vote share value of equal or greater to the value of lp being deposited.\
\
Your veKOI votes/holdings **carry over to all amplifiers**. If you are providing your LP to two amplifiers, your veKOI vote share balance is not split among them. Taking the previous example, if you provided LP on two pairs using those same exact numbers as above, your APY on both would be 12.5%. This is to encourage participation in all pools.&#x20;

## Apply for the Koi Farming Program[​](https://docs.sushi.com/docs/Products/Yield%20Farming/What%20Is%20The%20Onsen#apply-for-the-onsen-program)

To apply for the Amplifier program, please submit your project info to this link:[ Koi Farming Pool Registration](https://docs.google.com/forms/d/e/1FAIpQLSc8wcI9-Qd2U8rHAeRahKluOQfu7-pFCoZMXGXeyex28hIozQ/viewform)


# Koi Bonds

Info

Bonding is the process of trading KOI-ETH LP share to the Koi DAO for KOI. The protocol quotes an amount of KOI and a vesting period for the trade. It is important to know: **when you purchase a bond, you are selling your LP share/tokens.** The Koi DAO compensates you with more Koi than you’d get on the market, but your exposure becomes entirely to Koi and no longer to KOI-ETH LP.

The purpose of Koi bonds is to increase the amount of Protocol Owned Liquidity via the Koi DAO which increases the revenue towards the treasury and long term liquidity for the protocol. The benefit to bonding allows a user to purchase Koi at a lower cost basis. \
\
**Bonds are sold at a first come first serve basis.** A bond ROI starts at 0% and increases slowly until it is purchased. Once purchased, the cycle is reset with a new bond and Koi is paid out over 7 days via a veKOI lock.\
\
Learn more about veKoi mechanics [here](broken://pages/-MUByzMMEZcgPHIh9jWS).&#x20;

### Example

> Exchanging **$15k worth of**  KO&#x49;**/ETH LP** with a bond that currently has a **15% ROI.** Bonding would sell the $15k KOI/ETH LP tokens to the Koi DAO and in exchange receive Koi tokens with an underlying Koi value of $15k \* 1.15 = $17.25k worth **at the time the bond was purchased**. The Koi is locked for 7 days.&#x20;


# Limit Orders

Limit orders on the Switch utilize the native AMM as a liquidity and inventory provider. Due to this, limit orders can cause substantial or minimal slippage on limit orders based on the volume of the order and depth of the liquidity on the pair being traded. \
\
Regardless if a limit order causes a 10% slippage on the AMM pair being traded, the limit order owner **still receives the amount the order was placed for**. \
\
For limit orders to work, there is a free market of **market making bot(s)** that scan and execute trades based on their strategy and fees. \
\
A visualization: \
\
A limit order is made to purchase **token X** with 1 **ETH**. That order is created and approved so that once the AMM can support that purchase with no loss to the market making bot(s), the order is filled. With the nature of smart contracts, there are no 'automatic' executions of manually placed events such as a limit order. So as such, a free market of bot(s) continually scan limit orders to see if there are any that can be filled with any additional fees the bots want to charge. This is a free market, so any completion to these trades will mean fees should be low. Bot fees **do not** affect what the limit order receives, only the price of which the trade is executed at on the AMM level. \
\
If your order cannot execute without creating a 10% slippage because liquidity on the native pair is low in comparison to the trade, the trade will be executed once **token X** is trading at a **minimum** of -10% of your purchase price. This is because the limit order being executed will increase the the AMM pair price by 10% and to be able to fill the limit order with the amounts being asked for, this is the minimum deviation that needs to occur for that order to fill successfully. Although the AMM pair is affected with slippage here, the limit order is filled at the price it requested.\
\
There is also the opportunity for **inventory based market making** without needing to use the Switch native AMM module as a liquidity provider. \
\
\
*Design specs, examples, and market making bot(s) coming soon.*&#x20;


# Swap Widget

Integrate the Koi Swap Widget into any site

## Integration

You can easily integrate the Koi Swap Widget into your web apps with the iframe.

```jsx
<iframe
  src={`https://app.koi.finance/widget`}
/>
```


# VWAP Oracles

Integrate the Mute Switch LP Oracles into your dApp

All LP pair contracts  update and record their VWAP based on the cumulative trade volume over the last 30 minutes. You can use this information to access onchain oracle price fees by calling the specific pair with the function calls below.&#x20;

## Integration

The functions are available using the [pair abi](/mute-switch-api/abis), and specifying the proper LP pair you are trying to fetch prices from, e.g. [MUTE/ETH](https://explorer.zksync.io/address/0xb85feb6af3412d690dfda280b73eaed73a2315bc).

```solidity
// returns the current VWAP over the last 30 minute window
function current(address tokenIn, uint amountIn) external view returns (uint amountOut)

// returns the VWAP over the granularity amount, 30 min increments
// e.g. granularity = 2 returns VWAP of the last 60 min window (2 sample points)
function quote(address tokenIn, uint amountIn, uint granularity) external view returns (uint amountOut)
```


# Koi Paymaster Service

Integrate the Mute Paymaster into your dApp

By utilizing [zkSync Era account abstraction paymasters](https://era.zksync.io/docs/reference/concepts/account-abstraction.html#paymasters), Mute allows for gas to be paid with other tokens instead of ETH.&#x20;

{% hint style="info" %}
Instead of paying a transaction fee of $0.40 with ETH, the user can opt in to use any of the supported tokens below. The conversion price is based on the token/ETH LP pool on the Mute Switch.
{% endhint %}

This is a free to use service.

## Integration

You can easily integrate the Mute Paymaster into your dApp - [Official documentation](https://era.zksync.io/docs/api/js/features.html)\
\
[Official Paymaster Address](https://era.zksync.network/address/0x4ae2Ba9A5C653038C6d2F5D9F80B28011A454597)

```jsx
const PAYMASTER_ADDRESS = '0x4ae2Ba9A5C653038C6d2F5D9F80B28011A454597'
...
// approve the token for spending via the paymaster
... 
const greeting = "a new greeting";
const tx = await greeter.populateTransaction.setGreeting(greeting);
const gasPrice = await sender.provider.getGasPrice();
const gasLimit = await greeter.estimateGas.setGreeting(greeting);

const paymasterParams = utils.getPaymasterParams(testnetPaymaster, {
  type: "ApprovalBased",
  TOKEN_ADDRESS,
  minimalAllowance: ethers.BigNumber.from(1),,
  innerInput: new Uint8Array(),
});

const sentTx = await sender.sendTransaction({
  ...tx,
  maxFeePerGas: gasPrice,
  maxPriorityFeePerGas: BigNumber.from(0),
  gasLimit,
  customData: {
    gasPerPubdata: utils.DEFAULT_GAS_PER_PUBDATA_LIMIT,
    paymasterParams,
  },
});
```

## Supported Tokens

* [USDC](https://explorer.zksync.io/address/0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4)
* [WBTC](https://explorer.zksync.io/address/0xBBeB516fb02a01611cBBE0453Fe3c580D7281011)
* [MUTE](https://explorer.zksync.io/address/0x0e97C7a0F8B2C9885C8ac9fC6136e829CbC21d42)


# veRewards

Locking your KOI gives you access to rewards

By locking KOI for veKOI, you receive granted ownership over Koi Finance's DAO. Additionally to this, you earn rewards based on airdrops, and smaller marketcap tokens traded on Koi Finance. Your earnings are proportional to the vote share percentage you have to the rewards distributed. \
\
KOI rewards are dynamic and not guaranteed.

{% hint style="info" %}
Owning veKOI currently nets a 20%+ APY based on a 2 year lock (July 2024)
{% endhint %}

<figure><img src="/files/mQf15mtqyvqGNo1EgWsi" alt=""><figcaption></figcaption></figure>


# veKOI

DAO and Governance

The native Koi token, KOI, functions as a utility towards unlocking accessibility into the Koi DAO, which is a locked based vote system based on a ve NFT model, **veKOI** (Vote Escrow Locked Koi). This veNFT can be transferred, sold, and eventually burned for the underlying koi it owns once its lock period is expired. \
\
This lock based system requires **KOI** holders to lock their **KOI** for a period of time (**7- 728 days**), and in return receive a new NFT, **veKOI**. This **veKOI** NFT is custom NFT for every user who locks their Koi  in return of a veNFT. The NFT holds 3 important metadata variables:\
\
\- Underlying Koi Amount locked (for future redemptions)\
\- Total vote share weight\
\- Expiry date\
\
After the lock period is expired, you are able to redeem and burn your **veKOI** NFT back to your original **KOI** balance, continue to hold your **veKOI**, or redeem & re-up a different time lock.\
\
**Specifications** \
\
Minimum lock time:  7 days\
Maximum lock time: 728 days \
Increment of lock period: 7 days\
\
The exchange rate of **KOI** to **veKOI vote shares** is a linear function of the time lock and amount of KOI being locked:

$$
f(voteshare) =  KOI \* (timelock / (maxlocktime / 2))
$$

An example: Locking 12500 Koi for 54 days would result in owning a **veKOI** NFT with the following specifications:\
\
\- Underlying Koi Amount: **12500**\
\- Total vote share weight: (12500 \* (56/(728/2)) \~= **1923**\
\- Expiry date: 54 days from the lock time<br>

{% hint style="info" %}
Remember, owning a **veKOI** NFT grants you the ability to delegate your **veKOI** voteshare to other addresses. By default, it is delegated to you - but in the chance you delegate it to another address, you are giving up all utility that the DAO offers. Each individual **veKOI** NFT can be delegated to a different address.&#x20;
{% endhint %}

**veKOI** vote utility:

* Dictates a users Amplifier Boost of a Amplifier Pool
* Modifications to the AMM protocol fee (0.1% currently, can be fixed or dynamic depending on pair)
* Creation of additional [Amplifier pools](/mute-switch/amplifier) and reward distributions&#x20;
* Creation of additional [Bond Offerings](/mute-switch/bonds) and distributions
* Ownership over the protocol treasury
* All Koi DAO utility

**veKOI** available custom functionality:

* Split **veKOI** into smaller **veKOI** NFTs
* Merge two **veKOI** NFTs into one
* Increase **veKOI** lock period to a greater one


# Governor

Governor & Timelock specs

The Koi DAO uses a dual contract setup (Governor & Governor Timelock) that allows proposals to be created with an additional layer of security. \
\
The Governor contract is responsible for the arbitrary logic that the governance mechanism works off of, and the Timelock contract is the core module that holds funds and owns other contracts. The Timelock contract also allows users to exit the system if they disagree with a decision before it is executed. This safety delay is 2 days after a proposal gets passed. \
\
The Koi DAO UI can be accessed through Tally:\
\
<https://www.tally.xyz/gov/mute>\
\
**Specifications** \
\
Minimum proposal threshold:  50,000 veKOI vote shares\
Minimum Quorum: 10% of the total vote share supply with 50%+ in favor\
Vote delay: 1 day\
Vote period: 3 days\
Execution delay: 2 days<br>

{% hint style="info" %}
After a proposal gets passed, there is a 2 day delay before execution is possible. This is set in place to ensure that the governance system has a reasonable amount of time to change the decision on the proposal.&#x20;
{% endhint %}


# Contracts

Mainnet contracts

## zkSync Era Mainnet

<table><thead><tr><th width="201">Type</th><th>Contract</th></tr></thead><tbody><tr><td>Factory (v3)</td><td><a href="https://explorer.zksync.io/address/0x488A92576DA475f7429BC9dec9247045156144D3">0x488A92576DA475f7429BC9dec9247045156144D3</a></td></tr><tr><td>Permit2</td><td><a href="https://explorer.zksync.io/address/0x0000000000225e31D15943971F47aD3022F714Fa">0x0000000000225e31D15943971F47aD3022F714Fa</a></td></tr><tr><td>NFT Position </td><td><a href="https://explorer.zksync.io/address/0xa459EbF3E6A6d5875345f725bA3F107340b67732">0xa459EbF3E6A6d5875345f725bA3F107340b67732</a></td></tr><tr><td>Universal Router</td><td><a href="https://explorer.zksync.io/address/0x3388530FbaF0C916fA7C0390413DFB178Cb33CBb">0x3388530FbaF0C916fA7C0390413DFB178Cb33CBb</a></td></tr><tr><td>Init Hash (v3)</td><td>0x0100128b709068f187cf0a565f39cd8d90baf51a12a5717aebcdf69a503234b9</td></tr><tr><td>Router (v2)</td><td><a href="https://explorer.zksync.io/address/0x8B791913eB07C32779a16750e3868aA8495F5964#contract">0x8B791913eB07C32779a16750e3868aA8495F5964</a></td></tr><tr><td>Factory (v2)</td><td><a href="https://explorer.zksync.io/address/0x40be1cba6c5b47cdf9da7f963b6f761f4c60627d#contract">0x40be1cBa6C5B47cDF9da7f963B6F761F4C60627D</a></td></tr><tr><td>veKOI</td><td><a href="https://era.zksync.network/token/0x98dB4e3Df6502369dAD7AC99f3aEE5D064721C4C">0x98dB4e3Df6502369dAD7AC99f3aEE5D064721C4C</a></td></tr><tr><td>Farm Factory</td><td><a href="https://era.zksync.network/address/0x4772D618AD88b602a2ea76F2155D0356E6756b3e">0x4772D618AD88b602a2ea76F2155D0356E6756b3e</a></td></tr><tr><td>Koi Paymaster</td><td><a href="https://era.zksync.network/address/0x4ae2Ba9A5C653038C6d2F5D9F80B28011A454597">0x4ae2Ba9A5C653038C6d2F5D9F80B28011A454597</a></td></tr><tr><td>WETH</td><td><a href="https://era.zksync.network/address/0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91">0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91</a></td></tr><tr><td>Unsupported</td><td><a href="https://era.zksync.network/address/0xa7cd0afe5ee7af96835822e3bdc62ba67a6a36f6">0xa7cd0afe5ee7af96835822e3bdc62ba67a6a36f6</a></td></tr><tr><td>Governor</td><td><a href="https://explorer.zksync.io/address/0x1dD55B7DEd83Be6A308E64b0711493fE6E38E2D2#contract">0x1dD55B7DEd83Be6A308E64b0711493fE6E38E2D2</a></td></tr><tr><td>Timelock</td><td><a href="https://explorer.zksync.io/address/0x96c2Cf9edbEA24ce659EfBC9a6e3942b7895b5e8#contract">0x96c2Cf9edbEA24ce659EfBC9a6e3942b7895b5e8</a></td></tr></tbody></table>


# ABIs

## AMM

Router

```json
[  {    "inputs": [      {        "internalType": "address",        "name": "_factory",        "type": "address"      },      {        "internalType": "address",        "name": "_weth",        "type": "address"      }    ],    "stateMutability": "nonpayable",    "type": "constructor"  },  {    "stateMutability": "payable",    "type": "fallback"  },  {    "inputs": [],    "name": "WETH",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenA",        "type": "address"      },      {        "internalType": "address",        "name": "tokenB",        "type": "address"      },      {        "internalType": "uint256",        "name": "amountADesired",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountBDesired",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountAMin",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountBMin",        "type": "uint256"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "feeType",        "type": "uint256"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "addLiquidity",    "outputs": [      {        "internalType": "uint256",        "name": "amountA",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountB",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "liquidity",        "type": "uint256"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "token",        "type": "address"      },      {        "internalType": "uint256",        "name": "amountTokenDesired",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountTokenMin",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountETHMin",        "type": "uint256"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "feeType",        "type": "uint256"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "addLiquidityETH",    "outputs": [      {        "internalType": "uint256",        "name": "amountToken",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountETH",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "liquidity",        "type": "uint256"      }    ],    "stateMutability": "payable",    "type": "function"  },  {    "inputs": [],    "name": "factory",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "address",        "name": "tokenIn",        "type": "address"      },      {        "internalType": "address",        "name": "tokenOut",        "type": "address"      }    ],    "name": "getAmountOut",    "outputs": [      {        "internalType": "uint256",        "name": "amountOut",        "type": "uint256"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      },      {        "internalType": "uint256",        "name": "fee",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      },      {        "internalType": "bool[]",        "name": "stable",        "type": "bool[]"      }    ],    "name": "getAmountsOut",    "outputs": [      {        "internalType": "uint256[]",        "name": "amounts",        "type": "uint256[]"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      }    ],    "name": "getAmountsOutExpanded",    "outputs": [      {        "internalType": "uint256[]",        "name": "amounts",        "type": "uint256[]"      },      {        "internalType": "bool[]",        "name": "stable",        "type": "bool[]"      },      {        "internalType": "uint256[]",        "name": "fees",        "type": "uint256[]"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "getPairInfo",    "outputs": [      {        "internalType": "address",        "name": "tokenA",        "type": "address"      },      {        "internalType": "address",        "name": "tokenB",        "type": "address"      },      {        "internalType": "address",        "name": "pair",        "type": "address"      },      {        "internalType": "uint256",        "name": "reserveA",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "reserveB",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "fee",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenA",        "type": "address"      },      {        "internalType": "address",        "name": "tokenB",        "type": "address"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "getReserves",    "outputs": [      {        "internalType": "uint256",        "name": "reserveA",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "reserveB",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenA",        "type": "address"      },      {        "internalType": "address",        "name": "tokenB",        "type": "address"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "pairFor",    "outputs": [      {        "internalType": "address",        "name": "pair",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountA",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "reserveA",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "reserveB",        "type": "uint256"      }    ],    "name": "quote",    "outputs": [      {        "internalType": "uint256",        "name": "amountB",        "type": "uint256"      }    ],    "stateMutability": "pure",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenA",        "type": "address"      },      {        "internalType": "address",        "name": "tokenB",        "type": "address"      },      {        "internalType": "uint256",        "name": "liquidity",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountAMin",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountBMin",        "type": "uint256"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "removeLiquidity",    "outputs": [      {        "internalType": "uint256",        "name": "amountA",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountB",        "type": "uint256"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "token",        "type": "address"      },      {        "internalType": "uint256",        "name": "liquidity",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountTokenMin",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountETHMin",        "type": "uint256"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "removeLiquidityETH",    "outputs": [      {        "internalType": "uint256",        "name": "amountToken",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountETH",        "type": "uint256"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "token",        "type": "address"      },      {        "internalType": "uint256",        "name": "liquidity",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountTokenMin",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountETHMin",        "type": "uint256"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "removeLiquidityETHSupportingFeeOnTransferTokens",    "outputs": [      {        "internalType": "uint256",        "name": "amountETH",        "type": "uint256"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenA",        "type": "address"      },      {        "internalType": "address",        "name": "tokenB",        "type": "address"      }    ],    "name": "sortTokens",    "outputs": [      {        "internalType": "address",        "name": "token0",        "type": "address"      },      {        "internalType": "address",        "name": "token1",        "type": "address"      }    ],    "stateMutability": "pure",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountOutMin",        "type": "uint256"      },      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool[]",        "name": "stable",        "type": "bool[]"      }    ],    "name": "swapExactETHForTokens",    "outputs": [      {        "internalType": "uint256[]",        "name": "amounts",        "type": "uint256[]"      }    ],    "stateMutability": "payable",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountOutMin",        "type": "uint256"      },      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool[]",        "name": "stable",        "type": "bool[]"      }    ],    "name": "swapExactETHForTokensSupportingFeeOnTransferTokens",    "outputs": [],    "stateMutability": "payable",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountOutMin",        "type": "uint256"      },      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool[]",        "name": "stable",        "type": "bool[]"      }    ],    "name": "swapExactTokensForETH",    "outputs": [      {        "internalType": "uint256[]",        "name": "amounts",        "type": "uint256[]"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountOutMin",        "type": "uint256"      },      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool[]",        "name": "stable",        "type": "bool[]"      }    ],    "name": "swapExactTokensForETHSupportingFeeOnTransferTokens",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountOutMin",        "type": "uint256"      },      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool[]",        "name": "stable",        "type": "bool[]"      }    ],    "name": "swapExactTokensForTokens",    "outputs": [      {        "internalType": "uint256[]",        "name": "amounts",        "type": "uint256[]"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amountOutMin",        "type": "uint256"      },      {        "internalType": "address[]",        "name": "path",        "type": "address[]"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bool[]",        "name": "stable",        "type": "bool[]"      }    ],    "name": "swapExactTokensForTokensSupportingFeeOnTransferTokens",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  }]
```

Factory

```json
[  {    "inputs": [],    "stateMutability": "nonpayable",    "type": "constructor"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "token0",        "type": "address"      },      {        "indexed": true,        "internalType": "address",        "name": "token1",        "type": "address"      },      {        "indexed": false,        "internalType": "bool",        "name": "stable",        "type": "bool"      },      {        "indexed": false,        "internalType": "address",        "name": "pair",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "fee",        "type": "uint256"      }    ],    "name": "PairCreated",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": false,        "internalType": "uint256",        "name": "_protocolFeeDynamic",        "type": "uint256"      }    ],    "name": "ProtocolFeeDynamicChange",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": false,        "internalType": "uint256",        "name": "_protocolFeeFixed",        "type": "uint256"      }    ],    "name": "ProtocolFeeFixedChange",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": false,        "internalType": "address",        "name": "_feeTo",        "type": "address"      }    ],    "name": "ProtocolFeeToChange",    "type": "event"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "name": "allPairs",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "allPairsLength",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenA",        "type": "address"      },      {        "internalType": "address",        "name": "tokenB",        "type": "address"      },      {        "internalType": "uint256",        "name": "feeType",        "type": "uint256"      },      {        "internalType": "bool",        "name": "stable",        "type": "bool"      }    ],    "name": "createPair",    "outputs": [      {        "internalType": "address",        "name": "pair",        "type": "address"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [],    "name": "feeTo",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      },      {        "internalType": "address",        "name": "",        "type": "address"      },      {        "internalType": "bool",        "name": "",        "type": "bool"      }    ],    "name": "getPair",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "protocolFeeDynamic",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "protocolFeeFixed",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "_feeTo",        "type": "address"      }    ],    "name": "setFeeTo",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "_protocolFeeDynamic",        "type": "uint256"      }    ],    "name": "setProtocolFeeDynamic",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "_protocolFeeFixed",        "type": "uint256"      }    ],    "name": "setProtocolFeeFixed",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  }]
```

Pair

```json
[  {    "inputs": [],    "stateMutability": "nonpayable",    "type": "constructor"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "owner",        "type": "address"      },      {        "indexed": true,        "internalType": "address",        "name": "spender",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "value",        "type": "uint256"      }    ],    "name": "Approval",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "sender",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount0",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount1",        "type": "uint256"      },      {        "indexed": true,        "internalType": "address",        "name": "to",        "type": "address"      }    ],    "name": "Burn",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": false,        "internalType": "uint256",        "name": "pairFee",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "liqFee",        "type": "uint256"      }    ],    "name": "ChangeFee",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "sender",        "type": "address"      },      {        "indexed": true,        "internalType": "address",        "name": "recipient",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount0",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount1",        "type": "uint256"      }    ],    "name": "Claim",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "delegator",        "type": "address"      },      {        "indexed": true,        "internalType": "address",        "name": "fromDelegate",        "type": "address"      },      {        "indexed": true,        "internalType": "address",        "name": "toDelegate",        "type": "address"      }    ],    "name": "DelegateChanged",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "delegate",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "previousBalance",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "newBalance",        "type": "uint256"      }    ],    "name": "DelegateVotesChanged",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "sender",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount0",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount1",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "pAmount0",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "pAmount1",        "type": "uint256"      }    ],    "name": "Fees",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "sender",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount0",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount1",        "type": "uint256"      }    ],    "name": "Mint",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "sender",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount0In",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount1In",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount0Out",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "amount1Out",        "type": "uint256"      },      {        "indexed": true,        "internalType": "address",        "name": "to",        "type": "address"      }    ],    "name": "Swap",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": false,        "internalType": "uint256",        "name": "reserve0",        "type": "uint256"      },      {        "indexed": false,        "internalType": "uint256",        "name": "reserve1",        "type": "uint256"      }    ],    "name": "Sync",    "type": "event"  },  {    "anonymous": false,    "inputs": [      {        "indexed": true,        "internalType": "address",        "name": "from",        "type": "address"      },      {        "indexed": true,        "internalType": "address",        "name": "to",        "type": "address"      },      {        "indexed": false,        "internalType": "uint256",        "name": "value",        "type": "uint256"      }    ],    "name": "Transfer",    "type": "event"  },  {    "stateMutability": "payable",    "type": "fallback"  },  {    "inputs": [],    "name": "DOMAIN_SEPARATOR",    "outputs": [      {        "internalType": "bytes32",        "name": "",        "type": "bytes32"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "MINIMUM_LIQUIDITY",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      },      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "name": "allowance",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "spender",        "type": "address"      },      {        "internalType": "uint256",        "name": "value",        "type": "uint256"      }    ],    "name": "approve",    "outputs": [      {        "internalType": "bool",        "name": "",        "type": "bool"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "name": "balanceOf",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "to",        "type": "address"      }    ],    "name": "burn",    "outputs": [      {        "internalType": "uint256",        "name": "amount0",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amount1",        "type": "uint256"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "_fee",        "type": "uint256"      }    ],    "name": "changeFeeType",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      },      {        "internalType": "uint32",        "name": "",        "type": "uint32"      }    ],    "name": "checkpoints",    "outputs": [      {        "internalType": "uint32",        "name": "fromBlock",        "type": "uint32"      },      {        "internalType": "uint256",        "name": "votes",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "claimFees",    "outputs": [      {        "internalType": "uint256",        "name": "claimed0",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "claimed1",        "type": "uint256"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "name": "claimable0",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "name": "claimable1",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenIn",        "type": "address"      },      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      }    ],    "name": "current",    "outputs": [      {        "internalType": "uint256",        "name": "amountOut",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "currentCumulativePrices",    "outputs": [      {        "internalType": "uint256",        "name": "reserve0Cumulative",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "reserve1Cumulative",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "blockTimestamp",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "decimals",    "outputs": [      {        "internalType": "uint8",        "name": "",        "type": "uint8"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "delegatee",        "type": "address"      }    ],    "name": "delegate",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "delegator",        "type": "address"      }    ],    "name": "delegates",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "factory",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "fees",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "address",        "name": "tokenIn",        "type": "address"      }    ],    "name": "getAmountOut",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "account",        "type": "address"      }    ],    "name": "getCurrentVotes",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "account",        "type": "address"      },      {        "internalType": "uint256",        "name": "blockNumber",        "type": "uint256"      }    ],    "name": "getPriorVotes",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "getReserves",    "outputs": [      {        "internalType": "uint256",        "name": "_reserve0",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "_reserve1",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "_blockTimestampLast",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "index0",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "index1",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "_token0",        "type": "address"      },      {        "internalType": "address",        "name": "_token1",        "type": "address"      },      {        "internalType": "uint256",        "name": "_fee",        "type": "uint256"      },      {        "internalType": "bool",        "name": "_stable",        "type": "bool"      }    ],    "name": "initialize",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [],    "name": "lastObservation",    "outputs": [      {        "components": [          {            "internalType": "uint256",            "name": "timestamp",            "type": "uint256"          },          {            "internalType": "uint256",            "name": "reserve0Cumulative",            "type": "uint256"          },          {            "internalType": "uint256",            "name": "reserve1Cumulative",            "type": "uint256"          }        ],        "internalType": "struct MuteSwitchPairDynamic.Observation",        "name": "",        "type": "tuple"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "metadata",    "outputs": [      {        "internalType": "uint256",        "name": "dec0",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "dec1",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "r0",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "r1",        "type": "uint256"      },      {        "internalType": "bool",        "name": "st",        "type": "bool"      },      {        "internalType": "address",        "name": "t0",        "type": "address"      },      {        "internalType": "address",        "name": "t1",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "to",        "type": "address"      }    ],    "name": "mint",    "outputs": [      {        "internalType": "uint256",        "name": "liquidity",        "type": "uint256"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [],    "name": "name",    "outputs": [      {        "internalType": "string",        "name": "",        "type": "string"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "name": "nonces",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "name": "numCheckpoints",    "outputs": [      {        "internalType": "uint32",        "name": "",        "type": "uint32"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "observationLength",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "name": "observations",    "outputs": [      {        "internalType": "uint256",        "name": "timestamp",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "reserve0Cumulative",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "reserve1Cumulative",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "pairFee",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "owner",        "type": "address"      },      {        "internalType": "address",        "name": "spender",        "type": "address"      },      {        "internalType": "uint256",        "name": "value",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "deadline",        "type": "uint256"      },      {        "internalType": "bytes",        "name": "sig",        "type": "bytes"      }    ],    "name": "permit",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenIn",        "type": "address"      },      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "points",        "type": "uint256"      }    ],    "name": "prices",    "outputs": [      {        "internalType": "uint256[]",        "name": "",        "type": "uint256[]"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenIn",        "type": "address"      },      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "granularity",        "type": "uint256"      }    ],    "name": "quote",    "outputs": [      {        "internalType": "uint256",        "name": "amountOut",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "reserve0CumulativeLast",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "reserve1CumulativeLast",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "tokenIn",        "type": "address"      },      {        "internalType": "uint256",        "name": "amountIn",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "points",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "window",        "type": "uint256"      }    ],    "name": "sample",    "outputs": [      {        "internalType": "uint256[]",        "name": "",        "type": "uint256[]"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "to",        "type": "address"      }    ],    "name": "skim",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [],    "name": "stable",    "outputs": [      {        "internalType": "bool",        "name": "",        "type": "bool"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "name": "supplyIndex0",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "name": "supplyIndex1",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "uint256",        "name": "amount0Out",        "type": "uint256"      },      {        "internalType": "uint256",        "name": "amount1Out",        "type": "uint256"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "bytes",        "name": "data",        "type": "bytes"      }    ],    "name": "swap",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [],    "name": "symbol",    "outputs": [      {        "internalType": "string",        "name": "",        "type": "string"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "sync",    "outputs": [],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [],    "name": "token0",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "token1",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "tokens",    "outputs": [      {        "internalType": "address",        "name": "",        "type": "address"      },      {        "internalType": "address",        "name": "",        "type": "address"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [],    "name": "totalSupply",    "outputs": [      {        "internalType": "uint256",        "name": "",        "type": "uint256"      }    ],    "stateMutability": "view",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "value",        "type": "uint256"      }    ],    "name": "transfer",    "outputs": [      {        "internalType": "bool",        "name": "",        "type": "bool"      }    ],    "stateMutability": "nonpayable",    "type": "function"  },  {    "inputs": [      {        "internalType": "address",        "name": "from",        "type": "address"      },      {        "internalType": "address",        "name": "to",        "type": "address"      },      {        "internalType": "uint256",        "name": "value",        "type": "uint256"      }    ],    "name": "transferFrom",    "outputs": [      {        "internalType": "bool",        "name": "",        "type": "bool"      }    ],    "stateMutability": "nonpayable",    "type": "function"  }]
```

## Farms

MuteAmplifierRedux

```json
[ { "inputs": [ { "internalType": "address", "name": "_customTreasury", "type": "address" }, { "internalType": "address", "name": "_lpToken", "type": "address" }, { "internalType": "uint256", "name": "_rewardBase", "type": "uint256" }, { "internalType": "address", "name": "_oracle", "type": "address" }, { "internalType": "uint256", "name": "_mgmt_fee", "type": "uint256" }, { "internalType": "uint256", "name": "_percentageMulti", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_duration", "type": "uint256" } ], "name": "EpochDurationChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_fee", "type": "uint256" } ], "name": "ManagementFeeChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "_oracle", "type": "address" } ], "name": "OracleChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_pMulti", "type": "uint256" } ], "name": "PercentageMultiChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_rewardBase", "type": "uint256" } ], "name": "RewardBaseChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "deposit", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "payout", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "depositor", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "time", "type": "uint256" } ], "name": "StakeCreated", "type": "event" }, { "inputs": [ { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" } ], "name": "GetUsedVeInfo", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "_index", "type": "uint256" } ], "name": "GetUserStake", "outputs": [ { "components": [ { "internalType": "uint256", "name": "stakeAmount", "type": "uint256" }, { "internalType": "uint256", "name": "stakedTime", "type": "uint256" }, { "internalType": "uint256", "name": "rewardAmount", "type": "uint256" }, { "internalType": "uint256", "name": "rewardClaimed", "type": "uint256" }, { "internalType": "uint256", "name": "epochDuration", "type": "uint256" }, { "internalType": "uint256", "name": "lastRedeem", "type": "uint256" }, { "internalType": "uint256", "name": "supplyIndex0", "type": "uint256" }, { "internalType": "uint256", "name": "supplyIndex1", "type": "uint256" } ], "internalType": "struct MuteAmplifierRedux.StakeTerms", "name": "stake", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "GetUserStakeLength", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "GetUserStakes", "outputs": [ { "components": [ { "internalType": "uint256", "name": "stakeAmount", "type": "uint256" }, { "internalType": "uint256", "name": "stakedTime", "type": "uint256" }, { "internalType": "uint256", "name": "rewardAmount", "type": "uint256" }, { "internalType": "uint256", "name": "rewardClaimed", "type": "uint256" }, { "internalType": "uint256", "name": "epochDuration", "type": "uint256" }, { "internalType": "uint256", "name": "lastRedeem", "type": "uint256" }, { "internalType": "uint256", "name": "supplyIndex0", "type": "uint256" }, { "internalType": "uint256", "name": "supplyIndex1", "type": "uint256" } ], "internalType": "struct MuteAmplifierRedux.StakeTerms[]", "name": "", "type": "tuple[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256[]", "name": "veIds", "type": "uint256[]" } ], "name": "calculateMultiplier", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "min", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "name": "clamp_value", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "currentEpoch", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "uint256[]", "name": "veIds", "type": "uint256[]" } ], "name": "deposit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "epoch", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "epochDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "management_fee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxDeposit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "_am", "type": "uint256" }, { "internalType": "uint256[]", "name": "veIds", "type": "uint256[]" } ], "name": "payoutFor", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "percentageMulti", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "redeemRewards", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "redeemRewardsView", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rewardBase", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_duration", "type": "uint256" } ], "name": "setEpochDuration", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_fee", "type": "uint256" } ], "name": "setManagementFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_oracle", "type": "address" } ], "name": "setOracle", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_pMulti", "type": "uint256" } ], "name": "setPercentageMulti", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_rewardBase", "type": "uint256" } ], "name": "setRewardBase", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "totalDebt", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalPayoutGiven", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "usedVeIds", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "userStakes", "outputs": [ { "internalType": "uint256", "name": "stakeAmount", "type": "uint256" }, { "internalType": "uint256", "name": "stakedTime", "type": "uint256" }, { "internalType": "uint256", "name": "rewardAmount", "type": "uint256" }, { "internalType": "uint256", "name": "rewardClaimed", "type": "uint256" }, { "internalType": "uint256", "name": "epochDuration", "type": "uint256" }, { "internalType": "uint256", "name": "lastRedeem", "type": "uint256" }, { "internalType": "uint256", "name": "supplyIndex0", "type": "uint256" }, { "internalType": "uint256", "name": "supplyIndex1", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "withdrawEmergency", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]
```

## DAO & Governance

veKOI

```json
[ { "inputs": [ { "internalType": "address", "name": "_muteToken", "type": "address" }, { "internalType": "address[]", "name": "dmute_legacy", "type": "address[]" }, { "internalType": "address", "name": "_metadata", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "InvalidShortString", "type": "error" }, { "inputs": [ { "internalType": "string", "name": "str", "type": "string" } ], "name": "StringTooLong", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "approved", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "ApprovalForAll", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_fromTokenId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_toTokenId", "type": "uint256" } ], "name": "BatchMetadataUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "delegator", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "fromDelegate", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "toDelegate", "type": "address" } ], "name": "DelegateChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "previousBalance", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "newBalance", "type": "uint256" } ], "name": "DelegateVotesChanged", "type": "event" }, { "anonymous": false, "inputs": [], "name": "EIP712DomainChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_tokenId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "oldTime", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "newTime", "type": "uint256" } ], "name": "IncreaseLockEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "lockAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "totalTime", "type": "uint256" } ], "name": "LockEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": true, "internalType": "address", "name": "owner_0", "type": "address" }, { "indexed": false, "internalType": "address", "name": "owner_1", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_tokenId0", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_tokenId1", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_newTokenId", "type": "uint256" } ], "name": "MergeEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_tokenId", "type": "uint256" } ], "name": "MetadataUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferStarted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "unlockedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "burnAmount", "type": "uint256" } ], "name": "RedeemEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "sender", "type": "address" }, { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "_oldTokenId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_tokenId1", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_tokenId2", "type": "uint256" } ], "name": "SplitEvent", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "inputs": [], "name": "CLOCK_MODE", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DELEGATION_TYPEHASH", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DOMAIN_SEPARATOR", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "DOMAIN_TYPEHASH", "outputs": [ { "internalType": "bytes32", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" } ], "name": "GetLegacyUpgraded", "outputs": [ { "internalType": "bool", "name": "valid", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_id", "type": "uint256" } ], "name": "GetLockInfo", "outputs": [ { "components": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "time", "type": "uint256" }, { "internalType": "uint256", "name": "vote_weight", "type": "uint256" }, { "internalType": "bool", "name": "legacy", "type": "bool" } ], "internalType": "struct veMUTEV2.UserLockInfo", "name": "_info", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "GetMintCount", "outputs": [ { "internalType": "uint256", "name": "_count", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "GetUnderlyingTokens", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "GetVotingTokens", "outputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_tokenId", "type": "uint256" }, { "internalType": "uint256", "name": "_time", "type": "uint256" } ], "name": "IncreaseLockTime", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_lock_time", "type": "uint256" } ], "name": "Lock", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "LockLegacy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256[][]", "name": "locks", "type": "uint256[][]" } ], "name": "LockLegacyIndex", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_lock_time", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "LockTo", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "MAX_LOCK", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MAX_LOCK_LEGACY", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_LOCK", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_tokenId0", "type": "uint256" }, { "internalType": "uint256", "name": "_tokenId1", "type": "uint256" } ], "name": "Merge", "outputs": [ { "internalType": "uint256", "name": "_newTokenId", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "MuteToken", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "lock_index", "type": "uint256[]" } ], "name": "Redeem", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "ids", "type": "uint256[]" }, { "internalType": "address", "name": "to", "type": "address" } ], "name": "RedeemTo", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_tokenId", "type": "uint256" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" } ], "name": "Split", "outputs": [ { "internalType": "uint256", "name": "_tokenId1", "type": "uint256" }, { "internalType": "uint256", "name": "_tokenId2", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_tokenId", "type": "uint256" }, { "internalType": "uint256", "name": "_vote_amount", "type": "uint256" } ], "name": "SplitLegacy", "outputs": [ { "internalType": "uint256", "name": "_tokenId1", "type": "uint256" }, { "internalType": "uint256", "name": "_tokenId2", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "approve", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256[]", "name": "_ids", "type": "uint256[]" } ], "name": "burnLegacy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_metadata", "type": "address" } ], "name": "changeMetadataProxy", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "clock", "outputs": [ { "internalType": "uint48", "name": "", "type": "uint48" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "dMuteLegacy", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "address", "name": "delegatee", "type": "address" } ], "name": "delegate", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "delegator", "type": "uint256" }, { "internalType": "address", "name": "delegatee", "type": "address" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "expiry", "type": "uint256" }, { "internalType": "uint8", "name": "v", "type": "uint8" }, { "internalType": "bytes32", "name": "r", "type": "bytes32" }, { "internalType": "bytes32", "name": "s", "type": "bytes32" } ], "name": "delegateBySig", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "delegates", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "eip712Domain", "outputs": [ { "internalType": "bytes1", "name": "fields", "type": "bytes1" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "version", "type": "string" }, { "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "verifyingContract", "type": "address" }, { "internalType": "bytes32", "name": "salt", "type": "bytes32" }, { "internalType": "uint256[]", "name": "extensions", "type": "uint256[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "getApproved", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "timepoint", "type": "uint256" } ], "name": "getPastTotalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "uint256", "name": "timepoint", "type": "uint256" } ], "name": "getPastVotes", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "getVotes", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "legacyNFTs", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "metaProxy", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "nonces", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "ownerOf", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pendingOwner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "tokenByIndex", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "tokenOfOwnerByIndex", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "tokenURI", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "totalSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "transferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "voteSupply", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" } ]
```


# Router

## wETH

```solidity
// Returns address of the wETH contract.
function wETH() external view returns (address);
```

## factory

```solidity
// Returns address of the factory contract.
function factory() external view returns (address);
```

## addLiquidity

```solidity
// Adds (or creates) liquidity to pool.
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        uint feeType,
        bool stable
    ) external returns (uint amountA, uint amountB, uint liquidity);
```

## addLiquidityETH

```solidity
// Adds (or creates) liquidity to pool.
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        uint feeType,
        bool stable
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
```

## removeLiquidity

```solidity
// Removes liquidity from existing pool.
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool stable
    ) external returns (uint amountA, uint amountB);
```

## removeLiquidityETH

```solidity
// Removes liquidity from existing pool.
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool stable
    ) external returns (uint amountToken, uint amountETH);
```

## removeLiquidityETHSupportingFeeOnTransferTokens

```solidity
// Removes liquidity from existing pool for tokens with fee transfer.
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool stable
    ) external returns (uint amountToken, uint amountETH);
```

## swapExactTokensForTokens

```solidity
// 
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline,
        bool[] calldata stable
    ) external returns (uint[] memory amounts);
```

## swapExactETHForTokens

```solidity
// 
    function swapExactETHForTokens(
            uint amountOutMin, 
            address[] calldata path, 
            address to, 
            uint deadline, 
            bool[] calldata stable
        ) external payable returns (uint[] memory amounts);
```

## swapExactTokensForETH

```solidity
// 
    function swapExactTokensForETH(
            uint amountIn, 
            uint amountOutMin,
            address[] calldata path, 
            address to, 
            uint deadline, 
            bool[] calldata stable
    ) external returns (uint[] memory amounts);
```

## swapExactETHForTokensSupportingFeeOnTransferTokens

```solidity
//
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
                uint amountOutMin,
                address[] calldata path,
                address to,
                uint deadline,
                bool[] calldata stable
          ) external payable;
```

## swapExactTokensForETHSupportingFeeOnTransferTokens

```solidity
//
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
              uint amountIn,
              uint amountOutMin,
              address[] calldata path,
              address to,
              uint deadline,
              bool[] calldata stable
          ) external;
```

## swapExactTokensForTokensSupportingFeeOnTransferTokens

```solidity
//
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
            uint amountIn,
            uint amountOutMin,
            address[] calldata path,
            address to,
            uint deadline,
            bool[] calldata stable
        ) external;
```

## quote

```solidity
// Gets reserve quotes
    function quote(uint amountA, uint reserveA, uint reserveB) 
            external pure returns (uint amountB);
```

## getAmountOut

```solidity
// Calculates the best price through both stable and normal pools
    function getAmountOut(
                uint amountIn, 
                uint tokenIn, 
                uint tokenOut
    ) external view returns (uint amountOut, bool stable, uint fee);

```

## getAmountsOutExpanded

```solidity
// Calculates the best prices for path. Returns amounts, pool types, and pool fees for route
    function getAmountsOutExpanded(
                uint amountIn, 
                address[] calldata path
    ) external view returns (uint[] memory amounts, bool[] memory stable, uint[] memory fees);

```

## getAmountsOut

```solidity
// Calculates price best on path and pool type (stable, normal)
    function getAmountsOut(
                uint amountIn, 
                address[] calldata path, 
                bool[] calldata stable
    ) external view returns (uint[] memory amounts);
```

## getPairInfo

```solidity
// Returns pair info
    function getPairInfo(
                    address[] calldata path, 
                    bool stable
    ) external view returns(address tokenA, address tokenB, address pair, uint reserveA, uint reserveB, uint fee)

```

## pairFor

```solidity
// Returns pair address
    function pairFor(address tokenA, address tokenB, bool stable)
      external view returns(address pair);

```

\
\
\ <br>


# Audits

[Code4rena Audit](https://code4rena.com/reports/2023-03-mute/)\
[Certora Audit](https://github.com/muteio/switch-core/blob/main/audits/MUTEv2%20\(final\)%20Report%20by%20Certora.pdf)\
[Solo Audits](https://gist.github.com/HollaDieWaldfee100/b71d29b2d4005f0307bd2aaba5e7720e)\
[Peckshield Audits](https://github.com/muteio/switch-core/blob/main/audits/PeckShield-Audit-Report-Koi-Muteio-v1.0rc.pdf)


# Locking v3 Positions

Locking v3 Position and claiming fee functionality

There is **NO WARRANTY** provided with this code reference. The concept here is to transfer a Koi Finance v3 position NFT into this contract which permanently locks liquidity, yet allows the deployed owner to collect trading fees on this position in perpetuity until the owner is relinquished. \
\
When calling collect, the recipient param should be the account that is receiving the fees.

```solidity
pragma solidity =0.7.6;
pragma abicoder v2;

/// @title V3 Locker & Fee Claimer
contract V3PositionLocker {
    address public owner;
    address public immutable nonfungiblePositionManager;

    constructor(address _nonfungiblePositionManager) {
        owner = msg.sender;
        nonfungiblePositionManager = _nonfungiblePositionManager;
    }

    function setOwner(address _owner) external {
        require(msg.sender == owner);
        owner = _owner;
    }

    function collect(INonfungiblePositionManager.CollectParams calldata params) external {
        require(msg.sender == owner, "Not owner");

        (uint256 amount0, uint256 amount1) = INonfungiblePositionManager(nonfungiblePositionManager).collect(params);
    }

    function saveToken(address _token, address _destination, uint _amount) external {
        require(msg.sender == owner, "Not owner");
        IERC20(_token).transfer(_destination, _amount);
    }
}

interface INonfungiblePositionManager {
    struct CollectParams {
        uint256 tokenId;
        address recipient;
        uint128 amount0Max;
        uint128 amount1Max;
    }

    /// @notice Collects up to a maximum amount of fees owed to a specific position to the recipient
    /// @param params tokenId The ID of the NFT for which tokens are being collected,
    /// recipient The account that should receive the tokens,
    /// amount0Max The maximum amount of token0 to collect,
    /// amount1Max The maximum amount of token1 to collect
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1);
}

interface IERC20 {
    function transfer(address recipient, uint256 amount) external returns (bool);
}
```


# Roadmap

Big picture roadmap - subject to change

### *Complete*

**Mainnet Release** \
May, 2023.\
\
**Farming Program** \
A liquidity reward protocol rolled out to incentivize high-value projects to provide liquidity on Koi. A fixed APY farming model that allows for efficient reward distributions. \
\
**Bond Infra** \
A Bond marketplace rolled out to give projects tooling to increase their PoL.

**Paymaster** \
Pay fees in any tokens traded on Koi

**veDAO** \
Vote-escrow model for Koi tokens. Get access to the KOI DAO, boosted farming APYs, and revenue sharing (Q1 2024)

### ***Q1/Q2 2024***

**Mute -> Koi rebrand & token swap**\
Rebranded ecosystem with overhauled tokenomics

**veKoi revenue sharing**\
Integrate revenue sharing mechanisms from protocol generated fees for veKoi lockers.

**Concentrated liquidity pools, limit orders, trading strategies**\
Deploy and integrated concentrated liquidity pools with limit orders, range orders, recurring orders, and overlapping liquidity segmentation.&#x20;


# KOI Tokenomics and Contracts

KOI Tokenomics

## Max Supply

1,000,000,000 KOI

## Circulating Supply

500,000,000 KOI

## Token Allocation

As tokens are allocated, vested, and unlocked, these numbers will be updated.&#x20;

* Circulating (prev. Mute token swap): 50%
* Ecosystem Incentives: 30%
* Future Investors (reserved): 7%
* DAO: 6%
* Future Advisors (reserved): 4%
* Investors & Advisors (12-18 month vests): 3%


# Token Contracts

L2 contracts to be updated soon

<table><thead><tr><th width="191">Network</th><th>Contract</th></tr></thead><tbody><tr><td>Ethereum Mainnet</td><td><a href="https://etherscan.io/token/0x9d14bce1daddf408d77295bb1be9b343814f44de">0x9d14bce1daddf408d77295bb1be9b343814f44de</a></td></tr><tr><td>zkSync Era</td><td><a href="https://era.zksync.network/token/0xa995ad25ce5eb76972ab356168f5e1d9257e4d05">0xa995ad25ce5eb76972ab356168f5e1d9257e4d05</a></td></tr></tbody></table>

### Github

[https://github.com/muteio](https://github.com/muteio/mute-contracts/tree/main/contracts/Mute)


# Social Media

Keep up with the latest developments and join the Koi Finance community!

[Twitter](https://twitter.com/koi_finance)\
[Discord](https://discord.koi.finance)\
[Telegram](https://t.me/mute_io)<br>


# Layer 1 Support

The absolute best place to get help outside of this wiki is in the #support chat on our [Discord server](https://discordapp.com/invite/HGuvDTW). Team members (along with other helpful members of the community) are able to assist with any issue you may run into.

{% hint style="danger" %}
**WARNING:** Do **NOT** accept help from somebody private messaging you claiming to be a member of the team or an admin! This is a classic (and unfortunately, unavoidable) scam technique designed to talk you into giving up information that can allow them to steal your funds. **NEVER** give out wallet seed phrases! There is absolutely no reason for any member of the team to request this information.

If a team member sees a need to continue support in private, they will publicly ask **YOU** to message them first.
{% endhint %}

{% content-ref url="/pages/-MUC-LFPArkzJemcTlSq" %}
[Uniswap Buy/Sell Error](/info/l1-support/uniswap-buy-sell-error)
{% endcontent-ref %}

{% content-ref url="/pages/-MZGjgrGh8YhbUaNmByA" %}
[Adding Uniswap V2 Liquidity Guide](/info/l1-support/adding-uniswap-v2-liquidity-guide)
{% endcontent-ref %}

{% content-ref url="/pages/-MVKUAgWDI\_R3TeQUa23" %}
[Broken mention](broken://pages/-MVKUAgWDI_R3TeQUa23)
{% endcontent-ref %}


# Uniswap Buy/Sell Error

If your buy or sell order is not properly completing (typically with an undefined error), simply increase your slippage tolerance. Typically, you don't have to increase it to any more than 2% (but the lower, the better -- most swaps don't require more than 1.5%). If that doesn't help, you can also try swapping rounded numbers, for example 10 $MUTE instead of 9.871342046815302394

![Click on the gear icon](/files/-MUC-jomyI5-hHBUfF0h)

{% hint style="warning" %}
**WARNING:** Setting the slippage higher than 2% will increase the chances that front running bots will target your transaction.
{% endhint %}

![Enter 1.5 or 2 in the right-hand (custom) slippage field](/files/-MUC-vGCFrPxqX4HWR-i)

Click anywhere outside of the "Transaction Settings" dialog to close it and verify your slippage is set to 2% or less.

![Confirm your "Slippage Tolerance" is 2% (or less)](/files/-MUC04NAHCEcBjJppVe2)

Your trade should now successfully complete.


# Adding Uniswap V2 Liquidity Guide

To provide liquidity for the $MUTE / $ETH Uniswap pair, you'll need to fund both sides of the exchange. This means you'll need to deposit equal values of both $ETH and $MUTE. For example, if the current price of $MUTE is .001 $ETH, then for every 1000 $MUTE you want to stake you'll also need to deposit 1 $ETH.

Once everything is approved and deposited, you'll be sent tokens that represent your share of the liquidity pool. These tokens automatically earn 0.3% of all trades proportional to your share of the pool until you redeem them.&#x20;

## Adding Liquidity

{% hint style="success" %}
**TIP:** If you want to save gas costs, do your transactions when network demand is at its lowest -- generally around 00:00 - 01:00 UTC and on the weekends.
{% endhint %}

First, open up the Uniswap V2 Liquidity dApp either in your web browser or web3 enabled wallet for whichever token you want to add liquidity to.

**MUTE -** <https://app.uniswap.org/#/add/v2/ETH/0xA49d7499271aE71cd8aB9Ac515e6694C755d400c>

![Connect your wallet](/files/-MZg2vsfcN5FQxpunlNZ)

![Enter amounts to add to the liquidity pool](/files/-MZg3CjG_vESIesQ9Fot)

{% hint style="success" %}
Entering in one amount will auto fill the other.
{% endhint %}

![Hit the Approve MUTE button and confirm the transaction](/files/-MZg3mnKwRp6MtKMjclv)

Once you hit the "Approve MUTE" button, you'll need to confirm the transaction and pay a small transaction fee. If you are using a Ledger hardware wallet make sure you have contract data enabled in the settings. After the transaction goes through, the Supply button will become available.

![Hit the Supply button](/files/-MZg5TUrznAQDfHk7opS)

![Tap on Confirm Supply](/files/-MZg5hQjhVdUThBf1e31)

Once you hit the "Confirm Supply" button you'll need to confirm the transaction in your wallet. You'll need the transaction to complete before the price changes too much, so don't low ball the fee even though it might be tempting since it's more expensive than the previous one.

![Transaction complete](/files/-MZg6cBBZ3FRboGrK8ga)

At this point you can use the "add UNI-V2 to ..." button if you want to see the pool tokens in your wallet and then close the window. If you need to manually add either token to your particular wallet, add it as a custom token using the following addresses..

### Uniswap Liquidity Pool Tokens

MUTE/ETH - [0x0efb424c465dbd0a626359d63412838f727f2c25](https://etherscan.io/address/0x0efb424c465dbd0a626359d63412838f727f2c25)


# Branding and Logos

[Koi Brandkit](https://drive.google.com/drive/u/0/folders/1LDZFNvpzq85DQDorMi4B7LfvvT_PWjic)


# Known Bugs

## dMute DAO Bug

An initial deployment of the dMute contract on mainnet launch was misconfigured and deployed with a missing argument which prevented mute from redemptions, permanently locking any mute that was deposited in the contract forever. \
\
As a fix, the Mute team minted the locked token amount on L1, burned the same amount of mute tokens from the zkSync L1 Bridge, and redeployed and distributed those mute to the affected addresses on L2, ensuring the total token supply of Mute remained the same. \
\
Amounts burned from L1 bridge and minted/redistributed on L2: **2694479.313675894551572218 Mute**\
\
All users who locked tokens in the linked contract below have been made whole. The total token supply of Mute remains unaffected. \
\
Relevant Links: \
\
[dMute Contract on L2](https://explorer.zksync.io/address/0xd9Ee4c1e04059D4B0dd02b747282511bEE4E5fB5)\
[New minted Mute + existing treasury mute deposited to L2](https://etherscan.io/tx/0xb66d57064311810acf387ce96141ac770c19b7578ce3f9d99f1f375b86df97f0)


# Beta Testing

Beta testing is now live and open to everyone with no registration required!\
\
Whether you simply want to give it a try or help make the user experience even better with your suggestions, get yourself some testnet tokens and join our community of beta testers.

{% hint style="info" %}
Please note that not all features may be available and USD values DO NOT reflect real-world prices.
{% endhint %}

## How to Participate

{% hint style="success" %}
We recommend creating a new wallet for testing purposes.
{% endhint %}

1\. Receive goerli testnet eth from either faucet here: \
<https://faucets.chain.link/goerli> \
<https://goerli-faucet.mudit.blog/>

{% hint style="success" %}
Due to the current high demand for testnet ETH, these faucets may be dry. If you are unable to get any, please join our Telegram or Discord chat and ask the community to help you out.&#x20;
{% endhint %}

2\. Bridge over your ETH from the goerli testnet into the zksync l2: <https://portal.zksync.io/deposit>&#x20;

3\. Receive additional tokens from the zksync faucet (usdc/link/dai/wbtc): <https://portal.zksync.io/faucet>&#x20;

4\. Once you have some tokens & ETH in your zksync wallet, you can now access and trade, provide liquidity and farm on the switch at <https://testnet.switch.mute.io/>

### Bugs and Feedback

Found a bug? Please report it in our Discord server #switch-support chat

Care to tell us about your experience? Leave us a note in #switch-reviews&#x20;


# \[Old] Mute Tokenomics and Contracts

Simple and Clear Tokenomics

## Max Supply

40,000,000 [**$MUTE**](/info/tokenomics-1/token-contracts#usdmute)

## Circulating Supply

40,000,000 [**$MUTE**](/info/tokenomics-1/token-contracts#usdmute) - treasury balance

## Token Allocation

Mute started out as a proof-of-work blockchain network with the goal of creating a layer-two solution using zero-knowledge proofs. The project later transitioned to the ERC-20 standard and began building on zkSync. Throughout this process, Mute remained committed to fairness and decentralization. It was launched in a fair manner, with no ICO, pre-seed, or early investments, and it was GPU mineable. About 10% of block rewards were allocated to the Mute treasury. The migration from Mute's native chain to ERC-20 was carried out through a 1:1 coin/token swap. All swaps were conducted transparently and can be verified on the Ethereum Blockchain via  [Etherscan](https://etherscan.io/address/0x2254f9265bb30ffa1bb93a252e96a13a5f7b2fd9).

The [Treasury wallet](https://etherscan.io/address/0x3c34de76ec06d7764dd62967f634e5f531a409d7) holds approximately 8% of the total Mute token supply. These funds are being used to support the ongoing development of Mute, and the history of the treasury address and its movements can be tracked. In the future, the treasury and its assets on L2 will be controlled by the DAO through dMute.

Additionally, Mute has integrated/merged a side token called VOICE into its total supply. As part of this arrangement, VOICE token holders were able to swap their tokens for Mute tokens at a rate of 1:197,55. The resulting Mute tokens are included in the project's total supply, and holders of VOICE tokens are still able to conduct this swap via the [smart contract](https://merge.mute.io). You can read more about this [here](https://muteio.medium.com/the-voice-buyout-and-merge-into-mute-passed-b4adfe374820).

## Transparency

The Mute Token has been live and trading on ETH L1 since January 2021.\
\
All VCs that have positions in Mute purchased them at market values via the open market.&#x20;


# Token Contracts

L2 contracts to be updated soon

**MUTE Token**\
[0xa49d7499271ae71cd8ab9ac515e6694c755d400c](https://etherscan.io/token/0xa49d7499271ae71cd8ab9ac515e6694c755d400c)

### Github

[https://github.com/muteio](https://github.com/muteio/mute-contracts/tree/main/contracts/Mute)

### Useful links

[MUTE on Etherscan](https://etherscan.io/token/0xa49d7499271ae71cd8ab9ac515e6694c755d400c)\
[MUTE on Uniswap.info](https://v2.info.uniswap.org/pair/0x0efb424c465dbd0a626359d63412838f727f2c25)\
[MUTE on GeckoTerminal](https://www.geckoterminal.com/eth/pools/0x0efb424c465dbd0a626359d63412838f727f2c25)\
[MUTE on DEXTools](https://www.dextools.io/app/uniswap/pair-explorer/0x0efb424c465dbd0a626359d63412838f727f2c25)\
[MUTE on CoinGecko](https://www.coingecko.com/en/coins/mute)\
[MUTE on CoinMarketCap](https://coinmarketcap.com/currencies/mute/)


