# dex

Decentralized Exchanges are protocols built on blockchains that allow people to trade crypto using Automated Market Makers

+ Related tags
All
DeFi
Resources

Ambient

Ambient (previously known as CrocSwap) is a DEX that is run in a single smart contract, where individual AMM (automated market maker) pools are included in the same contract instead of being separate smart contracts. Ambient single-contract architecture is designed to reduce gas and taxes while allowing users to seamlessly manage collateral in a single platform. Ambient was developed as a new codebase that provides various different features compared to other DEXes. The team believes that the economics of AMMs are "broken", which causes liquidity to be centralized and controlled by very few. In order to change this, Ambient built their protocol from the ground-up allowng for deeper and varied types of liquidity and introduced various features and quality of life improvements vs other DEXes. These features include: * Gas savings vs other competing DEXes * Gasless transactions - users can pay in the swapped token instead of ETH for gas (using the EIP-712 off-chain standard) * Permissioned pools * Different types of liquidity - Concentrated (similar to UniV3), ambient (similar to UniV2), and knockout (similar to limit orders) * Dynamically adjusted pool fees

Uniswap

Uniswap is a decentralized exchange protocol (DEX). It allows people to set up or contribute to liquidity pools consisting of various ERC-20 token pairs, or to use the available liquidity to swap their tokens against another using its Automated Market Maker (AMM) mechanism. ### Why AMMS are one of the building blocks in the crypto space as they always provide users with a price between two assets. Uniswap uses a simple X * Y = K, formula to price assets where x is the amount of one token in the liquidity pool, and y is the amount of the other. k is a fixed constant, meaning the pool’s total liquidity is always the same. ### Risk There are various risks involved with using AMMS. These include but are not limited to: Protocol Risk - risk due to mechanics in the design of a protocol. Even when the protocol functions as intended there might be risks e.g. high slippage incurred in trades due to the liquidity curve set-up Smart contract risk - This is risk from an error in the code causing the contract to operate in ways unexpected by the developers. It might leave the code vulnerable to exploits or other attacks Cybersecurity risk - Hackers, Exploiters or other malicious actors trying to attack Uniswap ### Reward Uniswap is arguably one of the largest AMMs in crypto and is usually the protocol where tokens find the most liquidity. Its UI/UX is extremely simple and users can trade most tokens with little problems.

Articles and documentation