You’re A Wizard LP 🧙
As magical as the element from which its name derives, zaps enable liquidity providers (LPs) to instantly add (zap-in) or remove (zap-out) liquidity from decentralized exchanges (DEXs) with just a single token. No more lengthy multi-step manual process when you can just zap in or out of Automated Market Maker (AMM) pools with one-click zaps (and maybe a wizard hat or two).
For those that have seeked yield while braving the peaks and troughs of DeFi, one of the fundamentals of market making has been the adding of liquidity to AMM pools. This entails sourcing the exact ratio of pool tokens that matches the pool’s price at the point of liquidity contribution (ignoring the more adventurous single-sided LPs). The odds of a LP having this exact ratio at the exact point in time to match the markets is tantamount to sorcery.
The solution to the above required all of the liquidity provision complexities to be abstracted away into a single user action. Specify your desired liquidity position and zaps will get you there instantaneously. No need to worry about your token ratios nor your swap routes. It really is almost like magic.
AMM’s Main Quirk
Prior to zaps, maximizing your liquidity efficiency meant forecasting token ratio requirements and swapping a portion of one of your tokens for the other. If the market changes while swapping (or as a result of your 🐳 swap), you would be stuck with the remains of the token that was beyond the dictated pool ratio. This results in more swaps, more gas fees, more room for manual errors.
Adding Liquidity Without Zaps
Taking the USDC-WETH pool as an example, a typical add liquidity journey for a LP with 1,000USDC would entail:
- Checking the current pool price
- Swap USDC -> WETH
- Add the exact amounts of the remaining USDC and the newly swapped WETH
For LPs with both tokens (i.e. adding double-sided liquidity), the journey gets even more complicated:
- Compare the add liquidity USDC:WETH ratio with the USDC:WETH ratio in your wallet
- Assuming you need more WETH and less USDC, calculate the USDC amount to be swapped for WETH
- Swap a proportion of available USDC -> WETH
- Add liquidity to the pool
Exposure To Additional LP Risks
In both the above cases, the LP is exposed to slippage risks as the market could have moved at any point during the add liquidity process. Furthermore, LPs also face price impact risks when sourcing the right token ratio via swaps.
If a swap is large relative to available liquidity (i.e. comparatively shallow market depth), the LP’s swap would have caused the market price to move resulting in variances in the swap output amount. Critically, if the swap was routed via the target pool (which is more likely if the LP is contributing towards more liquid pools), the pool’s price would have also shifted therefore magnifying the changes to the initial scenario and consequently compounding the potential impermanent loss (IL).
Given crypto market volatility, the liquidity addition amount is rarely ever exact which results in unpredictable amounts of one of the tokens being left in your wallet. If this is a significant amount, not only will you be losing out on potential yield but you would have to repeat the above process again, incurring multiple times the amount of gas fees. This means less profits and less time to focus on the things that matter (like discovering your next big trading opportunity).
Zap To The Rescue ⚡
The introduction of zaps enabled LPs to forgo the repetitive and mundane tasks above and just specify how many tokens they are willing to add to a pool. With zaps, all the complicated logic of converting the value of the token provided into a liquidity position earning yield is abstracted into a single user action (i.e. signing a single transaction).
Given that zap transactions are atomic (i.e. either all the conditions for the zap are met else the whole transaction fails), LPs are less likely to face any slippage risks. Additionally, as the end-to-end process is condensed into a much shorter time period, market movement exposure is significantly reduced.
Zaps were a significant step forward not just in terms of managing risks but also for the LP user experience. At KyberSwap, we believe that such a convenience feature will be a key fragment that unlocks a delightfully magical experience for the next billion DeFi users. Building on the foundations of earlier zap implementations, KyberSwap is now heralding a new age of wizardry by enabling zaps on KyberSwap Elastic!
Concentrated Liquidity Zaps
While concentrated liquidity market makers (CLMM), such as KyberSwap Elastic, enable LPs to more efficiently utilize their capital by configuring personalized position ranges, this same customizability made CLMM protocols exponentially more difficult to work with. Put technically, unlike zaps on constant product pools (e.g. UniV2) where all liquidity is fungible, zaps on concentrated liquidity pools (e.g. UniV3) needed to take into account liquidity distribution across non-fungible position ranges (see Tick-Range Mechanism for more info).
Nevertheless, after much 🩸, 💦, and 😢 (no living beings were sacrificed in this process), KyberSwap has finally conjured up CLMM zaps, starting with our very own KyberSwap Elastic!
KyberSwap Elastic LPs are now able to select their preferred position range and zap directly into the position with a single token. This applies for both the creation of a new position as well as the adding of liquidity to existing positions. Moreover, aside from supercharged yields and an outstanding user experience, KyberSwap Elastic Zap has also leveled up zaps by infusing it with the KyberSwap Aggregator!
Zap At Superior Rates 📊
KyberSwap Elastic Zap enables LPs to minimize their IL and price impact risks through its integration with the KyberSwap Aggregator. By taking an additional step of scanning for more optimal rates across multiple liquidity sources, KyberSwap Elastic Zap ensures superior rates for all the intermediate swaps that are required to achieve the zap.
Critically, when sourcing the correct token ratio for a zap in, swaps can be executed via the target pool itself or through other liquidity sources. In the latter case, LPs do not have to worry about the target pool price changing as a result of the swap transaction. That is, the pool which the LP is adding liquidity to will not experience a state change as the swap occurs external to the pool.
As a consequence of the AMM design, swapping against the pool prior to liquidity addition introduces additional technical complexities when computing the token ratio to be added (because the swap will change the pool price before addition). More importantly, while the above can be solved mathematically, such LPs could also be exposed to further IL risks as a result of the zap in direction. This is especially so in cases where the pool price varies significantly from the market price.
In short, the price impact of the intermediate swap will result in the newly created zap position being added further away from the market price (assuming pool price before swap = market price). Depending on the market direction, this might result in immediate IL upon creation of the position. This is compounded in cases where the target pool TVL is low relative to the trade volume.
By optimizing zap routes and executing the whole process within a single transaction, Elastic Zap ensures that the maximum value of a LP’s contribution is added towards the pool and earning upsized trading fees.
Supreme Wizardry At Your Fingertips 👉⚡
With a significant reduction in LP management risks and resources, we are confident that KyberSwap Elastic Zap will make the LP experience that much more magical. Moreover, by making the CLMM journey much less intimidating, we hope that more LPs will feel empowered to explore the myriad of permissionless tools that can aid them in their journey towards financial independence.
You can try out Elastic Zap for yourself by visiting the KyberSwap dApp (no wizard 🎩 nor 🔮 required)!