dForce Partners with PulsarSwap to Integrate TWAMM for Liquidity-swap Facility

dForce
dForce
Published in
4 min readDec 29, 2022

dForce will integrate Pulsar’s TWAMM (Time-Weighted Average Market Maker) into dForce Trade to help minimize price impact for trading between DF and USX on dForce Trade. TWAMM will also play a role in DIP032.

At dForce, we’re always looking for ways to upgrade our tech features to improve our existing protocols.

Latest of such feature is dForce Trade integrating Pulsar’s TWAMM feature to mitigate price impacts on swaps to achieve virtually minimum slippage.

AMMs work by instantaneously matching and executing orders without a third-party intermediary overseeing the process. A pricing algorithm and liquidity in the pools determine the overall price of exchange between two assets, and the smart contract that governs the protocol is the only intermediary that oversees the asset swap.

Problems can arise when there is a large amount of order to be placed, as high impacts to execution price are likely due to lack of liquidity. dForce’s developers have been implementing different solutions, the latest of which is: TWAMM of Pulsar.

What is TWAMM and how does it work?

TWAMM, or Time-Weighted Average Market Maker, is the newest kid on the blockchain when it comes to trading market maker algorithms. TWAMM is an on-chain automated market making model designed by Paradigm Research Partners Dave White, Dan Robinson and Uniswap founder Hayden Adams.

TWAMM allows market participants to efficiently execute large orders on multiple blocks of Ethereum and works by breaking long-term large orders down into an infinite number of infinitely small virtual orders and executing transactions smoothly over time using an embedded AMM.

TWAMM allows the execution of large batches of buy and sell orders without significantly impacting prices of the asset(s) traded on DEXs. Pulsar combines instant swaps with term swaps to process a large number of orders that are split up into small virtual orders, then virtually crossed using an innovative, embedded AMM before they are published for on-chain settlement.

In layman’s language: TWAMM is one of the most innovative features currently available in the market to minimize price impact for DEX trades utilizing AMM.

The objective of DIP032 is to create a Liquidity-Swap Facility for USX-DF, which enables the protocol to swap its protocol-minted USX for DF liquidity in the market, to inject USX liquidity via TWAP and recycle DF liquidity in the market.

This facility enables the protocol to balance out USX and DF liquidity in the market (i.e expand protocol-owned USX liquidity and reduce DF liquidity).

The strategy is intended to be bidirectional (both from USX-to-DF and DF-to-USX), however, currently we only propose to activate USX-to-DF swap, and the strategy is also subject to market, and liquidity conditions set forth in DIP032:

Strategy:

  1. Open a vault to mint USX and swap into DF via TWAP (time-weighted-average price), USX to be minted is capped at 3m, around 14% of current market value of dForce Treasury (i.e 450m DF token), it ensures that USX minted are always over-collateralized.
  2. The strategy needs to always satisfy the following conditions:
  • USX/USDC peg stays within +/-1% range, the strategy will be suspended until the peg is restored back to the range.
  • Total USX-to-DF swap capped at 3,000,000 USX over a 3-month period, via TWAP (facilitated via Pulsarswap/Fraxswap’s TWAMM)

3. Usage of the Purchased DF

  • stake into DF free/lockup staking;
  • protocol to provide DF/USX liquidity in DEX to boost DF’s liquidity.
  • to enable a future reverse swap (i.e DF-to-USX twap) to combat excessive USX liquidity, subject to governance approval.

This process will help strengthen the feedback loops between USX and DF tokens, i.e., more USX adoption will bring more protocol income, more income to recycle DF, etc.

The liquidity-swap facility is utilized to build a stronger and positive feedback loop between USX and DF token, where 1) funnel DF trading volume into USX liquidity (more fee income); 2) balance out DF and USX liquidity in the market. In a bear market, with excessive DF liquidity, the facility enables conversion of more DF liquidity into debt-like USX liquidity to stabilize the supply and demand and vice versa.

About Pulsar Protocol

Pulsar Procotol is the implementation of TWAMM that effectively combines embedded AMM, Instant Swap, and, most importantly Term Swap that breaks long-term orders down into an infinite number of infinitely small virtual orders and executes swaps smoothly over time using an embedded AMM. The outcome is hence the avoidance of high slippage costs and gas fees. It is the AMM and on-chain version of TWAP. After two rounds of contract audits by Peckshield and Secure3, Pulsar is now live on the Ethereum mainnet and Goerli testnet.

Here are the key materials for Pulsar below:

For more latest news on dForce protocol, make sure to follow us on all our social channels!

Website | Forum | Twitter | Telegram | Medium

--

--

dForce
dForce
Editor for

A decentralized stablecoin powered by an integrated DeFi protocol matrix.