Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
We explain the core concepts of Fizzswap's smart contract structure, swap requests, and providing liquidity.
Welcome to the Fizzswap documentation!
In this documentation, we introduce Fizzswap, the AMM protocol for the Silicon Network.
Fizzswap is a comprehensive DeFi protocol built on the Silicon chain, an Ethereum Layer 2 solution. As an Automated Market Maker (AMM) Decentralized Exchange (DEX), Fizzswap allows anyone to participate in the protocol and earn pool fees and various rewards.
Fizzswap supports the exchange of multiple tokens through optimal swap paths, a core feature of DEXs. Additionally, it offers a variety of services such as concentrated liquidity pool participation and token borrowing based on a single liquidity pool(supplying).
Beyond simple asset swaps, Fizzswap aims to lead the growth of the Fizzswap and Silicon ecosystems by providing users with new liquidity participation opportunities to access innovative and unique tokens quickly and freely.
Fizzswap has the following advantages.

Anticipation and demand for new tokens naturally stimulate trading activity. Based on increased trading volume, Liquidity Providers (LPs) can earn attractive pool usage fees.
As liquidity deepens and trading volume increases, liquidity providers receive more pool usage fees as rewards, leading to the sustainable growth of the Fizzswap ecosystem and community.
Fizzswap is a DEX operating on the Silicon Network, a zero-knowledge rollup scaling solution built using Polygon's Chain Development Kit (CDK) and Aggregation Layer (Agg Layer) technology. It enables users to provide liquidity not only for Silicon native tokens but also for tokens from Ethereum and other networks.
By leveraging assets from various networks, Fizzswap enhances interoperability with other DApps and expands its ecosystem.
Additionally, it offers a superior trading experience with faster transaction processing speeds, lower transaction fees (gas fees), and the maintained security of the mainnet.
Fizzswap is having a security audit conducted by globally renowned security audit agencies. The Fizzswap protocol consists of and operates through a variety of smart contracts. A single, small vulnerability within a smart contract can lead to devastating accidents related to service availability and security. Fizzswap puts the safety of its users' transactions first, and is in the process of getting a security certification with ResearchLab and ChainLight to assure safe protection against any possible security incidents in the near future.

This Privacy Policy explains the way of treatment on the Fizzswap.com website (the “Service”) of the user information for the Service.
The Service does NOT collect, use users' personal information or provide it to the third parties.
* The Services does NOT request, store, or process information that can identify users individually, or information such as private key, mnemonic key, and seed phrase required to access the user's wallet, or information equivalent thereto. Therefore, users must manage the above information safely by themselves, and the service is not responsible for any damage caused by the user's failure to fulfill this duty of care.
1. The Service may use 'cookies' that store and retrieve use of information from time to time to provide users with individually customized services.
2. Cookies are very small text files to be sent to the browser of the users by the server(http) used for the operation of the websites of the company and may be stored on hard disks of the users' computer (PC).
1) Purpose of using cookies: Cookies are used to provide optimized information to users by identifying the types of visits and usage of each service and website visited by the user, popular search terms, and whether or not secure access is available.
2) Installation, operation, and rejection of cookies: A user can enable or disable cookie storage using the basic function of a web browser. For detailed cookie setting methods for each browser, please refer to the description of each browser.
3) If a user refuses to provide cookies, a user may experience difficulties in using customized services.
The Service uses the behavioral information analysis service using the following external analysis tools for service quality improvement, statistical purpose, and research. If a user would like to be excluded from this analysis, such user can turn it off by following the instructions in each item.
1) Google LLC, () (USA)
- Collection method: Transmission through the network at the time of the visitor’s using the Service within the website
- Collected items: Cookies, device browser-related data, device information, site activity information
- How to unset:
If you have any questions about this Privacy Policy, please contact [email protected] The user's message is forwarded to the person in charge of the company's privacy policy.
The Service may revise and post this Privacy Policy from time to time, and the revised policy will take effect from the same time as it is posted. If the privacy policy is changed significantly unfavorable to users, it will be posted at least 30 days before the effective date.
1. Click [Manage] of the pool you wish to remove liquidity from on the V3 pool list page.
2. Click the [Remove] tab on the V3 pool detail page and drag the slider or click a button to select the amount (%) to remove.
3. When removeing from "You Get", click on [Remove] after checking the tokens and pool usage fee rewards that you will be receiving.
4. Click [Remove] once you have checked the estimated information on the "Confirm Transaction" pop-up. Click the [Confirm] button in your wallet once you have confirmed the information.
Users can deposit assets in any type of pools they favor, and we call these ecosystem participants Liquidity Providers (LP). Providing liquidity to the pool will result in the receipt of Liquidity Pool (LP) Token as evidence, and the number of LP Token received represents my share(%) in the entire pool.
If you remove all your assets from the pool, the LP Token will be automatically returned, and the user can receive the following rewards from the pool through the proof of LP Token during the asset supply period.
1) To remove assets, users must have LP NFT assets corresponding to the supply certificate in their wallets, and the NFT asset approval transaction must be completed. Transaction fees are incurred on the Klaytn chain when a transaction is executed. The wallet owner has the right to transfer LP NFT assets, so if the asset is transferred to another wallet, removal is not possible.
2) During the removal process, the difference between the price at the time of supply and removal may result in asset loss.
3) Due to balance changes at the time of removal, asset composition ratios and values are subject to change (see detailed policy on V3 Supply below), and all rewards (pool usage fee rewards, airdrop tokens, etc.) distributed up to that point will be automatically credited to user’s wallet.
4) Removals proceed only within the transaction range (slippage) set at the time of removal, and if the range is exceeded, the removal may not proceed. Proceed with removal after reviewing all related information in the estimated details section below.
Pool usage fee rewards If the user supplies liquidity to the general pool, users can receive the transaction fee according to their LP stake(%) in the pool. Pool usage fees are accumulated in the pool and, in case of removal, the total amount removal includes pool usage fee rewards, and the process depends on the exchange ratio at the time of removal. (80% of the pool usage fee incurred)
Contract Address: 0x3a3f0074f29147769ac856e0d980165495933ccc
Chain: Silicon
Total Supply: 100,000,000
Token Allocation
Reserve (85%): This portion of the tokens will be allocated to various purposes such as community, initial airdrop, liquidity, and marketing to establish an effective tokenomics model. The specific allocation and percentages will be finalized and announced in the first half of 2025 when the Silicon network becomes fully operational.
Dev (15%): This portion is allocated for the maintenance and development of the protocol and frontend.






Please refer to the V3 pool Supply & Removal guide and policy.
Unlike the V2 pool, which supplies assets in all price ranges (0~∞), the V3 Pool supplies assets in a specific price range. Concentrated liquidity refers to a supply of assets in a particular range, and liquidity can only be utilized within that range. Fizzswap's primary driving force is the expansion of liquidity pools. As more assets (liquidity) are supplied into liquidity pools, more transactions occur, and as more pool usage fees are distributed to liquidity providers, more liquidity and suppliers will join the Fizzswap ecosystem.
However, the existing V2 pool was built with a CPMM model (Uniswap V2) based on x ∗ y = k, which supplies assets in all price ranges. This leads to a problem of 'low liquidity efficiency', where most supplied liquidity is not utilized for trading. As a result, Fizzswap's overall trading volume and pool usage fee profit ends up declining, weakening the users' motivation to provide additional liquidity.
The V3 Pool provides liquidity at a price level where transactions frequently occur so that the created liquidity can be used for a broader range of transactions. Making a considerable fee profit will increase rewards for Fizzswap ecosystem participants to be carried out more efficiently.
The following are the key features of Fizzswap's V3 pool.
V3 pool suppliers will receive 80% of the fee profit generated in the pool. The assets supplied in V3 pools are actively used for transactions, making it possible for suppliers to generate more profit.
By distributing these pool usage fee profits to suppliers, suppliers can reduce their chance of impermanent losses in liquidity supply.
Users can customize the price range for supplies. Users can also supply quickly and conveniently by choosing one of the three price ranges (Spot, Wide, Full range) provided by Fizzswap V3 pool. Price ranges of each type range from +n% to -n%, according to a parameter previously set by a contract.
A ‘price range’ represents the range of prices within which supplied assets can be traded, and when a transaction is conducted within that range, suppliers will receive their pool usage fees. Each price range has the following characteristics.
Characteristics of Spot, Wide, and Full price ranges
Suppliers can expect a higher pool usage fee profit if the price range is narrower, as the liquidity provided by users are more likely to be used for transactions.
However, since tokens with large price fluctuations are supplied intensively in a narrow price range, it is necessary to continuously monitor the current token price to ensure that it stays within the supplied range. In such a case, the assets should be migrated to valid price ranges where the swap occurs. Furthermore, the more suppliers provide within a narrower price range, the more likely the token's price will change from the time of supply, causing the impermanent loss to increase(Please refer to.)
Using the above method, Fizzswap V3 pool offers suppliers with no previous experience in providing V3 liquidity the convenience and flexibility to do so. Future updates will enable suppliers to customize their price range.
The Fizzswap V3 pool offers one-stop migration, allowing suppliers to migrate their assets with a single transaction. The detailed procedure consists of asset removal - supply in a new price range, and suppliers can migrate from the details page of the pool they provided liquidity for.
V3 pool aims to make the flow of liquidity capital within the ecosystem more efficient and dynamic. V3 pools will offer a more favorable trading environment, thereby enabling Fizzswap to secure a higher trading volume.
The V3 pool distributes 80% of the pool usage fee profit to V3 pool suppliers in order to continuously fill the pool with new liquidity. As a result of such a process, Fizzswap's TVL rises, creating a virtuous cycle, which ensures abundant liquidity, and generates more profit from pool usage fees based on that high TVL.





024-07-17
ChainLight@Theori
All Contract
2024-05-03
78ResearchLab
All Contract
To use Fizzswap, you must first create your crypto wallet. In the DeFi protocol, a personal crypto wallet is your account. You can make transactions using cryptocurrency such as supplies, removals, and swaps by connecting your wallet to Fizzswap.
Before you start using Fizzswap, you must set up a personal wallet. In the DeFi protocols, wallets serve as your primary financial accounts.
Fizzswap currently supports the following crypto wallets. (based on October 7th, 2024)
Refer to the guide below to select and create a crypto wallet you want to use.
MetaMask equips you with a key vault, secure login, token wallet, and token exchange—everything you need to manage your digital assets. Over 21 million users worldwide trust and use Metamask.
⬛ Features:
▪️ Create and manage accounts with seed phrase
▪️ Supports for most types of networks and tokens
⬛ Official Link:
Teleport is a non-custodial blockchain wallet that operates within the Telegram app. Users can securely manage their crypto assets and interact with various dApps without the need for additional app installations or complex wallet setup processes.
⚠️ NEVER, in any situation, should you ever give someone your private key or recovery phrase ("seed phrase").
⚠️ The genuine Fizzswap site and staff will never ask you to input your seed phrase.
Token swaps are the simplest way to exchange various tokens circulated on the Silicon chain according to ratios of token pairs supplied in the pool.
Once users swap (trade) tokens through Fizzswap, the pool usage fees will be determined by the reward policy of each liquidity pool, and the pool usage fee will be distributed as follows.
Pool types
Composition of fee distribution
Liquidity Provider (LP)
80%
Governance
20%
80% of the pool usage fees incurred in all pools are distributed to liquidity providers in proportion to their respective LP shares.
20% of the pool usage fees incurred in all pools are distributed and accrued to the Governance.
1) Fizzswap's migration function usually goes through the following steps:
Approve (assets approval) - Remove the assets in the previous price range - Swap assets - Supply assets in a new price range.
2) To remove assets, users must have LP NFT assets corresponding to the supply certificate in their wallets, and the NFT asset approval transaction must be completed. Transaction fees (ETH) are incurred on the Silicon chain when a transaction is executed. The wallet owner has the right to transfer LP NFT assets, so if the asset is transferred to another wallet, removal is not possible.
3) During the removal process, the difference between the price at the time of supply and removal may result in asset loss.
4) Due to balance changes at the time of withdrawal, asset composition ratios and values are subject to change (see detailed V3 supply policy below), and all rewards (pool usage fee profits, airdrop tokens, etc.) distributed up to that point will be automatically credited to user's wallet.
5) For removed assets, the smart contract automatically swaps and supplies the assets at the optimal rate based on the pool exchange rate for the user's chosen price range. When a swap is required, the V2 and V3 pools are used as swap routes and transaction fees are incurred. Each pool has its transaction fee rate.
6) Supplies are made after swap fees are subtracted. When swapping, the larger the transaction size (quantity), the greater the effect on the exchange rate between tokens in the pool, resulting in a difference between the current price and the price applied at the time of the exchange (price impact). Multiple runs in small quantities can reduce the impact.
7) Depending on the transaction size, there may be a price difference (Price impact) at the time of exchange, so the expected exchange rate at the time of supply may not match the actual exchange rate. For this reason, supplies are only made within the transaction range (Slippage) set at the time of the swap, and if the range is exceeded, the supply transaction may be reverted (Revert). Proceed with the supply after checking all the information on estimated returns at the bottom.
8) Some assets may remain after supplying to the V3 pool, and the remainder will be automatically returned to the user's wallet.
This contract manages V3 pool airdrop operation. Operators with authority can set up and execute airdrops through V3Treasury contract. Airdrop is available only for token0 and token1.
Github Link: (Will be updated after official launch)
Silicon Mainnet :
You can directly deposit or withdraw ETH to/from the Silicon chain network through cryptocurrency exchanges that support multi-chain deposits and withdrawals.
Transfer your ETH from Korbit to your personal wallet (Silicon Mainnet) easily and conveniently, and start using it on Fizzswap!
1. Select the ETH withdrawal button on the asset menu.
2. Choose Silicon from the list of supported networks for ETH multi-chain deposits and withdrawals.
3. Enter the amount you want to withdraw and the destination address to complete the withdrawal process.
You can find the list of cryptocurrencies supported for Silicon chain deposits and withdrawals here:
1. Select [V3 Pool] from the [Pool] menu at the top. To migrate, click [Asset supplied] and then [Manage].
2. Click [Migration] on the V3 detail page.
3. Set the price range for migration. There are 3 ways to adjust the price range.
① Drag the “minimum price bar” and the “maximum price bar”
A 'price range' refers to the minimum and maximum price ranges in which an asset can be traded, and suppliers will receive pool usage fees if a transaction occurs within the price range.
When the token price of the supplied pool fluctuates, the ratio of assets in the pool changes. And if the token price falls outside the range due to drastic changes in token prices, suppliers will only hold one token from the token pair. In that case, supplied assets cannot be traded within the rages, so pool usage fees and rewards cannot be earned.




deployAirdropOperator
Parameters:
token
address
The address of token to airdrop
pool
address
The address of pool to be airdroped
Return Values:
operator
address
The deployed address of V3AirdropOperator
event DeployAirdropOperator(address operator);function deployAirdropOperator(
address token,
address pool
) external returns (
address operator
)⬛ Features:
▪️ Teleport facilitates the creation and growth of token-based Web3 communities
▪️ Teleport users can seamlessly participate in various airdrops through its deep integration with the Vennie service.
Wallet Connect is an open source protocol for connecting decentralized applications to mobile wallets with QR code scanning or deep linking. Wallet Connect is also multi-chain. You can connect to multiple wallets and send transactions to multiple chains at the same time without having to switch chains.
⬛ Features:
▪️ Not a wallet app, a protocol that supports connections between wallets and Dapps
▪️ Supports convenient connection with QR code on mobile
▪️ Supports over 100 types of wallets
⬛ Supported wallets: https://walletconnect.com/registry?type=wallet
⬛ Official Link:
Metamask
⭕
⭕
Teleport
⭕
⭕
Wallet Connect
⭕
⭕
Silicon Mainnet : 0x7C3ea90428BaF92a135E443ADA78F6170C349a78
Migrates liquidity to v3 by burning v2 liquidity and minting a new position for v3
Slippage protection is enforced via amount{0,1}Min, which should be a discount of the expected values of the maximum amount of v3 liquidity that the v2 liquidity can get. For the special case of migrating to an out-of-range position, amount{0,1}Min may be set to 0, enforcing that the position remains out of range
Parameters:
③ Click the [+] button or the [-] button in the “Set Price Range” section
※ Notes
Pools out of range will not distribute rewards, and supplying only one asset of the pair is available.
4. When migrating in the "Estimated Returns" section, click the [Migration] button after checking information.
All displayed information is a real-time estimate; therefore, information changes may occur during migration. Therefore, users should fully understand the possible changes that may occur during migration before making a transaction.
5. Confirm the estimated information in the "Check Migration Details" pop-up, such as the amount to be removed and the amount to be supplied after swapping, and then click [Next Step].
6. When you have approved the Fizzswap V3 LP NFT in the "Confirm Transaction" pop-up, click the [OK] button.
By proceeding with the migration transaction, you acknowledge that you have read, understood, and agreed to the terms of service for Fizzswap.
7. Click the [OK] button after checking the estimated information on the V3 pool supply in "Confirm Transaction." Once the information is confirmed, click [Confirm] in the wallet.


If no transactions occur within the suppliers' price range, the pools become inactive, making it impossible for suppliers to earn pool usage fee profits and additional rewards (token airdrop, etc.). If so, suppliers are required to remove their assets and re-supply them.
The Fizzswap V3 pool offers one-stop migration, allowing suppliers to migrate their assets with a single transaction. The detailed procedure consists of asset removal - supply in the new price range, and suppliers can migrate from the detail page of the pool they provided liquidity for.
*Case 1: If the token price changes to the Change2 state, transactions stop occurring in liquidity pool A, which makes pool A inactive.
*Case 2: If the token price changes to the Change1 state, transactions continue to occur in liquidity pool A, but the price might fall out of range and may turn into an inactive state.
▶ In both cases, suppliers can re-supply to a stable price range via migration and continue earning pool usage fee profit and rewards.
Please refer to the V3 Pair Deposit guide and policy.

This contract is Airdrop plan contract applied to the pool. You can target one liquidity pool and one token. The contract is executed by an operator with authority through Treasury.
Github Link: (Will be updated after official launch)
Contract address after production is deployed (scope link)
Introducing Fizzswap's AMM-based Instant Swap Protocol
AMM is an innovative trading mechanism that evolved from order book-based DEXs to change the way we trade cryptocurrencies on-chain. Instead of buy/sell order books, liquidity pools created by liquidity providers allow traders to trade freely, and liquidity providers share any generated pool usage fees as revenue in proportion to their individual liquidity contributions. In addition, any holder of Silicon Compatible Token can become a liquidity provider.
The AMM mechanism of Fizzswap is based on the formula x * y = k where x = ETH, y = Token1 , and k = Constant Function. The token price range is set according to the quantity of each token when the corresponding liquidity pool is created. For example, if the liquidity supply of x (ETH) increases, the supply of y (Token1) decreases to maintain the constant function, k. In this way, the supply of each token in the liquidity pool is designed to fluctuate with prices set accordingly.
Structures of Services:
Fizzswap provides a seamless way to exchange one token for another at a rate determined by the ratio of token pairs within the liquidity pool.
Additionally, Fizzswap offers a "single-asset supply" option in its liquidity pool (V2, V3) services. This feature allows users to supply liquidity to a pool using a single asset, even if they only hold one of the pair tokens. The platform will automatically swap the single asset to create the required pair and add it to the pool.
Fizzswap's Supply & Borrow service allows anyone to freely supply or borrow tokens. Users can maintain liquidity without swapping assets, while simultaneously borrowing desired assets for trading.
Suppliers receive aToken and LP rewards when supplying a single token to the pool, and can leverage the supplied asset as collateral to borrow other tokens.
Borrowers pay a borrowing fee (APY) to the liquidity pool in exchange for borrowing assets. A portion of the fees paid by borrowers is distributed to suppliers as LP rewards through a smart contract.
Fizzswap supports various way of providing liquidity.
When participating in V2 pools, users receive Liquidity Provider (LP) tokens representing their share of assets in the pool. V2 participants earn a portion of the pool usage fees generated in the pool and may receive additional rewards based on their LP share.
V3 pools offer concentrated liquidity, maximizing asset efficiency. Liquidity providers can specify a price range for their supplied assets, ensuring they're only used within that range. Through the Concentrated Liquidity Market Maker (CLMM) design, providers can allocate capital more efficiently, leading to higher pool usage fees earnings.
When supplying liquidity to V3 pools, users receive V3 LP NFTs as proof of their share. Similar to V2, V3 participants earn pool usage fees and may receive additional rewards based on their LP share.
*Note that slippage (a difference in the estimated price at the point of transaction and the actual price at time of transaction) may occur in AMM-based swap protocols. In addition, a liquidity provider may experience Impermanent Loss (change in price of supplied assets compared to when they are supplied) as token prices in pools are adjusted by an AMM mechanism after the point of supply.
Please keep these risks in mind when providing liquidity or conducting transactions.
Liquidity Providers (LPs) are ecosystem participants who supply assets in V3 pools. Fizzswap manages price ranges of concentrated pool with NFT. Users will receive Fizzswap V3 LP NFTs as proof of providing liquidity when they supply assets into liquidity pools.
The NFT represents ownership of the assets supplied, so users will continue to receive pool usage fee profit from that pool while their assets remain supplied.
When assets are removed from concentrated pools, the corresponding NFTs are automatically returned as they no longer provide liquidity.







params
struct IV3Migrator.MigrateParams
The params necessary to migrate v2 liquidity, encoded as MigrateParams in calldata
function migrate(
struct IV3Migrator.MigrateParams params
) externaltoken : ERC20 token address
amountPerBlock : Amount of airdrop tokens to be distributed per block
distributableBlock : Start block Number
targets : Array of liquidity pool addresses to distribute
rates : Array of liquidity pool distribution to distribute
Deposit
Event log of airdrop tokens deposit
Parameters
amount : Deposit token amount
totalAmount : Deposit token total amount
RefixBlockAmount
Event log of distribution token amount changed
RefixDistributionRate
Event log of liquidity pool distribution rate changed
ChangeDistributionRate
Event log of distribution rate changed
Distribute
Event log of user receives an airdrop tokens
Parameters
user : user address
target : LP address
amount : token amount
currentIndex : index
userRewardSum : total token amount
event Initialized(address token, uint amountPerBlock, uint distributableBlock, address[] targets, uint[] rates);event Deposit(uint amount, uint totalAmount);event RefixBlockAmount(uint amountPerBlock);event RefixDistributionRate(address[] targets, uint[] rates);event ChangeDistributionRate(address target, uint rate);event Distribute(address user, address target, uint amount, uint currentIndex, uint userRewardSum);ProposalCreated
event ProposalCreated(uint id, address proposer, address target, string signature, bytes callData, uint startBlock, uint endBlock, string description);Events log of proposals are created
Parameters
id : proposal ID
proposer : proposer's address
target : Address of the contract to be executed
VoteCast
Events log of vote
Parameters
voter : voter's address
ProposalCanceled
Events log of proposal canceled
ProposalQueued
Events log of proposal queued
ProposalExecuted
Events log of proposal executed
ProposalFeeSet
Events log of proposal fee(KSP) changed
Liquidity providers for the V3 pool will be compensated with pool usage fees based on their LP stake in the pool. The liquidity providers can claim the distributed pool usage fee at "claimable" and receive it directly in their wallets.
For pools conducting airdrop events, liquidity providers will be compensated with airdrop tokens based on their LP stake in the pool.
V3 pool suppliers provide liquidity at specific prices where they anticipate transactions occurring, and they receive pool usage fee profits when transactions occur in their assets (liquidity). However, if the current token price is out of the price range they supplied (out of range), supplied assets will no longer be used for swaps, and they will not be able to earn rewards distributed by the pool (swap fees and reward tokens). Thus, suppliers are required to manage their assets carefully to ensure the price ranges they supplied are valid (in range).
Concentrated pools fall into three categories: In range, Caution, or Out of range.
Please refer to the V3 MIGRATION Guides and Detailed Policy

This contract produces a string containing the data URI for a JSON metadata string
Github Link: (Will be updated after official launch)
Cypress :
The Helper smart contract is a contract that helps deposit LP with single token, even if you do not bring two tokens.
Github Link: (Will be updated after official launch)
Silicon Mainnet :
1. Under the [Pool] menu at the top, click [V3Pool].
2. Select the asset pool to supply from the pool list, and click [Supply] to see the details page.
3. Set price range. There are 3 ways to adjust the price range.
① Drag the “minimum price bar” and the “maximum price bar”
② Enter the “Minimum price” and “Maximum price” in the “Set Price Range” section
③ Click the [+] button or the [-] button in the “Set Price Range” section
4. Choose whether to supply both assets or a single asset.
Notes
If a supply is made in an inactive price range (Out of range), rewards will not be distributed. In this case, suppliers can only supply using one of the pair tokens.
5. Enter the amount you wish to supply once you have checked your token balance. If you are supplying in "Estimated Returns," you can check estimated information. When confirmed, click [supply].
Notes
The information displayed is based on real-time estimates, and changes may occur while supplying. It is highly recommended that users fully understand any changes that may arise during the supply process.
6. Click the [supply] button after you have reviewed the estimated returns of the V3 pool on the "Confirm Transaction" pop-up. Once you have confirmed the information, click your wallet's [Confirm] button.
Prior to executing the supply transaction, you must agree to the Fizzswap Terms of Service by indicating your acceptance.
7. Upon completing the supply, you can check the reward information (commission, cumulative profit) in the "You Earned" and "Management." Rewards are distributed in real-time based on real-time expected returns.
The "max" button allows you to enter the maximum quantity.









signature : signature of the function to be executed
callData : function data to be executed
startBlock : start block number
endBlock : end block number
description : proposal details
proposalId : proposal IDsupport : support
votes : Number of vote vKSP
againstVotes : Number of total against vote
forVotes : Number of total favor vote
quorumVotes : Number of proposal quorum
reason : reason
Function used to propose a new proposal
Sender must have delegates above the proposal threshold
target : Target address for proposal calls
signature : Function signature for proposal calls
callData : Calldata for proposal call
description : String description of the proposal
Function used to cast a vote for a proposal
proposalId : The id of the proposal to vote on
support : The support value for the vote. false=against, true=for
event VoteCast(address voter, uint proposalId, bool support, uint votes, uint againstVotes, uint forVotes, uint quorumVotes, string reason);event ProposalCanceled(uint id);event ProposalQueued(uint id, uint eta, uint tid);event ProposalExecuted(uint id, bool succeeded);event ProposalFeeSet(uint oldProposalFee, uint proposalFee);function propose(address target, string memory signature, bytes memory callData, string memory description) public returns (uint)function castVote(uint proposalId, bool support) external token
address
The token being given priority order
priority
int256
Represents priority in ratio - higher integers get numerator priority
function tokenURI(
contract INonfungiblePositionManager positionManager,
uint256 tokenId
) external returns (string)Produces the URI describing a particular token ID for a position manager
Note this URI may be a data: URI with the JSON contents directly inlined
Parameters:
Return Values:
event UpdateTokenRatioPriority(
address token,
int256 priority
)lp : Address of LP token
token : Token address to be deposited
amount : Amount of token not to be swapped
swap : Amount of token to swap
validPool : Whether it is a pool with KSP rewards
Returns
estLP : Expected number of LP token to be minted
realInput : Actual number of input amount
estTarget : Amount of tokens to be receivedthrough swap
estimateSwapAmount
Method to change the mining weight per liquidity pair
Parameters
lp : Address of LP
token : Token address to be deposited
amount : Amount of token to be deposited
Returns
maxLP : Expected number of LP token to be minted
maxSwap : Expected amount of token to swap
addLiquidityWithETH
Method to add liquidity only providing ETH.
Parameters
lp : address of LP token
limit : Minimum amounts of LP tokens to be minted.
inputForLiquidity : Expected amount of ETH to provide LP
addLiquidityWithToken
Method to add liquidity only providing single ERC20 token.
Parameters
lp : address of LP token
function estimateLP(address lp, address token, uint amount, uint swap, bool validPool) public view returns (uint estLP, uint realInput, uint estTarget)Silicon Mainnet : 0xF54463D69B1D9AB3400A270D2a474720Cd63Fec2
ChangeCreationFee
event ChangeCreationFee(uint fee);Event that occurs when the creation fee (KSP) is changed
SetOperator
event SetOperator(address operator, bool valid);Event that occurs when setting operator
CreateDistribution
Event that occurs when airdrop is set
RemoveDistribution
Event that occurs when airdrop is removed
Deposit
Event that occurs when token deposit
RefixBlockAmount
Event that occurs when airdrop distribution amount
RefixDistributionRate
Event that occurs when airdrop distribution rate
Please be aware that the use of Fizzswap has the following risk factors.
• Fizzswap is a blockchain decentralized protocol without a central entity. Users participate in transactions through liquidity pools on the blockchain created by other users at their own responsibility and judgment. This may lead to users being unable to receive recovery support from someone or Fizzswap for the results of an user's mistake, so it is always recommended to test with a small amount first to manage the risk caused by mistakes(mistransfers, etc.).
• All assets and asset liquidity pools identified on the Fizzswap website are tokens on the Silicon chain that are self-registered by users without going through individual screening, and their safety is not guaranteed by the Fizzswap team.
• Based on the nature of the AMM (Automated Market Maker) method, the asset price a user receives on Fizzswap can vary significantly depending on the swap size, the amount(ratio) of assets currently waiting in the pool(percentage), and the changes to pool's real-time supply and removal of liquidity.
• Asset price fluctuations may cause assets to be deposited or withdrawn from the pool at prices or ratios that users did not expect. Also, if there is a price change from the price at the time of depositing in the pool, you may incur a loss when withdrawing, compared to the case that you simply hold the asset.
• All Figures displayed on the website are estimated information provided to help users make decisions, and do not guarantee the timeliness, suitability or accuracy of the data.
• A normal Fizzswap website never asks for the user's personal wallet private key, mnemonic key, and seed phrase to be entered.
• For other risk factors, precautions, and conditions of use, please check the link below.
Fizzswap is a decentralized application (DApp) based on Silicon Chain which is developed by a third party. Fizzswap is designed to provide users with an easy-to-use interface such as Fizzswap website(https://fswap.io) (Hereinafter Fizzswap and Fizzswap website are collectively referred to as the “Fizzswap”) to the decentralized protocol that integrates directly with Silicon blockchain wallet of a user, to swap various digital assets and to provide liquidity.
NOTICE: This guideline contains the terms and conditions by which you may access and use the Fizzswap. Please read this guideline carefully. By accessing or using the Fizzswap after you check this guideline, you signify that you have read, understand, and agree to be bound by the terms and conditions in its entirety.
The contents of this document can be revised at any time for the purposesreasons such as change, addition, deletion, supplementation, user protection, and error correction of Fizzswap. If the content of this document is revised, the revision will take effect from the time the changed contents is posted. However, if the content to be changed is unfavorable to the user or is a significant change, it will be posted 30 days before the effective date. If the user checks the revised document after the effective date and continues to use Fizzswap, it is deemed that such user has read, understood and agreed to the revision.
• To use Fizzswap, an user must be at least the age of majority in civil terms in his/her country (ex: 21 years of age in Singapore). Also, a user must be able to make a statement that you have full rights and authority to enter into and comply with civil agreements on behalf of yourself or any legal entity that you represent.
• An user must be able to make a statement that a user is (i) not subject to any economic or trade sanctions by any governmental authority (including, but not limited to, the Office of Foreign Assets Control of the U.S. Department of the Treasury, etc.); (ii) is not citizens or residents of any jurisdiction subject to comprehensive economic sanctions by the United state, and will not use Fizzswaps for the purpose of illegal activity conduction, promotion, or designing.
For reliable network/service while using Fizzswap, please read the following guideline carefully.
• It is recommended that you access the service with only one instance/tab.
• The service may be limited if you use multiple instances/tabs for prolonged period of time, using a public/shared IP access point and/or there is an excessive amount of connection requests.
• If you are having difficulty with connectivity for whatever reason, please close all instances/tabs and access the service after at least 1 hour before re-connecting.
Users should be aware of the following when suppling and removing assets.
• To request a transaction, the user must have a Silicon wallet to hold Silicon-based assets, along with a minimum amount of Silicon (ETH) to use for transaction fees
• Liquidity on the Silicon chain is provided with Silicon-Compatible Tokens issued on the Silicon chain. Hence, an asset that is not a Silicon-compatible Token and based on other blockchains, including but not limited to Ethereum, Ripple, BSC, must be converted into a Silicon-compatible format through bridging protocol(e.g., Oribit Bridge) prior to being deposited into Fizzswap.
Users must accurately check the asset type and address when transferring assets between wallets. If a user transfers a type of asset that is not supported by Silicon Chain, or if the required transfer address is not entered or entered incorrectly, such transfer may not be properly processed and assets may be irreversibly lost.
Please refer to the link below for more information regarding mis-transfer of assets.
• Even for some assets (e.g., Ripple, XRP) that are heterogeneous chain’s assets from Silicon, which can be transferred between wallets directly through the Fizzswap interface without going through the bridge site, the user must accurately enter the transfer address and destination tag assigned to each wallet. If the transfer address or destination tag is not entered or entered incorrectly, such transfer may not be properly processed and assets may be irreversibly lost.
• Fizzswap is a decentralized application in which the private key of user assets is not managed by a central entity. Fizzswap has such structure in which asset recovery or/and technical support from a central entity are impossible for the consequences from users' mistake or negligence including but not limited to wrong transactions described above. This structure is designed so that if a user transfers an asset incorrectly, no one, including Fizzswap, can access the asset. Due to the decentralized nature like this, capabilities and responsibilities of Fizzswap team for mis-transfer may not be similar to the support of many centralized exchanges(e.g., Upbit, Bithumb, Coinone, ect.) for technical and structural reasons
• To prevent losing assets, we recommend that users test with a small amount of assets prior to sending a larger amount.
• For supply and mis-transfer occurring as a result of using Silicon Bridge, please refer to the respective site’s policies.
You can act as a Liquidity Provider by providing liquidity to a Liquidity Pool(e.g., Single pool, V2/V3 pool) in Fizzswap; however, you must carefully evaluate and consider the risk before proceeding with the transaction, and take responsibility for your own actions and judgments.
Fizzswap works based on the AMM(Automated Market Maker) method. Price of each token within Fizzswap is determined by the liquidity pool ratio of tokens within the relevant Smart Contract. As automated Smart Contract makes adjustment to price as per the formula (x*y=k), the price shown on Fizzswap interface may not be the same as prices shown at other exchanges, and cannot be guaranteed for accurate or appropriate market prices.
• Each token price at the time a user supplies, removes, or swaps assets is determined by the above price measurement method (exchange ratio of token pairs), and the price is not directly proportional to the exchange quantity.
• In addition, as the exchange rate of token pairs momentarily changes due to the real-time participation of various participants, the price displayed on the Fizzswap website right before the transaction may change at the time of the transaction, and the price applied at the time of the actual transaction may vary. (e.g., Transactions occur in token pairs, asset supply and removal of token pairs, etc.)
• The Fizzswap Protocol has a stabilization measure so that the request can be executed only within a certain range of the exchange rate to be applied by the user in order to minimize the loss that may occur due to the large change in the current exchange rate, but you should precisely check and confirm the exchange rate applied to the time of transactions when proceeding liquidity supply, removal, and swaps.
All reward APRs displayed on Fizzswap's website, including the Liquidity Supply APR, FIZZ Distribution APR, Airdrop APR, Pool Fee APR for using the protocol, Staking APR, and Utilization APR for using a Single Liquidity (Supply), are estimates of the rewards distributed on an annualized basis, and are not guaranteed.
For more details regarding rates of returns displayed, Please refer to below link
• In particular, at 9 a.m. (KST) every day, the FIZZ APR of each liquidity pool is updated reflecting the FIZZ Mining rate aggregated from the user pool vote and the FIZZ buyback quantity per pool. At this time, the figure that indicates FIZZ distribution APR includes the quantity allocated to the vFIZZ Holder(5%), development team (5%), Treasury(5%), Partner(5%) and the rewards that users actually receive is the amount that the quantity allocated for the team is excluded.
• Fizzswap strives to provide accurate information in real time as much as possible, but the expected APR displayed in the screen may vary from the actual APR due to price fluctuations of distributed tokens, changes in liquidity pool size, and delays in transaction processes.
• For details on calculating the expected APR, please refer to the relevant documentation on the Fizzswap website.
Users can earn returns from token supply distribution rewards, and token airdrop by supplying two types of assets (pairs) on Fizzswap.
There may be delays when supplying pair liquidity. You can find out more details in the link below.
In the event that the market price of an asset that a user supplies changes significantly from its price at the time of supply, the user is more likely to receive a lower reward than if the asset was not supplied, and even incur a mark-to-market loss. These losses, however, become permanent when a user withdraws their assets from the pool (due to this nature, we refer to these losses as impermanent losses, see the link below for more information), and if the price difference between the price of the user's assets in the self-supply state before the user withdraws user's assets and the price when the user supplied user's assets to the pool is restored, then the actual loss may be reduced. Moreover, users' overall rewards should be calculated taking into accoun pool usage fee rewards. For more information on impermanent losses, please refer to the links below.
Fizzswap V3 (Version 3) has a Concentrated Liquidity function. This notice refers to the liquidity pool with centralized liquidity as the 'V3 pool' and to the liquidity pool with the previous features as the 'V2 pool'.
Due to its principle of operation, the V3 pool provides users with more freedom and choice for centralizing liquidity supply and designating a supply section and, therefore, may hold higher reward expectations and greater loss risks than the V2 pool.
The V3 pool liquidity providing risks compared to the V2 pool liquidity providing are as follows. The narrower the designated price range becomes, the higher the chance of (i) a rise in the risk of impermanent loss (IL; Impermanent Loss), (ii) a rise in the risk of changing the composition ratio and value of supplied assets (There is also the possibility that the ratio of the two assets is fixed at 100:0 at the time of removal), (iii) a rise in the likelihood of not being able to obtain supply rewards when the token's price departs from the user's specified range, (iv) a rise in the risk of loss due to price range migration (V3 to V3 migration) when the price is out of the price range. For more information, please refer to the link below.
Concentrated liquidity introduction, background and precautions (Link) V3 Pool Supply Details Policy (Link)
As the V3 pool liquidity providing has high structural complexity and is difficult to predict the risk of asset loss (particularly when the liquidity is provided in a narrow price range), it is not recommended for users with little experience in investing in virtual assets and the personality that cannot handle the possibility of loss. Users must carefully evaluate and consider the risks of concentrated liquidity before supplying and managing liquidity to liquidity pools.
Users must comply with this guide's precautions and not engage in the following actions.
• Activities that harm or disrupt the sound trading order of Fizzswap
• Activities that disrupt or negatively affect the operation of Fizzswap (including but not limited to Fizzswap interfaces, Fizzswap protocols, etc.) through automated or other fraudulent methods such as Agents, scripts, spiders, spyware, toolbars, etc.
• Activities that defame the Fizzswap team or interfere with their work
• Providing inaccurate, incorrect, or misleading information while using Fizzswap
• Activities of taking the assets of Fizzswap users or engaging in taking the authority of the user's wallet without justifiable cause
• Activities that use proceeds directly or indirectly related to all forms of criminal activity (e.g., terrorism activity, tax evasion, etc.) when using Fizzswap
• Impersonating someone other than yourself during the communication with Fizzswap support team
• Other illegal acts in violation of any applicable laws and regulations
• Fizzswap is a web-app interface that allows users to use their Silicon blockchain wallet to communicate with a decentralized protocol to swap assets and to provide liquidity. This means Fizzswap wields no control over individual Liquidity Pools, or the trust of a swap. It is the user’s responsibility to carefully consider the benefits and risks related, by taking into consideration token price ratio at the moment of swap, and all the necessary information to evaluate such risks.
• Expected APR, token price, an example of reward calculation, and all other information provided by Fizzswap interface help users make informed decisions for using Fizzswap or decentralized financial transactions such as providing liquidity, removing liquidity, and swapping. The information provided here is not a suggestion or a hint to invest or trade. Fizzswap makes a reasonable effort to deliver accurate information but does not guarantee the timeliness or accuracy of the information.
• Fizzswap is not responsible for user loss of assets, and for generating less rewards than projected, resulting from the use of Fizzswap.
• Fizzswap does not guarantee the continuity of Fizzswap service, and of the functions within. Any service or functions provided within Fizzswap can be added or deleted permanently, and Fizzswap itself may be stopped or changed. (In the case of a permanent stoppage of Fizzswap service, users that may be affected will be given a reasonable period (30days or more) and notifications/guide.)
• Fizzswap does not guarantee the reliability of Silicon blockchain platform used by Fizzswap Protocol, as well as any other third party services.
• There is no responsibility or authority on the part of Fizzswap for the contract execution technology set by a third party. Token issuing individuals or foundations that own the wallet (Deployer) with the corresponding authority, may stop, change, or suspend the execution of the token contract, and such changes may affect and limit the ability to supply or remove assets from the liquidity pool (LP) within Fizzswap. Thus, the inability to remove assets due to the execution of a specific token contract authority is unrelated to the functionality provided by Fizzswap (supplying and removing assets from autonomously created pools). Since Fizzswap does not have independent control over the user's private cryptographic keys, it is not structurally possible for Fizzswap to arbitrarily access, control, or intervene in the assets held in the liquidity pool, such as sending them to a specific address, which requires the action of the token contract holder's wallet associated with the liquidity pool pair causing the issue.
• Developers, operators and governance participants of Fizzswap do not endorse, guarantee, or assume responsibility in any way for any and all part of Fizzswap to the fullest extent permitted by law.
• Due to the complexity of software code and the nature of technology, the perfect integrity of the code cannot be guaranteed. Smart Contract codes used in Fizzswap may be susceptible to vulnerabilities which cannot be prevented by due diligence in the industry, and risks of asset loss exist(e.g., hackings or flash loan exploits utilizing those vulnerabilities).
• There is a continuous effort to maintain the block sync between Fizzswap and Silicon network; however, Fizzswap interface may be stopped without prior notice due to problems in the network resulting from transaction congestion, computer system errors and software attacks and other factors, such as natural events. Fizzswap is not guaranteed to work at all times.
• In aforementioned situations and more, there may be errors in the values/information displayed on the interface, as well as stoppage of service connection. User requests for swap, deposit, withdrawal and other transactions may be delayed or fail.
• Fizzswap, OUR DEVELOPERS, EMPLOYEES, OFFICERS, OPERATORS, AFFILIATES, AND GOVERNANCE PARTICIPANTS(HEREINAFTER, REFERRED TO AS THE “WE” OR “US” IN THIS AND NEXT SUBSECTIONS), MAKE NO WARRANTIES, EXPRESS OR IMPLIED, GUARANTEES OR CONDITIONS WITH RESPECT TO YOUR USE OF Fizzswap. YOU UNDERSTAND THAT USE OF Fizzswap IS AT YOUR OWN RISK AND THAT WE PROVIDE Fizzswap ON AN "AS IS" BASIS AND "AS AVAILABLE." YOU BEAR THE ENTIRE RISK OF USING Fizzswap. YOU ACKNOWLEDGE THAT COMPUTER, SOFTWARE, TELECOMMUNICATIONS SYSTEMS, AND BLOCKCHAIN SYSTEM ARE NOT FAULT-FREE.
• YOU UNDERSTAND AND AGREE THAT WE SHALL NOT BE LIABLE TO YOU FOR: ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL CONSEQUENTIAL OR EXEMPLARY DAMAGES WHICH MAY BE INCURRED BY YOU, HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY.. THIS SHALL INCLUDE, BUT NOT BE LIMITED TO, ANY LOSS OF PROFIT (WHETHER INCURRED DIRECTLY OR INDIRECTLY), ANY LOSS OF GOODWILL OR BUSINESS REPUTATION, ANY LOSS OF DATA SUFFERED, COST OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR OTHER INTANGIBLE LOSS. UNDER NO CIRCUMSTANCES SHALL WE BE LIABLE TO YOU FOR ANY CLAIMS, PROCEEDINGS, LIABILITIES, OBLIGATIONS, DAMAGES, LOSSES, OR COSTS IN THE AMOUNT EXCEEDING THE ABOUNT YOU PAID US IN EXCHANGE FOR ACCESS TO AND USE Fizzswap, OR USD$100.00, WHICHEVER IS GREATER. THIS LIMITATION OF LIABILITY SHALL APPLY TO THE FULLEST EXTENT PERMITTED BY LAW.
In the following cases, the measures to user's access information (e.g., wallet address, access information, etc.) to the Fizzswap website may be taken as reasonably necessary, such as being provided to a regulatory authority or judicial authority.
• When there are reasonable grounds to believe that the relevant asset is involved in hacking, money laundering, or other criminal activity
• When requested by a regulatory or judicial authority based on the applicable laws and regulations
Any dispute arising out of or in connection with these terms including any question regarding its existence, validity or termination and any dispute arising out of or in connection with users’ access or use of Fizzswap, shall be referred to and finally resolved by arbitration administered by the Singapore International Arbitration Centre (“SIAC”) in accordance with the Arbitration Rules of the Singapore International Arbitration Centre ("SIAC Rules") for the time being in force, which rules are deemed to be incorporated by reference in this clause. The seat of the arbitration shall be Seoul or Singapore. The Tribunal shall consist of one arbitrator. The language of the arbitration shall be English.
Fizzswap team has received professional security audits on Fizzswap from credible professionals in the industry, and is in its continuous effort to improve security and to minimize vulnerabilities.
Besides commercially reasonable means of communication (e.g., social media links posted on the Fizzswap website), Fizzswap can send out notices or inform its users through other commercially reasonable methods. Notices provided by Fizzswap using public communication means are effective immediately
This revision regarding the service will be effective from October 7th, 2024.
Service Agreement Change History
October 7th, 2024 : Initially declared
This contract is responsible for the ecosystem behavior related to staking RewardToken. Voting rights (vRewardToken) are issued according to the staking quantity and period.
Github Link: (Will be updated after official launch)
Silicon Mainnet :to-be
1) Users can supply assets directly by entering the pool's exchange rate (price) that corresponds with the price range they are currently supplying.
2) Users can supply when they have two assets or even just one. In the case of two asset supplies, no swap occurs, but in the case of a single asset supply (A or B), the smart contract swaps and supplies assets at the optimal ratio based on the current pool exchange rate. If a swap is required, V2 and V3 pools are used as swap paths and transaction fees apply. Fees are based on the pool's transaction fee rate.
3) Supplies are made after swap fees are subtracted. When swapping, the larger the transaction size (quantity), the greater the effect on the exchange rate between tokens in the pool, resulting in a difference between the current price and the price applied at the time of the exchange (price impact). Multiple runs in small quantities can reduce the impact.
function addLiquidityWithETH(address lp, uint limit, uint inputForLiquidity, uint targetForLiquidity) public payablefunction estimateSwapAmount(address lp, address token, uint amount) public view returns (uint maxLP, uint maxSwap, uint targetAmount)positionManager
contract INonfungiblePositionManager
The position manager for which to describe the token
tokenId
uint256
The ID of the token for which to produce a description, which may not be valid
String
string
URI of the ERC721-compliant metadata
function flipRatio() public returns (bool)function tokenRatioPriority() public returns (int256)targetAmount : Amount of tokens to be received through swap1% slippage allowed
targetForLiquidity : Expected amount of target token to provide LP
1% slippage allowed
msg.value : ETH amount of token to be provided.
token : Token address to be depositedamount : Amount of token to be deposited
limit : Minimum amounts of LP tokens to be minted.
inputForLiquidity : Expected amount of input token to provide LP
1% slippage allowed
targetForLiquidity : Expected amount of target token to provide LP
1% slippage allowed
totalAmount
uint256
Total number of tokens to be distributed by airdrop
blockAmount
uint256
Token quantity to be distributed per block
startBlock
uint256
Airdrop start block number
deposit
If there is an issue of token exhaustion or extension during the airdrop process, tokens can be recharged using the AirdropOperator's Deposit function.
When executing the function, transfer more than the amount of tokens entered into the wallet.
The token specified when creating the operator is charged.
When recharging due to exhaustion, it will be applied from the block after recharging.
refixBlockAmount
Modify the amount of tokens distributed per block
It is applied from the block after the transaction is executed.
withdraw
The remaining tokens can be withdrawn after the Airdrop plan is in progress.
Withdrawal will be made to the owner's account.
totalAmount
uint256
The total amount of airdrop
blockAmount
uint256
The airdropped amount of token per block
distributableBlock
uint256
The block number of available block
endBlock
uint256
The block number of airdrop ended
distributed
uint256
The amount of current distributed
remain
uint256
The amount of remained
created
bool
initialized
id
bytes32
The ID of the distribution
mapping(address => mapping(uint => address))
Number of distribution address each LP
distributionOperator
mapping (address => address)
Operator address each distribution address
fee
Distribution create fee
owner
owner
claim
Method that a user calls to claim the claimable airdrop tokens that has accumulated for the pair
Parameters
target : LP address
createTokenDistribution
Method of ERC20 distribution create
only Operator
depositToken
Method of KIP7 deposit to airdrop
only Operator
refixBlockAmount
Method of change the amount paid per block
only Operator
refixDistributionRate
Method of airdrop distribution rate change
only Operator
removeDistribution
Method of airdrop distribution remove
only Operator
event CreateDistribution(address operator, address token, uint totalAmount, uint blockAmount, uint blockNumber, address[] targets, uint[] rates);event RemoveDistribution(address operator, address token);event Deposit(address operator, address token, uint amount);function addLiquidityWithKCT(address lp, address token, uint amount, uint limit, uint inputForLiquidity, uint targetForLiquidity) publicfunction getDistributionId() public view returns (bytes32 id)function changeNextOwner(address _nextOwner) externalfunction changeOwner() externalfunction createDistribution(
uint256 totalAmount,
uint256 blockAmount,
uint256 startBlock
) externalfunction deposit(uint256 amount) externalfunction refixBlockAmount(uint256 blockAmount) externalfunction withdraw(address _token) externalevent RefixBlockAmount(address operator, address token, uint blockAmount);event RefixDistributionRate(address operator, address token, address[] targets, uint[] rates);function changeCreationFee(uint _fee) public function claim(address target) publicfunction createTokenDistribution(address token, uint amount, uint blockAmount, uint blockNumber, address[] memory targets, uint[] memory rates) publicfunction depositToken(address token, uint amount) publicfunction refixBlockAmount(address token, uint blockAmount) publicfunction refixDistributionRate(address token, address[] memory targets, uint[] memory rates) publicfunction removeDistribution(address operator, address token) publicuser : user address
lockPeriod :
4 months : 10,368,000
8 months : 20,736,000
12 months : 31,104,000
unlimited : 1,555,200,000
rewardTokenAmount : A Number of RewardToken
totalLockedRewardToken: Total number of staked RewardToken
totalLockedvRewardToken: Total number of users' vRewardToken
unlockTime : Available unstaking time (timestamp)
UnlockRewardToken
Event log of RewardToken unstaking
Parameters
user : user address
vRewardTokenAmount : Number of vRewardToken
rewardTokenAmount : Number of RewardToken
UnlockRewardTokenUnlimited
Event log that occurs when unstaking vRewardToken unlimited
Parameters
user : user address
vRewardTokenBefore : The amount of vRewardToken held
vRewardTokenAfter : Amount of vRewardToken held after unstaking
rewardTokenAmount : Amount of RewardToken staked
unlockTime : Available unstaking time (timestamp)
RefixBoosting
Event log of staking period is changed
Parameter
user : user address
lockPeriod : period
boostingAmount : Number of vRewardToken after period changed
unlockTime : Available unstaking time (timestamp)
ChangeMiningRate
Event log of daily RewardToken distribution rate changed
GiveReward
Event log of when mined RewardToken is claimed and distributed
Compound
Event log of when mined RewardToken restaking.
The compound amount can be entered in integer units
The amount minus the compound amount from the mined amount is returned to the wallet.
balanceOf
Number of vRewardToken tokens held by each address
getCurrentBalance
Number of vRewardToken tokens held by each address recent snapshot
getUserUnlockTime
Possible time of unstaking
lockedRewardToken
Number of RewardToken tokens stakes
mining
RewardToken distribution rate
It is a value between 0 and 10000, in units of 0.0001%
snapShotBalance
Number of vRewardToken tokens held by each address and snapshot
snapShotCount
Number of snapshot index each address
getPriorBalance
Historical user vRewardToken holdings per block
Parameter
user : user address
snapShotBalance
Historical vRewardToken holdings each address
Parameter
user : user address
lockRewardToken
Method for RewardToken staking
The amount can be entered in integer units
unlockRewardToken
Method for RewardToken unstaking
Unstaking is only possible during the unstaking period.
unlockRewardTokenUnlimited
Method for unstake RewardToken unlimited
Changed to x4 staking from execution
refixBoosting
Method for RewardToken staking period change
claimReward
Method that a user calls to claim the claimable RewardToken
compoundReward
Method for mined RewardToken staking
Can be called when the reward is 1 RewardToken or more
It is possible to stake in integer units, and the rest is to the wallet address.
event LockRewardToken(
address user,
uint256 lockPeriod,
uint256 rewardTokenAmount,
uint256 totalLockedRewardToken,
uint256 totalLockedvRewardToken,
uint256 unlockTime
)4) Depending on the transaction size, there may be a price difference (Price impact) at the time of exchange, so the expected exchange rate at the time of supply may not match the exchange rate. For this reason, suppliers are only made within the transaction range (Slippage) set at the time of the swap, and if the range is exceeded, the supply transaction may be reverted (Revert). Proceed with the supply after checking all the information on estimated returns at the bottom.
5) After-supply changes in asset composition
When assets are supplied in a specific price range, their composition ratio and value may change. Even when users hold two token positions at the time of deposit, if the current trading price of the token is out of the price range supplied, users' supplies will be converted to a position holding one asset with a lower value.
Suppose a user supplies assets in the price range of 1 ETH = 1,000 USDC to 1 ETH = 3,000 USDC in the ETH/USDC pair, and the ETH price drops below 1,000; in that case, their assets are converted into ETH tokens. In contrast, users' supplies will only be held in USDC tokens if ETH prices rise above 3,000 USDC.
Therefore, the user may receive (remove) assets with a different asset composition than at the time of the initial supply, depending on the current token price.
6) No Rewards when the pool is out of range.
In a V3 pool, assets are supplied in a specific price range where a transaction is expected to occur, and pool usage fees are distributed when the asset (liquidity) is actually traded. Therefore, if the current token trading price is out of the user-supplied price range, the rewards typically distributed in the pool will not be distributed. To obtain continuous compensation, suppliers must check the pool status (in range, caution, out of range) to see if a transaction occurs within the price range they supplied or migrate or remove the asset and re-supply it in the valid price range.
7) V3 pools, which intensively supply liquidity in a specific price range, may result in greater impermanent losses than V2 pools. If token prices fluctuate greatly, supplying within a narrow price range may result in significant impermanent losses. For this reason, suppliers should consider the possibility of impermanent loss and prepare for token price fluctuations before supplying their assets in the V3 pools.
8) V3 pool rewards (pool usage fees, KSP, and airdrop tokens) can be claimed directly from the detail page.
All rates of return (%) fluctuate according to real-time conditions, such as pool usage fees for each pool, token prices, stakes and concentration levels of users, and the active status of deposited assets.
*All examples of pool usage fee profit were based on the assumption that 100% of the pool usage fees generated from the V3 pool are distributed to liquidity providers (LPs, depositors). Therefore, distribution rates for liquidity providers may vary depending on governance.
<Policy on the Distribution of Pool Usasge Fee Profit>
* Distribution Fee = Pool usage fee * (User’s liquidity(A)/ Utilized liquidity(T))
Pool usage profit is distributed when a transaction occurs within the supplied price range and according to the percentage of the user's share of the amount of liquidity including the tick in which the transaction occurred compared to the total amount of active liquidity including containing the tick at which the transaction occurred. (Pool usage fee distributed per transaction occurrence point)
Users will have a higher liquidity stake if they deposit the same amount of assets at a narrower price range.
Let’s say a $1,000 asset is supplied in Full Range. In that case, as shown in Figure ①, the asset will be equally supplied in the entire price range (0~∞). However, when the asset is supplied in a narrower price range (Pa~Pb), as shown in Figures ② and ③, suppliers can enjoy the effect of higher liquidity supply even with the same amount of asset.
Assume that the assets are supplied into a USDT-DAI pool in only the three types of ranges mentioned above, the figure below shows their spread of liquidity.
If the token price changes from P0 to P2 due to a transaction within the pool, User A's assets will not be used in the P0 to P1 range. Instead, user A's liquidity will be used for trading in the P1 to P2 range. The share ratio of user A in the active trading liquidity in the P1 to P2 range is (user's liquidity (A)/activated liquidity (T).
Therefore, when the trading volume and scale of liquidity in the P1-P2 section is as follows, user A earns the following amount of fee:
USDT-DAI pool transaction fee rate: 0.06%
Swap Volume: $100
User A’s liquidity in the P1 to P2 range (A): $ 1,000
Total liquidity in the P1 to P2 range (B): $ 100,000
A’s pool usage fee profit = ($100*0.0006)*(1,000/100,000)= $0.0006
<Estimated Pool usage Fee Rate APR Calculation>
Calculated and displayed is the expected annual return when pool usage fees from a specific pair of V3 pools are distributed to currently active liquidity.
Suppose assets are supplied in USDT-DAI pools according to price range type (Spot, Wide, Full):
If token price is converted from P1 to P2, activated liquidity(T) in the pool is as follows:
Assuming the trade volume is between the P1 and P2 range and the liquidity size (Spot, Wide, Full range) of each price range is as follows, the expected return will be calculated as follows.
USDT-DAI Pool Fee Rate : 0.06%
Latest 24 Hour Volume: $1,000
Total liquidity of the USDT-DAI pool’s P1 to P2 range (T) : $ 100,000
Liquidity supplied when depositing in Spot range (S) : $ 27,000
Liquidity supplied when deposing in Wide range (W) : $ 4,650
Liquidity supplied when depositing in Full range (F) : $ 10
* Spot Estimated Transaction Fee APR
= Pool usa fee for the last 24 hours *(Activated Spot Liquidity (S)/ Total Activated Liquidity(T))*100*365
= $1,000*0.0006*($27,000/$100,000)*100*365 = 5,913% annually
* Wide Estimated Transaction Fee APR
= Pool fee for the last 24 hours * (Activated Wide Liquidity(W)/Total Activated Liquidity(T))*100*365
= $1,000*0.0006*($4,650/$100,000)*100*365 = 1,018% annually
* Full range Estimated Pool usage fee APR
= Pool fee for the last 24 hours * (Activated Full range Liquidity(F)/Total Activated Liquidity(T))*100*365
= $1,000*0.0006*($10/$100,000)*100*365 = 2.19% annually
Calculated and displayed is the expected annual return when the daily airdrop token quantity distributed in the V3 pool is distributed in currently active liquidity. The airdrop return rate calculation is the same as the 4) KSP Reward APR.
* Spot/Wide/Full range type’s estimated air drop APR
= Daily token distribution quantity * Token price * (Each type of activated liquidity/Total Activated Liquidity)*100*365
Airdrop tokens are distributed in real-time (based on the block creation time of Silicon Chian) to the current active liquidity, so even if the assets were supplied within the active liquidity range the previous day, users might not receive rewards if the liquidity range isn't active at the time of distribution. Therefore, users must constantly check that their assets are within the active range. When the token price falls out of range (out of range state), the asset must be migrated or re-supplied after removing to earn rewards. Check out the migration guide.
function lockRewardToken(uint amount, uint lockPeriodRequested) publicevent UnlockRewardToken(address user, uint256 vRewardTokenAmount, uint256 rewardTokenAmount);event UnlockRewardTokenUnlimited(
address user,
uint256 vRewardTokenBefore,
uint256 vRewardTokenAfter,
uint256 rewardTokenAmount,
uint256 unlockTime
);event RefixBoosting(address user, uint lockPeriod, uint boostingAmount, uint unlockTime);event ChangeMiningRate(uint _mining);event GiveReward(address user, uint amount, uint lastIndex, uint rewardSum);event Compound(address user, uint reward, uint compoundAmount, uint transferAmount, uint mintAmount);
blockNumber : prior blockNumberindex : indexfunction getPriorBalance(address user, uint blockNumber) public view returns (uint) function snapShotBalance(address user, uint index) public view returns (uint) function unlockRewardToken() publicfunction unlockRewardTokenUnlimited() publicfunction refixBoosting(uint lockPeriodRequested)function claimReward() publicfunction compoundReward() publicCalled to msg.sender after executing a swap via IUniswapV3Pool#swap.
In the implementation you must pay the pool tokens owed for the swap. The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
Parameters:
Swaps amountIn of one token for as much as possible of another token
Parameters:
Return Values:
Swaps amountIn of one token for as much as possible of another along the specified path
Parameters:
Return Values:
Swaps as little as possible of one token for amountOut of another token
Parameters:
Return Values:
Swaps as little as possible of one token for amountOut of another along the specified path (reversed)
Parameters:
Return Values:
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}struct ExactInputParams {
bytes path;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
}function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes data
) externalstruct ExactOutputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
uint160 sqrtPriceLimitX96;
}struct ExactOutputParams {
bytes path;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
}amount0Delta
int256
The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.
amount1Delta
int256
The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.
data
bytes
Any data passed through by the caller via the IUniswapV3PoolActions#swap call
params
struct ISwapRouter.ExactInputSingleParams
The parameters necessary for the swap, encoded as ExactInputSingleParams in calldata
amountOut
uint256
The amount of the received token
params
struct ISwapRouter.ExactInputParams
The parameters necessary for the multi-hop swap, encoded as ExactInputParams in calldata
amountOut
uint256
The amount of the received token
params
struct ISwapRouter.ExactOutputSingleParams
The parameters necessary for the swap, encoded as ExactOutputSingleParams in calldata
amountIn
uint256
The amount of the input token
params
struct ISwapRouter.ExactOutputParams
The parameters necessary for the multi-hop swap, encoded as ExactOutputParams in calldata
amountIn
uint256
The amount of the input token
function exactInputSingle(
struct ISwapRouter.ExactInputSingleParams params
) external returns (uint256 amountOut)function exactInput(
struct ISwapRouter.ExactInputParams params
) external returns (uint256 amountOut)function exactOutputSingle(
struct ISwapRouter.ExactOutputSingleParams params
) external returns (uint256 amountIn)function exactOutput(
struct ISwapRouter.ExactOutputParams params
) external returns (uint256 amountIn)

This contract is Fizzswap router using V2 and V3 pools. This contract can aggregate trades across V2 and V3 pools to give users access highly-flexible and personalized transactions.
Github Link: (Will be updated after official launch)
Silicon Mainnet :
This is a V2 Pool smart contract to expand ERC20 that is created with every liquidity pair. The Factory deploys this as new pool creation is requested. Although the Factory actually stores the two tokens of a pair and swapping takes place through it, the Exchange Contract must be called for liquidity to be provided or taken.
Github Link: (Will be updated after official launch)
This contract migrates position. This contract helps to deposit the assets deposited in the position and deposit them in the new position.
Github Link: (Will be updated after official launch)
Silicon Mainnet :
Welcome to the new Fizzswap protocol documentation.
This page contains the technical documentation for the new Fizzswap protocol contracts.
The contract code can be found on GitHub(fork).
to
address
Address to receive tokens after swap
path
address[]
Swap paths (token address list)
pool
address[]
Pool paths in swap (list of pool addresses)
When using V2 pool: address(0)
When using V3 pool: v3 pool address
deadline
uint256
deadline
swapExactTokensForTokens
Swaps an exact amount of input tokens for as many output tokens as possible, along the route determined by the path.
Parameters:
Return Values:
swapTokensForExactTokens
Receive an exact amount of output tokens for as few input tokens as possible, along the route determined by the path.
Parameters:
Return Values:
swapExactETHForTokens
Swaps an exact amount of ETH for as many output tokens as possible, along the route determined by the path
Parameters:
Return Values:
swapTokensForExactETH
Receive an exact amount of ETH for as few input tokens as possible, along the route determined by the path.
Parameters:
Return Values:
swapExactTokensForETH
Swaps an exact amount of tokens for as much ETH as possible, along the route determined by the path.
Parameters:
Return Values:
swapETHForExactTokens
Swaps an exact amount of tokens for as much ETH as possible, along the route determined by the path.
Parameters:
Return Values:
struct SwapParams {
address to;
address[] path;
address[] pool;
uint deadline;
}Event log of Transfer/Mint/Burn
ERC20 Standard
Event log of Approvals
Event log of mining rate change
Event log of trading fee rate changes
Event log of pairs’ mining index changes
lastMined : Factory.mined() value at the time index is updated
miningIndex : pairs’ miningIndex value at the time
Event log of when mined Governance Token is claimed and distributed
user : address of the user who claimed
amount : the amount of Governance Token claimed
lastIndex : index result of the pair of the wallet after claiming
rewardSum : The amount of Governance Token that has been accrued so far
Event log of POS transactions
token0 : token address delivered by the user
amount0 : the amount of tokens delivered by the user
token1 : token address received by the user
amount1 : the amount of tokens received by the user
Event log of NEG transactions
token0 : token address delivered by the user
amount0 : the amount of tokens delivered by the user
token1 : token address received by the user
amount1 : the amount of tokens received by the user
Event log of liquidity additions
liquidity : the amount of LP tokens minted due to additional liquidity
Event log of liquidity removals
liquidity : the amount of LP tokens burned due to liquidity removal
KlaySwap LP
"KSLP" + " " + symbolA + "-" + symbolB
18
mint/burn depending on liquidity addition/removal
Number of LP tokens held by each address
Status of approval to spender for each address
The factory address where the LP smart contract is deployed
The first token address composed of the pair
When KLAY is one part of the pair, tokenA == 0x0
The second token address composed of the pair
Transaction fee for the pair
It is a value between 0 and 100, in units of 0.01%
1 == 0.01%, 100 == 1%
The mining rate of the pair
It is a value between 0 and 100, in units of 1%
e.g. If mining is 10, the pair has claim authority for 10% of the quantity mined per block in the factory.
Factory.mined() value at the last time the pair updated the index
Index value of the last recorded pair
mapping(address => uint)
Stores the index value at the time of last reward for each user
mapping(address => uint )
Stores the cumulatively claimed KSP quantity value for each user
Returns the liquidity quantity of the two assets in the current pool
When a request is made to sell the amount of the corresponding token through a POS transaction, the expected receiving amount of the opposite token is returned.
When a request is made to purchase the amount of the corresponding token through a NEG transaction, the expected payment amount of the opposite token is returned.
KIP7 Standard
Method for KSP token transfer
KIP7 Standard
Method to transfer tokens on behalf of the approved wallet
KIP7 Standard
Method to approve transfer as much as value to the spender
Method to update the value of the pair contract based on the current Factory.mined() value
Anyone can call in real time. Even if no one calls it, it calls itself if necessary.
Method that a user calls to claim the claimable KSP that has accumulated for the pair
When called, KSP is claimed from the Factory and paid to msg.sender
Even if the method is not called directly, it is automatically called when the LP token balance of the user’s wallet changes.
Method used to provide liquidity when tokenA is KLAY
Liquidity of the KLAY msg.value and tokenB amount is provided.
After liquidity is provided, the LP token corresponding to the pool share is minted in the msg.sender wallet.
addKlayLiquidityWithLimit
Method used to provide liquidity when tokenA is KLAY
Liquidity of the KLAY msg.value and tokenB amount is provided.
Set the minimum amount of tokenA and tokenB to be used for liquidity supply using minAmountA, minAmountB.
Method used to provide liquidity when tokenA is KIP7 standard token
Liquidity of the number of tokenA amountA and tokenB amountB is provided.
After liquidity is provided, the LP token corresponding to the pool share is minted in the msg.sender wallet.
addKctLiquidityWithLimit
Method used to provide liquidity when tokenA is KIP7 standard token
Liquidity of the number of tokenA amountA and tokenB amountB is provided.
Set the minimum amount of tokenA and tokenB to be used for liquidity supply using minAmountA, minAmountB.
Returns the amount of LP tokens, and distributes the corresponding tokenA and tokenB to the msg.sender wallet
The returned LP token amount is burned
If there is claimable KSP when called, the claim proceeds to msg.sender.
removeLiquidityWithLimit
Returns the amount of LP tokens, and distributes the corresponding tokenA and tokenB to the msg.sender wallet
Set the minimum amount for the returned tokenA and tokenB amounts by using minAmountA, minAmountB.
The returned LP token amount is burned
If there is claimable KSP when called, the claim proceeds to msg.sender.
event Transfer(address indexed from, address indexed to, uint amount);event Approval(address indexed holder, address indexed spender, uint256 amount);event ChangeMiningRate(uint256 _mining);event ChangeFee(uint256 _fee);address
user address
token0
address
token0 address
token1
address
token1 address
fee
uint24
fee
burnId
uint256
tokenId of migrated position
mintId
uint256
tokenId of the newly minted position
Zap
Parameters:
user
address
user address
token0
address
token0 address
token1
address
token1 address
event MigratePosition(
address user,
address token0,
address token1,
uint24 fee,
uint256 burnId,
uint256 mintId
)user
Silicon Mainnet : 0x2aeEC787Be499ef6f68e527B64FADF969D048042
PoolCreated
event PoolCreated(
address indexed token0,
address indexed token1,
uint24 indexed fee,
int24 tickSpacing,
address pool,
uint256 exid
Emitted when a pool is created
Parameters:
Emitted when a new fee amount is enabled for pool creation via the factory
Parameters:
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
struct SwapParams calldata p
) external returns (uint256[] memory amounts)function transfer(address _to, uint _value) public returns (bool)event UpdateMiningIndex(uint lastMined, uint miningIndex);event GiveReward(address user, uint amount, uint lastIndex, uint rewardSum);event ExchangePos(address token0, uint amount0, address token1, uint amount1);event ExchangeNeg(address token0, uint amount0, address token1, uint amount1);event AddLiquidity(address user, address token0, uint amount0, address token1, uint amount1, uint liquidity);event RemoveLiquidity(address user, address token0, uint amount0, address token1, uint amount1, uint liquidity);struct MigrationParams {
uint256 tokenId;
// Burn
uint256 burnAmount0Min;
uint256 burnAmount1Min;
// Swap
address tokenIn;
uint256 swapAmountIn;
uint256 swapAmountOutMin;
// Mint
int24 tickLower;
int24 tickUpper;
uint256 mintAmount0Min;
uint256 mintAmount1Min;
uint256 deadline;
bool compoundFee;
}function migrate(
struct MigrationParams calldata params
) externalfunction zapWithETH(
struct ZappingParams memory params
) externalfunction zapWithToken(
struct ZappingParams memory params
) external event Zap(
address user,
address token0,
address token1,
uint24 fee,
uint256 amount,
bool zeroForOne,
uint256 tokenId
)





amountIn
uint256
The amount of first token required to be paid
path
address[]
The path of the swap (list of token addresses)
pool
address[]
The pool path of the swap (list of pool addresses)
When using V2 pool : address(0)
When using V3 pool : address of v3 pool
amounts
uint256[]
The input token amount and all subsequent output token amounts.
amountOut
uint256
The amount of the last token that would be received
path
address[]
The token path of the swap (list of token addresses)
pool
address[]
The pool path of the swap (list of pool addresses)
When using V2 pool : address(0)
When using V3 pool : address of v3 pool
amounts
uint256[]
The input token amount and all subsequent output token amounts.
amountIn
uint256
The amount of input tokens to paid
amountOutMin
uint256
The minimum amount of output tokens that must be received for the transaction not to revert
p
struct SwapParams
struct SwapParams for swap
amounts
uint256[]
The input token amount and all subsequent output token amounts.
amountOut
uint256
The amount of output tokens to receive
amountInMax
uint256
The maximum amount of input tokens that can be required before the transaction reverts
p
struct SwapParams
struct SwapParams for swap
amounts
uint256[]
The input token amount and all subsequent output token amounts.
msg.value
uint256
The amount of ETH to be paid
amountOutMin
uint256
The minimum amount of output tokens that must be received for the transaction not to revert
p
struct SwapParams
struct SwapParams for swap
amounts
uint256[]
The input token amount and all subsequent output token amounts.
amountOut
uint256
The amount of ETH to receive
amountInMax
uint256
The maximum amount of input tokens that can be required before the transaction reverts
p
struct SwapParams
struct SwapParams for swap
amounts
uint256[]
The input token amount and all subsequent output token amounts.
amountIn
uint256
The amount of input tokens to be paid
amountOutMin
uint256
The minimum amount of output tokens that must be received for the transaction not to revert
p
struct SwapParams
struct SwapParams for swap
amounts
uint256[]
The input token amount and all subsequent output token amounts.
amountOut
uint256
The amount of tokens to receive
msg.value (amountInMax)
uint256
The maximum amount of ETH that can be required before the transaction revert
p
struct SwapParams
struct SwapParams for swap
amounts
uint256[]
The input token amount and all subsequent output token amounts.
function getAmountsIn(
uint256 amountOut,
address[] memory path,
address[] memory pool
) public view returns (
uint256[] memory amounts
)When liquidity is removed
When LP tokens are sent
When LP tokens are received
If the pair ratio is wrong, as much liquidity as possible is supplied at the current pair ratio, and the remaining tokens are returned to msg.sender.
If there is claimable KSP when called, the claim proceeds to msg.sender.
After liquidity is provided, the LP token corresponding to the pool share is minted in the msg.sender wallet.
If the pair ratio is wrong, as much liquidity as possible is supplied at the current pair ratio, and the remaining tokens are returned to msg.sender.
If there is claimable KSP when called, the claim proceeds to msg.sender.
If the pair ratio is wrong, as much liquidity as possible is supplied at the current pair ratio, and the remaining tokens are returned to msg.sender.
If there is claimable KSP when called, the claim proceeds to msg.sender.
After liquidity is provided, the LP token corresponding to the pool share is minted in the msg.sender wallet.
If the pair ratio is wrong, as much liquidity as possible is supplied at the current pair ratio, and the remaining tokens are returned to msg.sender.
If there is claimable KSP when called, the claim proceeds to msg.sender.
int24
Maximum tick of position to deposit
zeroForOne
bool
Whether the token to be deposited is token0
mintAmount0Min
uint256
Minimum value of token0 to be minted in the position to be minted
mintAmount1Min
uint256
Minimum value of token1 to be minted in the position to be minted
tokenId
uint256
tokenId to mint as Zap
'0' on first mint
deadline
uint256
deadline
fee
uint24
fee
amount
uint256
amount to deposit
zeroForOne
bool
When depositing with token0: true
When depositing with token1: false
tokenId
uint256
tokenId of the newly issued position
tokenId
uint256
tokenId to migrate
burnAmount0Min
uint256
The minimum value of token0 you will receive upon withdrawal
burnAmount1Min
uint256
The minimum value of token1 you will receive upon withdrawal
tokenIn
address
Address of token to be swapped
swapAmountIn
uint256
token amount to be swapped
swapAmountOutMin
uint256
Minimum value of tokens to be received in swap
tickLower
int24
Minimum ticks of new positions to be minted
tickUpper
int24
Minimum ticks of new positions to be minted
mintAmount0Min
uint256
Minimum value of token0 to be minted in the new position
mintAmount1Min
uint256
Minimum value of token1 to be minted in the new position
deadline
uint256
deadline
compoundFee
bool
Whether to deposit with fees
pool
contract IUniswapV3Pool
pool address to deposit
amount
uint256
token amount to deposit
tickLower
int24
Minimum tick of position to deposit
tickUpper
uint256
The number of pools created in V3
getPoolAddress
Parameters:
idx
uint256
The index number
Return Values:
address
The address of the pool
Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
Parameters:
tokenA
address
The contract address of either token0 or token1
tokenB
address
The contract address of the other token
fee
uint24
The fee collected upon every swap in the pool, denominated in hundredths of a bip
Return Values:
pool
address
The pool address
feeAmountTickSpacing
Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled
A fee amount can never be removed, so this value should be hard coded or cached in the calling context
Parameters:
fee
uint24
The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee
Return Values:
int24
tick spacing
Parameters:
tokenA
address
One of the two tokens in the desired pool
tokenB
address
The other of the two tokens in the desired pool
fee
uint24
The desired fee for the pool
Return Values:
pool
address
The address of the newly created pool
Enables a fee amount with the given tickSpacing
Fee amounts may never be removed once enabled
Parameters:
fee
uint24
The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)
tickSpacing
int24
The spacing between ticks to be enforced for all pools created with the given fee amount
token0
address
The first token of the pool by address sort order
token1
address
The second token of the pool by address sort order
fee
uint24
The fee collected upon every swap in the pool, denominated in hundredths of a bip
tickSpacing
int24
The minimum number of ticks between initialized ticks
pool
address
fee
uint24
The enabled fee, denominated in hundredths of a bip
tickSpacing
int24
The minimum number of ticks between initialized ticks for pools created with the given fee
The address of the created pool
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
struct SwapParams calldata p
) external returns (uint256[] memory amounts)function swapExactETHForTokens(
uint256 amountOutMin,
struct SwapParams calldata p
) external payable returns (uint256[] memory amounts)function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
struct SwapParams calldata p
) external returns (uint256[] memory amounts)function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
struct SwapParams calldata p
) external returns (uint256[] memory amounts)function swapETHForExactTokens(
uint256 amountOut,
struct SwapParams calldata p
) external payable returns (uint256[] memory amounts)function getCurrentPool() public view returns (uint, uint)function estimatePos(address token, uint amount) public view returns (uint)function estimateNeg(address token, uint amount) public view returns (uint)function transferFrom(address _from, address _to, uint _value) public returns (bool)function approve(address _spender, uint _value) public returns (bool)function updateMiningIndex() publicfunction claimReward() publicfunction addKlayLiquidity(uint amount) public payablefunction addKlayLiquidityWithLimit(uint amount, uint minAmountA, uint minAmountB) public payablefunction addKctLiquidity(uint amountA, uint amountB) publicfunction addKctLiquidityWithLimit(uint amountA, uint amountB, uint minAmountA, uint minAmountB) publicfunction removeLiquidity(uint amount) publicfunction removeLiquidityWithLimit(uint amount, uint minAmountA, uint minAmountB) publicstruct ZappingParams {
contract IUniswapV3Pool pool;
uint256 amount;
int24 tickLower;
int24 tickUpper;
bool zeroForOne;
uint256 mintAmount0Min;
uint256 mintAmount1Min;
uint256 tokenId;
uint256 deadline;
}event FeeAmountEnabled(
uint24 fee,
int24 tickSpacing
)function getPoolCount() external view override returns (uint256);function createPool(
address tokenA,
address tokenB,
uint24 fee
) external returns (address pool)function getPoolAddress(uint256 idx) external view override returns (address);function getPool(
address tokenA,
address tokenB,
uint24 fee
) external view returns (address pool)function feeAmountTickSpacing(
uint24 fee
) external view returns (int24)function enableFeeAmount(
uint24 fee,
int24 tickSpacing
) externalowner will be governance smart contract (In Intial period before KSP distributed, DEV team have owner permission)
Event that completes changing the owner
Governance Contract Address
The next Governance Contract Address set in advance.
List of liquidity pool pairings
Each item saves the smart contract address of the liquidity pool
Returns if the contract for the given liquidity pool pair exists
The contract address corresponding to the tokenA, tokenB pair
When the addresses of tokenA and tokenB are inputted, this returns the contract address of the corresponding pairing
Returns the same contract address regardless of the order of the liquidity pool pairing tokens:
tokenToPool[tokenA][tokenB] == tokenToPool[tokenB][tokenA]
Returns the current number of registered liquidity pools.
Returns the liquidity pair contract address of the pair's index.
Method to set the next Owner in advance before changing Owner
only owner
Method for the next Owner to change the actual Owner
only nextOwner
A method called to add a liquidity pair with one side as ETH
Token for when the ETH-ERC20 pair to be registered has never been registered before
Parameters
Method called to add liquidity pair in case of ERC20 token pair
parameter
token0 : The address of the first token
event ChangeNextOwner(address nextOwner);event ChangeOwner(address owner);function changeNextOwner(address _nextOwner) publictokenamount : the amount of tokens (ERC20) to be provided for the initial liquidity
fee : Sets the initial fee value for liquidity pairs
A value between 0 and 100
Meaning: 0 -> 0%, 100 -> 1%
msg.value : ETH quantity to initially supply liquidity
Delivers the transaction value without specifying otherwise
amount0 : The quantity of the first token that supplies the initial liquiditytoken1 : The address of the second token
amount1 : The quantity of the second token that supplies the initial liquidity
fee : Sets the initial fee value for liquidity pairs
pool
contract IUniswapV3Pool
The address of the pool
token
address
The token being swapped in
amountIn
uint256
The desired input amount
Return Values:
amountOut
uint256
The amount of the token that would be received
sqrtPriceX96After
uint160
The sqrt price after the swap
estimateNeg
Parameters:
pool
contract IUniswapV3Pool
The address of the pool
token
address
The token being swapped out
amountOut
uint256
The desired output amount
Return Values:
amountIn
uint256
The amount required as the input for the swap in order to receive amountOut
sqrtPriceX96After
uint160
The sqrt price after the swap
estimate
Parameters:
pool
contract IUniswapV3Pool
The address of the pool
zeroForOne
bool
Is swap direction 0 -> 1?
amountSpecified
int256
The specified amount of token
Return Values:
amount0
int256
The changed amount of token0
amount1
int256
The changed amount of token1
sqrtPriceX96After
uint160
The sqrt price after the swap
function estimatePos(
struct IUniswapV3Pool pool,
address token,
uint256 amountIn
) external view returns (
uint256 amountOut,
uint160 sqrtPriceX96After
)function getPoolCount() public view returns (uint256)function getPoolAddress(uint256 idx) public view returns (address)function changeOwner() publicfunction createETHPool(address token, uint256 amount, uint256 fee) public payablefunction createTokenPool(address token0, uint256 amount0, address token1, uint256 amount1, uint256 fee) publicfunction estimateNeg(
contract IUniswapV3Pool pool,
address token,
uint256 amountOut
) external view returns (
uint256 amountIn,
uint160 sqrtPriceX96After
)function estimate(
contract IUniswapV3Pool pool,
bool zeroForOne,
int256 amountSpecified
) public view returns (int256 amount0, int256 amount1, uint160 sqrtPriceX96After) {This contract wraps Fizzswap V3 positions in the ERC721 non-fungible token interface
Github Link: (Will be updated after official launch)
Silicon Mainnet :
tokenId
uint256
The ID of the token for which liquidity was increased
liquidity
uint128
The amount by which liquidity for the NFT position was increased
amount0
uint256
The amount of token0 that was paid for the increase in liquidity
amount1
uint256
The amount of token1 that was paid for the increase in liquidity
DecreaseLiquidity
Emitted when liquidity is decreased for a position NFT
Parameters:
tokenId
uint256
The ID of the token for which liquidity was decreased
liquidity
uint128
The amount by which liquidity for the NFT position was decreased
amount0
uint256
The amount of token0 that was accounted for the decrease in liquidity
Collect
Emitted when tokens are collected for a position NFT
The amounts reported may not be exactly equivalent to the amounts transferred, due to rounding behavior
Parameters:
tokenId
uint256
The ID of the token for which underlying tokens were collected
recipient
address
The address of the account that received the collected tokens
amount0
uint256
The amount of token0 owed to the position that was collected
Returns the position information associated with a given token ID.
Throws if the token ID is not valid.
Parameters:
Return Values:
Parameters:
Return Values:
Returns the account approved for tokenId token. Requirements:
tokenId must exist.
Returns a URI describing a particular token ID
Parameters:
Return Values:
A base64 string with the URI data.
Creates a new position wrapped in a NFT
Call this when the pool does exist and is initialized. Note that if the pool is created but not initialized a method does not exist, i.e. the pool is assumed to be initialized.
Parameters:
Return Values:
Increases the amount of liquidity in a position, with tokens paid by the msg.sender
Parameters:
Return Values:
Decreases the amount of liquidity in a position and accounts it to the position
Parameters:
Return Values:
Collects up to a maximum amount of fees owed to a specific position to the recipient
Parameters:
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 Values:
Burns a token ID, which deletes it from the NFT contract. The token must have 0 liquidity and all tokens must be collected first.
Parameters:
event IncreaseLiquidity(
uint256 indexed tokenId,
uint128 liquidity,
uint256 amount0,
uint256 amount1
);event DecreaseLiquidity(
uint256 indexed tokenId,
uint128 liquidity,
uint256 amount0,
uint256 amount1
);struct MintParams {
address token0;
address token1;
uint24 fee;
int24 tickLower;
int24 tickUpper;
uint256 amount0Desired;
uint256 amount1Desired;
uint256 amount0Min;
uint256 amount1Min;
address recipient;
uint256 deadline;
}function positions(
uint256 tokenId
) external view returns (
uint96 nonce,
address operator,
address token0,
address token1,
uint24 fee,
int24 tickLower,
int24 tickUpper,
uint128 liquidity,
uint256 feeGrowthInside0LastX128,
uint256 feeGrowthInside1LastX128,
uint128 tokensOwed0,
uint128 tokensOwed1
)function mint(
struct INonfungiblePositionManager.MintParams params
) external returns (
uint256 tokenId,
uint128 liquidity,
uint256 amount0,
uint256 amount1
)event Collect(
uint256 indexed tokenId,
address recipient,
uint256 amount0,
uint256 amount1,
uint256 reward
);address
The address of the token1 for a specific pool
fee
uint24
The fee associated with the pool
tickLower
int24
The lower end of the tick range for the position
tickUpper
int24
The higher end of the tick range for the position
liquidity
uint128
The liquidity of the position
feeGrowthInside0LastX128
uint256
The fee growth of token0 as of the last action on the individual position
feeGrowthInside1LastX128
uint256
The fee growth of token1 as of the last action on the individual position
tokensOwed0
uint128
The uncollected amount of token0 owed to the position as of the last computation
tokensOwed1
uint128
The uncollected amount of token1 owed to the position as of the last computation
uint128
The cumulated amountof fee1
rewardSum
uint128
The collected amount of reward
uint256
The amount of token1
amount1
uint256
The amount of token1 that was accounted for the decrease in liquidity
amount1
uint256
The amount of token1 owed to the position that was collected
tokenId
uint256
The ID of the token that represents the position
nonce
uint96
The nonce for permits
operator
address
The address that is approved for spending
token0
address
The address of the token0 for a specific pool
tokenId
uint256
The ID of the token that represents the position
rewardGrowthInsideLastX128
uint256
The reward growth as of the last action on the individual position
reward
uint128
The uncollected amount of reward
fee0Sum
uint128
The cumulated amountof fee0
tokenId
uint256
The ID of the token that represents the minted position
params
struct INonfungiblePositionManager.MintParams
The params necessary to mint a position, encoded as MintParams in calldata
tokenId
uint256
The ID of the token that represents the minted position
liquidity
uint128
The amount of liquidity for this position
amount0
uint256
The amount of token0
params
struct INonfungiblePositionManager.IncreaseLiquidityParams
The params necessary to increase liquidity on the position, encoded as IncreaseLiquidityParams in calldata
liquidity
uint128
The new liquidity amount as a result of the increase
amount0
uint256
The amount of token0 to achieve resulting liquidity
amount1
uint256
The amount of token1 to achieve resulting liquidity
params
struct INonfungiblePositionManager.DecreaseLiquidityParams
The params necessary to decrease liquidity on the position, encoded as IncreaseLiquidityParams in calldata
amount0
uint256
The amount of token0 accounted to the position's tokens owed
amount1
uint256
The amount of token1 accounted to the position's tokens owed
params
struct INonfungiblePositionManager.CollectParams
The params necessary to collect, encoded as CollectParams in calldata
amount0
uint256
The amount of fees collected in token0
amount1
uint256
The amount of fees collected in token1
tokenId
uint256
The ID of the token that is being burned
token1
fee1Sum
amount1
struct IncreaseLiquidityParams {
uint256 tokenId;
uint256 amount0Desired;
uint256 amount1Desired;
uint256 amount0Min;
uint256 amount1Min;
uint256 deadline;
}struct DecreaseLiquidityParams {
uint256 tokenId;
uint128 liquidity;
uint256 amount0Min;
uint256 amount1Min;
uint256 deadline;
}struct CollectParams {
uint256 tokenId;
address recipient;
uint128 amount0Max;
uint128 amount1Max;
}function positionRewards(uint256 tokenId)
external
view
returns (
uint256 rewardGrowthInsideLastX128,
uint128 reward,
uint128 fee0Sum,
uint128 fee1Sum,
uint128 rewardSum
); function getApproved() public view returns (address) function tokenURI(uint256 tokenId) public view returns (string) function baseURI() public returns (string)function increaseLiquidity(
struct INonfungiblePositionManager.IncreaseLiquidityParams params
) external returns (
uint128 liquidity,
uint256 amount0,
uint256 amount1
)function decreaseLiquidity(
struct INonfungiblePositionManager.DecreaseLiquidityParams params
) external returns (uint256 amount0, uint256 amount1)function collect(
struct INonfungiblePositionManager.CollectParams params
) external returns (uint256 amount0, uint256 amount1)function burn(uint256 tokenId) externalThis contract supports all the basic requirements of a front-end offering trading of V2 Pools. The functions supported by default can be checked in the table below.
Github Link: (Will be updated after official launch)
Silicon Mainnet :
token0 : User input token0 address
amount0 : User input token0 amount
token1 : User get token1 address
amount1 : User get token1 amount
ExchangeNeg
Negative exchange Event
parameters
token0 : User input token0 address
amount0 : User input token0 amount
token1 : User get token1 address
amount1 : User get token1 amount
factory
V2Factory Contract Address
WETH
WETH Contract Address
quote
Given some asset amount and reserves, returns an amount of the other asset representing equivalent value.
getAmountIn
Returns the minimum input asset amount required to buy the given output asset amount (accounting for fees) given reserves.
getAmountOut
Given an input asset amount, returns the maximum output amount of the other asset (accounting for fees) given reserves.
getAmountsIn
Given an output asset amount and an array of token addresses, calculates all preceding minimum input token amounts by calling getReserves for each pair of token addresses in the path in turn, and using these to call getAmountIn.
getAmountsOut
Given an input asset amount and an array of token addresses, calculates all subsequent maximum output token amounts by calling getReserves for each pair of token addresses in the path in turn, and using these to call getAmountOut.
addLiquidity
Adds liquidity to an ERC-20 / ERC-20 pool.
To cover all possible scenarios, msg.sender should have already given the router an allowance of at least amount0Desired/amount1Desired on token0/token1.
Always adds assets at the ideal ratio, according to the price when the transaction is executed.
If a pool for the passed tokens does not exists, one is created automatically, and exactly amount0Desired/amount1Desired tokens are added.
Parameters
token0 : A pool token.
token1 : A pool token.
amount0Desired
addLiquidityETH
Adds liquidity to an ERC-20 / WETH pool with ETH.
To cover all possible scenarios, msg.sender should have already given the router an allowance of at least amountTokenDesired on token.
Always adds assets at the ideal ratio, according to the price when the transaction is executed.
msg.value
removeLiquidity
Removes liquidity from an ERC-20 / ERC-20 pool.
msg.sender should have already given the router an allowance of at least liquidity on the pool.
Parameters
token0
removeLiquidityETH
Removes liquidity from an ERC-20 / WETH pool and receive ETH.
msg.sender should have already given the router an allowance of at least liquidity on the pool.
Parameters
token
removeLiquidityWithPermit
Removes liquidity from an ERC-20 / ERC-20 pool without pre-approval
Parameters
token0 : A pool token.
token1
removeLiquidityETHWithPermit
Removes liquidity from an ERC-20 / WETH pool and receive ETH without pre-approval
Parameters
token : A pool token.
liquidity
swapExactTokensForTokens
Swaps an exact amount of input tokens for as many output tokens as possible, along the route determined by the path. The first element of path is the input token, the last is the output token, and any intermediate elements represent intermediate pairs to trade through (if, for example, a direct pair does not exist).
msg.sender should have already given the router an allowance of at least amountIn on the input token.
Parameters
swapTokensForExactTokens
Receive an exact amount of output tokens for as few input tokens as possible, along the route determined by the path. The first element of path is the input token, the last is the output token, and any intermediate elements represent intermediate pairs to trade through (if, for example, a direct pair does not exist).
msg.sender should have already given the router an allowance of at least amountInMax on the input token.
Parameters
swapExactETHForTokens
Swaps an exact amount of ETH for as many output tokens as possible, along the route determined by the path. The first element of path must be WETH, the last is the output token, and any intermediate elements represent intermediate pairs to trade through (if, for example, a direct pair does not exist).
Parameters
amountIn : The amount of ETH to send.
swapTokensForExactETH
Receive an exact amount of ETH for as few input tokens as possible, along the route determined by the path. The first element of path is the input token, the last must be WETH, and any intermediate elements represent intermediate pairs to trade through (if, for example, a direct pair does not exist).
msg.sender should have already given the router an allowance of at least amountInMax on the input token.
If the to address is a smart contract, it must have the ability to receive ETH.
swapExactTokensForETH
Swaps an exact amount of tokens for as much ETH as possible, along the route determined by the path. The first element of path is the input token, the last must be WETH, and any intermediate elements represent intermediate pairs to trade through (if, for example, a direct pair does not exist).
If the to address is a smart contract, it must have the ability to receive ETH.
Parameters
amountIn
swapETHForExactTokens
Receive an exact amount of tokens for as little ETH as possible, along the route determined by the path. The first element of path must be WETH, the last is the output token and any intermediate elements represent intermediate pairs to trade through (if, for example, a direct pair does not exist).
Leftover ETH, if any, is returned to msg.sender.
Parameters
claimReward
Method that a user calls to claim the claimable RewardToken that has accumulated for the pair
Parameters
pair : Pairs that paid liquidity.
deadline
event ExchangePos(address token0, uint amount0, address token1, uint amount1);event ExchangeNeg(address token0, uint amount0, address token1, uint amount1);function addLiquidity(
address token0,
address token1,
uint amount0Desired,
uint amount1Desired,
uint amount0Min,
uint amount1Min,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);amount1Desired: : The amount of tokenB to add as liquidity if the token0/token1 price is <= amountADesired/amountBDesired .
amount0Min : Bounds the extent to which the B/A price can go up before the transaction reverts. Must be <= amount0Desired.
amount1Min : Bounds the extent to which the A/B price can go up before the transaction reverts. Must be <= amount1Desired.
to : Recipient of the liquidity tokens.
deadline : Unix timestamp after which the transaction will revert.
amount0 : The amount of token0 sent to the pool.
amount1: The amount of token1 sent to the pool.
liquidity : The amount of liquidity tokens minted.
Leftover ETH, if any, is returned to msg.sender.
If a pool for the passed token and WETH does not exists, one is created automatically, and exactly amountTokenDesired/msg.value tokens are added.
Parameters
token : A pool token.
amountTokenDesired : The amount of token to add as liquidity if the WETH/token price is <= msg.value/amountTokenDesired.
amountETHDesired: : The amount of ETH to add as liquidity if the token/WETH price is <= amountTokenDesired/msg.value.
amountTokenMin : Bounds the extent to which the WETH/token price can go up before the transaction reverts. Must be <= amountTokenDesired.
amountETHMin : Bounds the extent to which the token/WETH price can go up before the transaction reverts. Must be <= msg.value.
to : Recipient of the liquidity tokens.
deadline : Unix timestamp after which the transaction will revert.
amountToken : The amount of token sent to the pool.
amountETH: The amount of ETH converted to WETH and sent to the pool.
liquidity : The amount of liquidity tokens minted.
token1 : A pool token.
liquidity : The amount of liquidity tokens to remove.
amount0Min : The minimum amount of tokenA that must be received for the transaction not to revert..
amount1Min : The minimum amount of tokenB that must be received for the transaction not to revert.
to : Recipient of the underlying assets.
deadline : Unix timestamp after which the transaction will revert.
amount0 : The amount of token0 received.
amount1: The amount of token1 received.
liquidity : The amount of liquidity tokens to remove.
amountTokenMin : The minimum amount of token that must be received for the transaction not to revert.
amountETHMin : The minimum amount of ETH that must be received for the transaction not to revert.
to : Recipient of the underlying assets.
deadline : Unix timestamp after which the transaction will revert.
amount0 : The amount of token received.
amount1: The amount of ETH received.
liquidity : The amount of liquidity tokens to remove.
amount0Min : The minimum amount of token0 that must be received for the transaction not to revert.
amount1Min : The minimum amount of token1 that must be received for the transaction not to revert.
to : Recipient of the underlying assets.
deadline : Unix timestamp after which the transaction will revert.
approveMax : Whether or not the approval amount in the signature is for liquidity or uint(-1).
v : The v component of the permit signature.
r : The r component of the permit signature.
s : The s component of the permit signature.
amount0 : The amount of token0 received.
amount1 : The amount of token1 received.
amountTokenMin : The minimum amount of token that must be received for the transaction not to revert.
amountETHMin : The minimum amount of ETH that must be received for the transaction not to revert.
to : Recipient of the underlying assets.
deadline : Unix timestamp after which the transaction will revert.
approveMax : Whether or not the approval amount in the signature is for liquidity or uint(-1).
v : The v component of the permit signature.
r : The r component of the permit signature.
s : The s component of the permit signature.
amountToken : The amount of token received.
amountETH : The amount of ETH received.
amountIn : The amount of input tokens to send.
amountOutMin : The minimum amount of output tokens that must be received for the transaction not to revert.
path : An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
to : Recipient of the output tokens.
deadline : Unix timestamp after which the transaction will revert.
amounts : The input token amount and all subsequent output token amounts.
amountOut : The amount of output tokens to send.
amountInMax : The maximum amount of input tokens that can be required before the transaction reverts.
path : An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
to : Recipient of the output tokens.
deadline : Unix timestamp after which the transaction will revert.
amounts : The input token amount and all subsequent output token amounts.
amountOutMin : The minimum amount of output tokens that must be received for the transaction not to revert.path : An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
to : Recipient of the output tokens.
deadline : Unix timestamp after which the transaction will revert.
amounts : The input token amount and all subsequent output token amounts.
amountOut : The amount of output ETH to send.
amountInMax : The maximum amount of input tokens that can be required before the transaction reverts.
path : An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
to : Recipient of the ETH.
deadline : Unix timestamp after which the transaction will revert.
amounts : The input token amount and all subsequent output token amounts.
amountOutMin : The minimum amount of output tokens that must be received for the transaction not to revert.
path : An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
to : Recipient of the output ETH.
deadline : Unix timestamp after which the transaction will revert.
amounts : The input token amount and all subsequent output token amounts.
amountOut : The amount of tokens to receive.
amountInMax : The maximum amount of ETH that can be required before the transaction reverts.
path : An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
to : Recipient of the output tokens.
deadline : Unix timestamp after which the transaction will revert.
amounts : The input token amount and all subsequent output token amounts.
function quote(uint amount0, uint reserve0, uint reserve1) internal pure returns (uint amount1);function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn);function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut);function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts);function getAmountsOut(uint amountIn, address[] memory path) internal view returns (uint[] memory amounts);function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);function removeLiquidity(
address token0,
address token1,
uint liquidity,
uint amount0Min,
uint amount1Min,
address to,
uint deadline
) external returns (uint amount0, uint amount1);function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);function removeLiquidityWithPermit(
address token0,
address token1,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amount0, uint amount1);function removeLiquidityWithPermit(
address token0,
address token1,
uint liquidity,
uint amount0Min,
uint amount1Min,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amount0, uint amount1);function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);function claimReward(address pair, uint deadline) externalParameters:
sqrtPriceX96
uint160
The initial sqrt price of the pool, as a Q64.96
tick
int24
The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
Emitted when liquidity is minted for a given position
Parameters:
sender
address
The address that minted the liquidity
owner
address
The owner of the position and recipient of any minted liquidity
tickLower
int24
The lower tick of the position
Emitted when fees are collected by the owner of a position
Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
Parameters:
owner
address
The owner of the position for which fees are collected
tickLower
int24
The lower tick of the position
tickUpper
int24
The upper tick of the position
Emitted when a position's liquidity is removed
Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
Parameters:
owner
address
The owner of the position for which liquidity is removed
tickLower
int24
The lower tick of the position
tickUpper
int24
The upper tick of the position
Emitted by the pool for any swaps between token0 and token1
Parameters:
sender
address
The address that initiated the swap call, and that received the callback
recipient
address
The address that received the output of the swap
amount0
int256
The delta of the token0 balance of the pool
IncreaseObservationCardinalityNext
Emitted by the pool for increases to the number of observations that can be stored
observationCardinalityNext is not the observation cardinality until an observation is written at the index just before a mint/swap/burn.
Parameters:
observationCardinalityNextOld
uint16
The previous value of the next observation cardinality
observationCardinalityNextNew
uint16
The updated value of the next observation cardinality
The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
Return Values:
The first of the two tokens of the pool, sorted by address
Return Values:
The second of the two tokens of the pool, sorted by address
Return Values:
The pool's fee in hundredths of a bip, i.e. 1e-6
Return Values:
The pool tick spacing
Ticks can only be used at multiples of this value, minimum of 1 and always positive e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ... This value is an int24 to avoid casting even though it is always positive.
Return Values:
This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
Return Values:
Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
Snapshots must only be compared to other snapshots, taken over a period for which a position existed. I.e., snapshots cannot be compared if a position is not held for the entire period between when the first snapshot is taken and the second snapshot is taken.
Parameters:
Return Values:
Returns the cumulative tick and liquidity as of each timestamp secondsAgo from the current block timestamp
To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick, you must call it with secondsAgos = [3600, 0]. The time weighted average tick represents the geometric time weighted average price of the pool, in log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
Parameters:
Return Values:
The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas when accessed externally.
Return Values:
The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
This value can overflow the uint256
The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
This value can overflow the uint256
The currently in range liquidity available to the pool
This value has no relationship to the total liquidity across all ticks
Look up information about a specific tick in the pool
Parameters:
Return Values:
Returns the information about a position by the position's key
Parameters:
Return Values:
Returns the cumulative tick and liquidity as of each timestamp secondsAgo from the current block timestamp
To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick, you must call it with secondsAgos = [3600, 0]. The time weighted average tick represents the geometric time weighted average price of the pool, in log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
Parameters:
Return Values:
Returns data about a specific observation index
You most likely want to use #observe() instead of this method to get an observation as of some amount of time ago, rather than at a specific index in the array.
Parameters:
Return Values:
Increase the maximum number of price and liquidity observations that this pool will store
This method is no-op if the pool already has an observationCardinalityNext greater than or equal to the input observationCardinalityNext.
Parameters:
Sets the initial price for the pool
not locked because it initializes unlocked
Parameters:
Adds liquidity for the given recipient/tickLower/tickUpper position
noDelegateCall is applied indirectly via _modifyPosition
Parameters:
Return Values:
Collects tokens owed to a position
Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity. Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
Parameters:
Return Values:
Burn liquidity from the sender and account tokens owed for the liquidity to the position
noDelegateCall is applied indirectly via _modifyPosition
Parameters:
Return Values:
Swap token0 for token1, or token1 for token0
The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
Parameters:
Return Values:
Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
Snapshots must only be compared to other snapshots, taken over a period for which a position existed. I.e., snapshots cannot be compared if a position is not held for the entire period between when the first snapshot is taken and the second snapshot is taken.
Parameters:
Return Values:
event Initialize(
uint160 sqrtPriceX96,
int24 tick
)event Mint(
address sender,
address owner,
int24 tickLower,
int24 tickUpper,
uint128 amount,
uint256 amount0,
uint256 amount1
)function factory() external view returns (address)function increaseObservationCardinalityNext(
uint16 observationCardinalityNext
) external; event Collect(
address owner,
int24 tickLower,
int24 tickUpper,
uint128 amount0,
uint128 amount1
)event Burn(
address owner,
int24 tickLower,
int24 tickUpper,
uint128 amount,
uint256 amount0,
uint256 amount1
)event Swap(
address sender,
address recipient,
int256 amount0,
int256 amount1,
uint160 sqrtPriceX96,
uint128 liquidity,
int24 tick
)event IncreaseObservationCardinalityNext(
uint16 observationCardinalityNextOld,
uint16 observationCardinalityNextNew
)uint16
The current maximum number of observations stored in the pool,
observationCardinalityNext
uint16
The next maximum number of observations, to be updated when the observation.
feeProtocol
uint8
* unused *
unlocked
bool
Whether the pool is currently locked to reentrancy
uint256
the fee growth on the other side of the tick from the current tick in token1, feeGrowthOutsideX128 values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0. In addition, these values are only relative and are used to compute snapshots.
tickCumulativeOutside
int56
secondsPerLiquidityOutsideX128
uint160
secondsOutside
uint32
initialized
bool
rewardGrowthOutsideX128
uint256
the reward growth on the other side of the tick from the current tick
uint128
the computed amount of token0 owed to the position as of the last mint/burn/poke,
tokensOwed1
uint128
the computed amount of token1 owed to the position as of the last mint/burn/poke
rewardGrowthInsideLastX128
uint256
reward growth inside the tick range as of the last mint/burn/poke,
rewardOwed
uint128
the computed amount of reward owed to the position as of the last mint/burn/poke,
bool
whether the observation has been initialized and the values are safe to use
uint128
The amount of liquidity to mint
data
bytes
Any data that should be passed through to the callback
uint128
How much token0 should be withdrawn from the fees owed
amount1Requested
uint128
How much token1 should be withdrawn from the fees owed
uint160
The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this value after the swap. If one for zero, the price cannot be greater than this value after the swap
data
bytes
Any data to be passed through to the callback
tickUpper
int24
The upper tick of the position
amount
uint128
The amount of liquidity minted to the position range
amount0
uint256
How much token0 was required for the minted liquidity
amount1
uint256
How much token1 was required for the minted liquidity
amount0
uint128
The amount of token0 fees collected
amount1
uint128
The amount of token1 fees collected
amount
uint128
The amount of liquidity to remove
amount0
uint256
The amount of token0 withdrawn
amount1
uint256
The amount of token1 withdrawn
amount1
int256
The delta of the token1 balance of the pool
sqrtPriceX96
uint160
The sqrt(price) of the pool after the swap, as a Q64.96
liquidity
uint128
The liquidity of the pool after the swap
tick
int24
The log base 1.0001 of price of the pool after the swap
address
contract address
address
token contract address
address
token contract address
uint24
fee
int24
tick spacing
uint128
max amount of liquidity per tick
tickLower
int24
The lower tick of the range
tickUpper
int24
The upper tick of the range
tickCumulativeInside
int56
The snapshot of the tick accumulator for the range
secondsPerLiquidityInsideX128
uint160
The snapshot of seconds per liquidity for the range
secondsInside
uint32
The snapshot of seconds per liquidity for the range
secondsAgos
uint32[]
From how long ago each cumulative tick and liquidity value should be returned
tickCumulatives
int56[]
Cumulative tick values as of each secondsAgos from the current block timestamp
secondsPerLiquidityCumulativeX128s
uint160[]
Cumulative seconds per liquidity-in-range value as of each secondsAgos from the current block
sqrtPriceX96
uint160
The current price of the pool as a sqrt(token1/token0) Q64.96 value
tick
int24
The current tick of the pool, i.e. according to the last tick transition that was run. This value may not always be equal to SqrtTickMath getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick boundary.
observationIndex
uint16
The index of the last oracle observation that was written,
tick
int24
The tick to look up
liquidityGross
uint128
the total amount of position liquidity that uses the pool either as tick lower or tick upper,
liquidityNet
int128
how much liquidity changes when the pool price crosses the tick,
feeGrowthOutside0X128
uint256
the fee growth on the other side of the tick from the current tick in token0,
key
bytes32
The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
liquidity
uint128
The amount of liquidity in the position,
feeGrowthInside0LastX128
uint256
fee growth of token0 inside the tick range as of the last mint/burn/poke,
feeGrowthInside1LastX128
uint256
fee growth of token1 inside the tick range as of the last mint/burn/poke,
secondsAgos
uint32[]
From how long ago each cumulative tick and liquidity value should be returned
tickCumulatives
int56[]
Cumulative tick values as of each secondsAgos from the current block timestamp
secondsPerLiquidityCumulativeX128s
uint160[]
Cumulative seconds per liquidity-in-range value as of each secondsAgos from the current block timestamp
index
uint256
The element of the observations array to fetch
blockTimestamp
uint256
The timestamp of the observation,
tickCumulative
int56
the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
secondsPerLiquidityCumulativeX128
uint160
the seconds per in range liquidity for the life of the pool as of the observation timestamp
observationCardinalityNext
uint16
The desired minimum number of observations for the pool to store
sqrtPriceX96
uint160
the initial sqrt price of the pool as a Q64.96
recipient
address
The address for which the liquidity will be created
tickLower
int24
The lower tick of the position in which to add liquidity
tickUpper
int24
The upper tick of the position in which to add liquidity
amount0
uint256
The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
amount1
uint256
The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
recipient
address
The address which should receive the fees collected
tickLower
int24
The lower tick of the position for which to collect fees
tickUpper
int24
The upper tick of the position for which to collect fees
amount0
uint128
The amount of fees collected in token0
amount1
uint128
The amount of fees collected in token1
tickLower
int24
The lower tick of the position for which to burn liquidity
tickUpper
int24
The upper tick of the position for which to burn liquidity
amount
uint128
How much liquidity to burn
amount0
uint256
The amount of token0 sent to the recipient
amount1
uint256
The amount of token1 sent to the recipient
recipient
address
The address to receive the output of the swap
zeroForOne
bool
The direction of the swap, true for token0 to token1, false for token1 to token0
amountSpecified
int256
The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
amount0
int256
The delta of the balance of token0 of the pool, exact when negative, minimum when positive
amount1
int256
The delta of the balance of token1 of the pool, exact when negative, minimum when positive
tickLower
int24
The lower tick of the range
tickUpper
int24
The upper tick of the range
tickCumulativeInside
int56
The snapshot of the tick accumulator for the range
secondsPerLiquidityInsideX128
uint160
The snapshot of seconds per liquidity for the range
secondsInside
uint32
The snapshot of seconds per liquidity for the range
observationCardinality
feeGrowthOutside1X128
tokensOwed0
initialized
amount
amount0Requested
sqrtPriceLimitX96
function token0() external view returns (address)function token1() external view returns (address)function fee() external view returns (uint24)function tickSpacing() external view returns (int24)function maxLiquidityPerTick() external view returns (uint128)The maximum amount of position liquidity that can use any tick in the rangefunction snapshotCumulativesInside(
int24 tickLower,
int24 tickUpper
) external view returns (
int56 tickCumulativeInside,
uint160 secondsPerLiquidityInsideX128,
uint32 secondsInside
)function observe(
uint32[] secondsAgos
) external view returns (
int56[] tickCumulatives,
uint160[] secondsPerLiquidityCumulativeX128s
)function slot0() external view returns (
uint160 sqrtPriceX96,
int24 tick,
uint16 observationIndex,
uint16 observationCardinality,
uint16 observationCardinalityNext,
uint8 feeProtocol,
bool unlocked
)function feeGrowthGlobal0X128() external view returns (uint256)function feeGrowthGlobal1X128() external view returns (uint256)function liquidity() external view returns (uint128)function ticks(
int24 tick
) external view returns (
uint128 liquidityGross,
int128 liquidityNet,
uint256 feeGrowthOutside0X128,
uint256 feeGrowthOutside1X128,
int56 tickCumulativeOutside,
uint160 secondsPerLiquidityOutsideX128,
uint32 secondsOutside,
bool initialized,
uint256 rewardGrowthOutsideX128
)function positions(
bytes32 key
) external view returns (
uint128 liquidity,
uint256 feeGrowthInside0LastX128,
uint256 feeGrowthInside1LastX128,
uint128 tokensOwed0,
uint128 tokensOwed1,
uint256 rewardGrowthInsideLastX128,
uint128 rewardOwed
)function observe(
uint32[] secondsAgos
) external view returns (
int56[] tickCumulatives,
uint160[] secondsPerLiquidityCumulativeX128s
)function observations(
uint256 index
) external view returns (
uint32 blockTimestamp,
int56 tickCumulative,
uint160 secondsPerLiquidityCumulativeX128,
bool initialized
)function initialize(
uint160 sqrtPriceX96
) external;function mint(
address recipient,
int24 tickLower,
int24 tickUpper,
uint128 amount,
bytes data
) external returns (uint256 amount0, uint256 amount1)function collect(
address recipient,
int24 tickLower,
int24 tickUpper,
uint128 amount0Requested,
uint128 amount1Requested
) external returns (uint128 amount0, uint128 amount1)function burn(
int24 tickLower,
int24 tickUpper,
uint128 amount
) external returns (uint256 amount0, uint256 amount1)function swap(
address recipient,
bool zeroForOne,
int256 amountSpecified,
uint160 sqrtPriceLimitX96,
bytes data
) external returns (int256 amount0, int256 amount1)function snapshotCumulativesInside(
int24 tickLower,
int24 tickUpper
) external returns (
int56 tickCumulativeInside,
uint160 secondsPerLiquidityInsideX128,
uint32 secondsInside
)