What is Sea Swap
Last updated
Last updated
Sea Swap is an on-chain system of smart contracts on the Sei Network that leverages CosmWasm. These smart contracts implement an automated market maker (AMM) protocol based on the constant product formula.
What is a DEX?
Traditional exchanges require professional market makers to handle orders, and are limited by the frequency with which they can quote the best prices. Decentralized exchanges (DEXs) allow for cryptocurrency transactions to take place online, securely, and without the need for an intermediary. Users can swap between tokens in a liquidity pool (e.g., SEA for SEI in a SEA/SEI pool). In a nutshell, DEXs provide users with a simple, fast, affordable, and secure way to swap tokens in a permissionless and decentralized environment.
DEXs rely on automated market maker (AMM) protocols, which use mathematical formulas to price assets. This formula can vary between protocols. For example, Sea Swap's constant product AMM satisfies the equation:
where x and y are the two token reserves in the liquidity pool and k is constant unless liquidity is deposited or withdrawn from the pool. You can think of AMMs as peer-to-contract (P2C) - there is no need for counterparties in the traditional sense, as swaps happen between users and contracts.
AMMs incentivize users to provide liquidity. Liquidity is the ability to convert one asset into another asset without changing its market price. Liquidity providers add funds to liquidity pools. You can think of a liquidity pool as a big pile of funds that traders can trade against. In the case of Sea Swap, liquidity providers deposit an equivalent value of two tokens, e.g., $500 of $SEA and $500 of $SEI, into a $SEA-$SEI pool in exchange for LP tokens. In doing so, they are adding liquidity to that pool.
Upon providing liquidity to a pool, LP tokens can then be staked in SEA Dex staking modules. Each module on the protocol corresponds to a liquidity pool (e.g., SEA-SEI) and receives weighted token emissions from the farm contract. Farming helps improve the capital efficiency of assets by utilizing idle LP pairs to generate yield.
You will need to deposit two tokens - in equal value parts - into the corresponding liquidity pool. Tokens can be obtained from secondary markets or through the DEX. For example, if you wanted to obtain SEA, you would swap SEI in the SEA/SEI pool.