Pulsar: A TWAMM Protocol

Project Justification

Existing Limitations of DEX

Various DEX products have been blooming in the DeFi market over the past 3 years. However, the existing ones suffer from some problems from different perspectives. For example, popular ones such as Uniswap focus on providing a platform that allows users to instantly exchange tokens at the cost of relatively large slippage when the size of the orders becomes large. On the other hand, Curve mitigated the slippage issue for its constant-sum-based model though the total amount of liquidity is also limited. This restricts the amount of tokens in its exchange pools. Our product, in turn, aims to resolve these two existing problems in the current DEXes.

Motivation of Pulsar

Pulsar is a TWAMM protocol that enables DeFi's very low-cost, on-chain trading of large orders by way of AMM. It is a constant-product embedded AMM that combines Instant Swap (e.g. Uniswap) and Term Swap, which is designed to be beneficial for large order tradings.

TWAMM is an AMM trading strategy designed by @_Dave__White_, @danrobinson, and @haydenzadams that is devised to execute large trades cost-effectively and is slippage-friendly. TWAMM breaks long-term orders down into an infinite number of infinitely small virtual orders and executes swaps smoothly over time using an embedded AMM to avoid high slippage while maintaining gas fees that are close to the existing DEXes such as Uniswap. Market participants can submit large long-term orders on multiple blocks of Ethereum. It is the AMM and on-chain version of TWAP! As described above, this product is one of the solutions to the large orders--the original cause of high slippage in the existing. And because this TWAMM is a constant-product-based model, there is no such limitation to the liquidity pool volume (such as Curve has).

Moreover, it is well-known that AMMs have come a long way since the first-generation DEXes and are doing significant volumes today. They are great for trading small-cap long-tail of assets and bootstrapping liquidity for new projects. However, CEX is still the preferred way to trade larger-cap assets and larger volumes due to lower costs (tighter spreads, minimal gas costs, not having to worry about frontrunning in the mempool, etc) and zero slippage (e.g. order-book-based tradings). Before our product, no CEX replacement could handle large on-chain orders. Because of the low-cost and slippage-friendly nature of our product, Pulsar would provide an opportunity for users that seek for trading large orders on the blockchain without interference with CEXes.

Here we include the key materials for our product below:

Technical Specification and Implementation

Pulsar TWAMM splits large orders into many small virtual orders and executes them slowly over time.

Virtual orders aren't executed on-chain (as they would incur gas), but the Embedded AMM accounts for them. In this scenario, the buy & sell orders are virtually crossed and the on-chain "settlement" takes place later.

When the Embedded AMM receives a regular buy/sell order or a new large order, it will "wake up" & calculate the results of all the virtual trades that have taken place in the time that has since elapsed.

In this example, the virtual buy and sell orders that have been virtually crossed will be "settled".

And there we have it, a DeFi-native novel way to TWAP a large order without incurring insane gas fees or causing too great of a price impact! Paradigm's diagram illustrates this concept in a very neat way.

https://github.com/para-dave/twamm/blob/master/splitting_exploration.ipynb
https://github.com/para-dave/twamm/blob/master/splitting_exploration.ipynb
Subscribe to Pulsar Protocol
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.