Everything you need to know about the DFX Automated Market Maker, (AMM).
We have designed the DFX AMM specifically optimized for the forex use case and it is not meant to be a generalized AMM. This new AMM is uniquely built for low volatility trading of currency pairs.
- We back test our currency pairs to use historical FX data to set and optimize the price range to maximize capital efficiency and lower slippage.
- Each currency is paired with USDC. USDC is treated as a bridge currency in the DFX AMM between all the other stablecoins. This allows it to maintain the most liquid pools to facilitate swaps without fragmenting liquidity.
- The entire user interface (UI) has been remodeled to give a seamless transition whenever you are participating in any part of the DFX protocol.
The oracle design is very powerful. The oracle does not dictate the price, but rather provides a reference point for the bonding curve. This will help shift the optimal range of capital along the bonding curve WITHOUT user intervention.
By using back tested historical data, we are able to set the most ideal range for the capital in the pool to be utilized. Every currency pair is different and each one has their own unique characteristics. They all have a long history of data that we can leverage to help inform the bonding curve how to behave. We will be working with special models to help set and tune the bonding curve for each currency, but the community will be able to tune and adjust it thereafter to ensure the bonding curve stays relevant as the market moves. This is slated to launch with v1.
DFX engaged Trail of Bits to audit the DFX smart contracts beginning April 12, 2021 and receiving final review on May 3, 2021. The three week engagement resulted in 16 total issues, where 2 were considered high--severity. We’ll start by addressing those two first.
We’ll start by addressing those two first.
- 1.The CurveMath.calculate Trade function uses an equality check. The concern is that a future version of Solidity can change the order the semantics around this equality check such that it produces a different result.
- 2.The contract converts raw values to numeraire values for arithmetic. There may be a scenario where raw values are used instead of numeraire values resulting in disproportionate tokens received.
Both fixes were quite simple. As the equality check has been defined more implicitly and the raw values are converted to numeraire values prior to doing any arithmetic operations.
These are the tokens you will get in return for supplying liquidity into a DFX liquidity pool.
These are the Staking Reward contracts that you will need in order to successfully stake your DFX LP tokens into for yield farming.
Note: If you do not stake your LPTs after supplying liquidity, you will not receive liquidity mining rewards.