Discover more from Shoal Research
Ambient Finance: Enhancing AMM efficiency
Ambient is an Decentralized Exchange - AMM focused on enhancing LP and trader capital efficiency.
Shoal Research Contributors:
Automated market makers (AMMs) are the foundation of decentralized finance (DeFi), revolutionizing trading by offering users 24/7 access to asset trading, market creation, and yield generation without intermediaries. Since their inception, AMMs have facilitated trading volumes exceeding trillions of dollars. Although AMMs have managed to bootstrap enough liquidity to facilitate the aforementioned trading volume, there has always been a looming threat to the sustainability of AMMs over the long term and, thus, decentralized finance as a whole. Despite the idea that LPs should profit from participating in DeFi, the benefits (i.e., trading fees) are outweighed by the costs (i.e., impermanent loss) for some LPs. Impermanent loss (IL) is the lost opportunity to provide liquidity as opposed to holding assets outright instead of providing liquidity. IL occurs when the prices of the pooled tokens (LP tokens deposited) change.
Thanks for reading Shoal Research! Subscribe for free to receive new posts and support my work.
Fortunately, the world of DeFi is characterized by its fast pace, constant evolution, and protocols that aim to confront the global accessibility of financial products. In this report, we will explore the fundamental AMM designs of Ambient - the original singleton AMM built directly on Ethereum's network. We aim to shed light on the most captivating features we have encountered and how they ultimately support the sustainability and broader adoption of DeFi. So, let's dive in and begin our exploration without further ado.
Defying Layer-1 Limitations
Let's face it - AMMs and DEXs exclusively built on Ethereum face significant headwinds due to relatively high gas fees on the layer-1 network. This drives the majority of 'modern' DeFi protocols to launch with support for various layer-2 networks such as Arbitrum. Ambient has defied this trend and opted to initially support transactions on the Ethereum network only.
Despite Ethereum's network congestion obstacles, Ambient has achieved notable success across various metrics, especially since the start of summer 2023. Between early June and late July, Ambient's TVL increased approximately thirteenfold—volume on Ambient paints a similar story of success. On June 13th, Ambient hosted roughly $36,000 in volume. By July 14th, Ambient reached its highest daily volume of $1,410,000.
While Ambient offers traders a handful of notable features, including the ability to place limit orders and pay gas fees in any ERC-20 token, if you're wondering what propelled the success of Ambient – it is largely attributable to its singleton AMM model. Let's look at Ambient's structure and how it offers incremental innovation for LPs and traders alike.
The Original Singleton AMM
Ambient, previously known as CrocSwap, is a decentralized transaction protocol that enables a unique kind of automated market maker. Ambient is a singleton AMM, meaning it operates within a single smart contract, making swaps more efficient. The use of a single, smart contract results in one enormous benefit to traders and, ultimately, LPs - a significant reduction in gas fees involved with multi-hop swaps.
For context, when using an AMM, trades are executed using one of two swap types: a single-hop swap and a multi-hop swap. A single hop swap is a simple trade route that involves a direct swap of token A to token B through a single pool. On the other hand, a multi-hop swap requires a trade to be routed across multiple pools. Multi-hop swaps are only executed in the event that a single-hop swap cannot be used to fill the order, as single-hop swaps incur far fewer gas fees. Most AMMs are structured in a manner where every pool has its own smart contract, which makes the execution of multi-hop swaps across multiple pools quite expensive in terms of gas fees.
Since Ambient is a singleton AMM, every pool operates within a single smart contract, which allows it to execute multi-hop swaps far more efficiently than traditional AMMs. Ambient does not transfer any intermediate tokens involved in multi-hop swaps, which significantly lowers gas used in the process of executing trades compared to other AMMs. In theory, as gas fees required to execute a trade lowers for traders, the sheer number of trades across the AMM should increase. This results in more trading fees that are distributed to LPs. Lower gas fees are especially attractive for sophisticated arbitrageurs, as prices are maintained through arbitrage trading activity. Ultimately, traders enjoy lower gas fees and efficiently priced markets, and LPs benefit from trading fees due to an overall increase in trading activity.
The singleton model has now been adopted by the likes of Uniswap, which recently introduced a similar model in the Uniswap v4 papers. Further confirmation Ambient is on the right track pushing innovative design mechanisms to the AMM space.
Ambient’s Liquidity Pools
Ambient is at the forefront of optimizing the experience for liquidity providers (LPs). Since the start of DeFi and even now, impermanent loss is a constant burden for LPs. In order to eliminate the headaches LPs faced in the past, Ambient supports two types of LP positions; Ambient liquidity and concentrated liquidity. By leveraging two types of LP product offerings, Ambient upgrades liquidity provision for seasoned LPs while also onboarding a new cohort of DeFi participants through an optimal LP experience.
Users who want to customize how and when their capital is used can choose concentrated liquidity. The LP specifies the price range that determines when their liquidity is provided to liquidity pools, meaning the LP only accrues fees generated from trading pairs when the underlying assets' prices are within the specified price range. When the underlying assets' prices are outside the range, the liquidity is not active within the pool, and the LP stops receiving a portion of trading fees.
Concentrated Liquidity Shape
Concentrated liquidity caters to more sophisticated LPs as it requires more DeFi knowledge and experience and is generally the most capital-efficient LP position type supported by Ambient. Ambient liquidity is the other type of LP position supported by Ambient, which caters to all DeFi users as it does not involve specifying a price range, and is better for illiquid assets. Ambient mode uses the constant product, where liquidity is active across all prices of the underlying assets in the liquidity pool.
Constant Product Liquidity Shape
Regardless of which liquidity position type an Ambient LP decides to use, all Ambient LPs benefit from the protocol's use of smart contracts known as 'hooks.' Hooks allow Ambient to continually modify existing liquidity pool parameters, including liquidity fees. Hooks are especially interesting to LPs because they ensure they can maximize capital efficiency and automatically receive the optimal fee tier. For Ambient, liquidity fees are adjusted dynamically in response to market activity.
Concentrated and constant product liquidity are not without their flaws. Traders could suffer significant slippage (price impact) if asset prices move out of supported concentrated liquidity ranges. On the flip side, constant product liquidity is spread thin across all prices which is good for traders, however LPs don’t benefit from enhanced capital efficiency by selecting a specific price range. Ambient interrogates these two design mechanisms and combines both pools under the singleton contract. Combining both liquidity strategies allows LPs to maintain capital efficiency while traders maintain cheaper swaps, and deeper liquidity. In addition, the combined model eliminates liquidity fragmentation across pools.
Ambient offers limit orders on supported assets for traders, known as Knockout Positions, which are possible using directional concentrated liquidity. Directional, meaning when liquidity is added to a specific range, it is locked once the price crosses the range. Most AMMs are bi-directional, which swap back and forth between assets whenever the LP is within range. With directional Knockout Positions, the position gets removed once the price crosses the concentrated liquidity range the user provides. The action of removing liquidity once crossed serves as a limit order. The range for the knockout LP is tight to ensure it is filled. Keep in mind that although the range's width is tight, the liquidity is only "knocked out" when it is crossed fully.
Ambient employs account abstraction for managing gasless transactions. Account abstraction enables a third party to pay the gas fees. In this case, Ambient uses signatures to enable swaps where users only pay in the swap currency. Tips can be given to the third party as payment for sending ETH to facilitate the gasless swap on the user's behalf.
A fee is tied directly to the pool across other major pools like USDC/ETH on Uniswap. Uniswap employs three pricing tiers, 0.05%, 0.30%, and 1%, on Uniswap v3, which the LP selects typically based on implied volatility (expected price changes). The fees compensate LPs for taking IL (impermanent loss). On Ambient, fees are dynamically adjusted based on market volatility (market changes). Dynamic fees enable greater capital efficiency for LP, which lower active LP management and removal to meet the desired fee tiers during market lulls or extreme volatility.
While Ambient was designed to solve major problems facing LPs, the singleton AMM has struck a seemingly perfect balance between catering to LPs and enhancing the trader experience. Traders can participate in DeFi directly on Ethereum's base network with minimized gas fees and access to efficiently priced markets. LPs reap the benefits of trading fees among access to the groundbreaking functionality that Ambient offers for its liquidity pools. All in all, Ambient is undoubtedly working towards making the future of DeFi brighter.
Not financial or tax advice. The purpose of this newsletter is purely educational and should not be considered as investment advice, legal advice, a request to buy or sell any assets, or a suggestion to make any financial decisions. It is not a substitute for tax advice. Please consult with your accountant and conduct your own research.
Disclosure. All of my posts are my own, not the views of my employer.