Integral is a global team of engineers, mathematicians, growth leaders and early crypto investors.


Everything You Wanted to Know about TWAMM (Pt.2)

May 26, 2022
min read

TWAP and DCA options in DeFi are still limited and each protocol works different. Large traders should be aware of the diverse set of venues that provide DCA and TWAP implementations.

In our previous posts, we have explained the difference between dollar-cost averaging and trading based on a time-weighted average price. If you're unfamiliar with these concepts, take a look at our explainer piece on the two.

While both concepts are native to traditional finance, they have also been adopted by the decentralized finance crowd, and several protocols have sprung up which allow users to take advantage of these techniques.

Why use a DCA or TWAP protocol?

Both the DCA and TWAP are strategies meant to optimize the bang for an investor's buck. But replicating these strategies on chain has lots of problems. First is gas prices. Doing buys over set time incurs ever-expanding transaction fees that eat into returns. Another consideration is avoiding the negative impacts of MEV. There are hidden dangers in the dark forest and large, regular trades are some of the most susceptible to frontrunning and sandwich attacks.

One solution to this problem is to create a smart contract that will execute these strategies for you. In this way, you can socialize the costs of trades across a larger set of users and add properties that make transactions resistant to MEV. In this piece, we review some of the options available today in DeFi to do DCA and TWAP.

Integral SIZE

  • Fees: .01% fee
  • Available pairs: WETH-USDC, CVX-WETH, SUSHI-WETH
  • Ease of use: Like a Uniswap swap
  • Address: Ethereum

What is SIZE?

Integral SIZE is a new decentralized exchange that lets traders execute trades at the TWAP price of an asset.

How does SIZE work?

SIZE works by holding the traders’ funds for a set amount of time, calculating the TWAP from an external oracle like Uniswap or Sushi, and then executing the trade at the TWAP price with zero price impact against the SIZE liquidity pool. This lets traders get an experience very similar to OTC trading where large trades can settle outside of the market with minimal/no price impact.

What’s next for SIZE?

For launch, we have started with a 30-minute TWAP and only a few trading pairs. However the smart contract architecture allows us to expand and we are continuing to add pairs and other options based on community feedback.


  • Fees: .3% fee
  • Available pairs: trades between FRAX, FPI, FPIS, WETH
  • Ease of use: Like a Uniswap swap with time controls
  • Address: Ethereum

What is Fraxswap?

Fraxswap is Frax Finance's implementation of the Paradigm TWAMM concept. The TWAMM combines the concepts of TWAP execution with an automated market maker design. This allows users to place long-term orders with the protocol that will execute around the TWAP of an asset.

How does Fraxswap work?

Fraxswap implements Paradigm's TWAMM specification with only minor optimizations for gas. The TWAMM is a two-part market. Some users place long-term resting orders for swaps between two assets over a set time. The TWAMM computes these block trades as infinite small orders and adjusts its internal price accordingly. If the internal price of the TWAMM deviates too far from the outside market, other actors will arbitrage the price back in line. The result is the end pricing for any resting order is the time-weighted average price.

For more details on how a TWAMM works, check out our explainer piece: Everything you wanted to know about TWAMM

What's next for Fraxswap?

Fraxswap launched with little fanfare aside the Frax Price Index, inflation-resistant stablecoin. For now, the swaps are limited to WETH and the Frax ecosystem tokens. However, there are likely plans to expand that in the near future.

Fraxswap fits into Frax's larger ambitions in the stablecoin market. Frax's founder has even suggested that Fraxswap will allow them to do large orders between DAO assets and perfect their Algorithmic Market Operations.


  • TWAP or DCA: DCA
  • Fees: Gas fees and small margin for Dopex team
  • Available pairs: trades between WETH, ETH, WBTC, USDT, USDC, CVX, CRV, DAI, LINK, SPELL, MIM, FRAX
  • Ease of use: Like a Uniswap swap where you need to choose some time and percentages for your trade clips
  • Address: Arbitrum, Ethereum

What is TZWAP?

Dopex is an options protocol running on Ethereum mainnet and Arbitrum. As part of their product offering, they also created a long term orders trading protocol that they call TZWAP.

How does TZWAP work?

The TZWAP lets traders place a large trade and specify a batch size in percent and a time delay between each trade in minutes or hours. For example, a 100 ETH sell could be done in batches of 5% every 5 minutes. So despite the name suggesting that this is a TWAP protocol, it is more similar to dollar-cost averaging. Trades are executed at a set interval and size until the amount is finished.

What's next for TZWAP?

TZWAP has already been put in use by DAOs to do larger buys of CVX as part of their entry to the Curve Wars. TZWAP is on its third iteration and its sure that the Dopex team will have further plans for the implementation.

Mean Finance

  • TWAP or DCA: DCA
  • Fees: .6% market maker fee
  • Available pairs: DCA trades between any ERC20
  • Ease of use: like a Uniswap swap

What is Mean Finance?

Mean Finance is a protocol that lets users conduct DCA trades between any two ERC20 tokens. It currently runs on Ethereum and soon Optimism.

How does Mean Finance work?

A user can go to Mean Finance, deposit a set amount of capital and specify a time to do their DCA. Then the protocol gives the user an NFT representation of the position and the funds are put in the smart contract. From there, the trades are matched as a coincidence of wants between users or by external market makers.

What's next for Mean Finance?

Mean Finance is currently paused after a responsible bug disclosure raised through their ImmuniFi program. No user funds were lost and when the bugs have been fixed it is expected the second version of the Mean Finance DCA protocol will launch.

If you would like to reach out to us to discuss it more deeply, or want to suggest a topic for us, feel free to email us

Similar Posts


As DeFi expands to fill even more niches in finance, we can't expect that all projects are going to have billions of dollars sitting in their contracts. Instead, projects that are capital efficient, smart with protocol design and useful to the market will be able to leverage the TVL they do have for success.


Suprisingly, some of the largest trades have the lowest slippage.