Skip to main content


Paradigm Research Partners Dave White, Dan Robinson and Uniswap founder Hayden Adams have co-written an article proposing a new AMM model, the Time-Weighted Average Market Maker (TWAMM), for automating the execution swap of large trades on ethereum.

For example, suppose Alice wants to buy $100 million worth of ETH on the blockchain, the best option is to manually split the order into parts and execute them over a few hours. If she sends several large sub-orders, each order will still have a significant impact on the price and be vulnerable to attacks. On the other hand, if she sends many small sub-orders, she will have to take all the risk of active trading and will pay high costs to miners in the form of gas fees per transaction.

Unlike traditional AMM models that are costly for large transactions, TWAMM splits a large transaction into a myriad of very small orders based on a dedicated order splitting logic, and swap them all virtually at the embedded AMM over time. The main goal of the embedded AMM's pricing is to smoothly execute its long-term orders over time to ensure they are executed at close to the current TWAP price.

Pulsar TWAMM contains an embedded AMM that implements most of the standard AMM functionality (liquidity provide, liquidity remove and swap). Also, the execution logic for long-term orders is split into three libraries, OrderPool.sol, LongTermOrders.sol and BinarySearchTree.sol with each TWAMM instance facilitating Term Swap between two specific asset pairs, such as ETH and USDC.

Further reading#

Ultimately, of course, the Pulsar protocol is just smart contract code running on Ethereum. To understand how they work, head over to Smart Contracts