History
In 2021, DFX V0, the alpha version of the DFX Protocol smart contracts set was deployed to the Ethereum Mainnet. At the time, V0 was built on Balancer Smart Pools and was also not able to offer efficient swaps. In a way, v0 served as a dry run to bootstrap liquidity for foreign stablecoins and to kickstart the liquidity mining program for the community distribution of the DFX token.
In May 2021, a second version of the DFX Protocol, dubbed v0.5 was deployed. This version is designed specifically for forex and is uniquely built for low volatility trading of currency pairs. V0.5 of the DFX Protocol featured, among other things:
- A pricing engine that leverages Chainlink oracles for external FX price feeds.
- A bonding curve that autonomously concentrates liquidity at the optimal price range to maximize capital efficiency and minimize slippage.
- Safety of funds. The AMM is based on pre-audited code and has gone through an additional third-party audit with Trail of Bits.
- Gas optimizations and other improvements.
V0.5 was deployed as a guarded launch of the new smart contracts. The successful completion of v0.5 led to the current iteration of the DFX Protocol we now call v1, and over the past year, the ecosystem has grown to include:
New stablecoins
The addition of high quality fiat-backed stablecoins such as NZDS, TRYB, XIDR, EUROC, and most recently, GYEN.
Scaling
The community has supported the DFX Protocol’s expansion from the Ethereum mainnet to the Polygon network.
Partnerships & Integrations
Exchanges such as Huobi and MEXC, DEX aggregators like 1Inch, Matcha, etc., borrowing and lending with Euler, industry partners like Telcoin, and stablecoin issuers, etc. foster greater adoption of the assets available on DFX. We owe a large part of our success due to strong and reliable partners.
After a year of substantial growth, this DFX Improvement Proposal (DIP) seeks community approval for a new iteration of the DFX Protocol–DFX V2.
This DIP introduces DFX V2–its features / improvements, and requests a community vote via Snapshot regarding a potential deployment:
-
Flash Loans: allows users to borrow uncollateralized assets in each of the pools as long as the liquidity is deep enough. The loan must be returned in the same transaction with a protocol fee. All fees generated by the flashloan functionality are directly sent back to the protocol’s treasury.
-
Factory pools, for a more permissionless DFX: factory pools are “permissionless” pools which anybody can deploy and operate. In v1 producing new pools was a very permissioned and tedious process but with v2 the process has been streamlined and users also have the option to use the oracle of their choice not restricted to Chainlink (i.e.custom oracles).
-
More efficient swaps: if the swap amount is relatively large compared to available liquidity, swapping token A for token B then swapping back the same amount of token B into token A results in slippage. An edge case but fixed in v2.
-
Removal of the invariant check: v1 had an issue with liquidity providers not being able to deposit their desired amount of liquidity into a pool. Another edge case but fixed in v2.
-
Users are now also able to exit liquidity pools in either both or just one of the underlying assets.
DFX V2 is a separate and independent set of smart contracts. If the community votes positively for the deployment of v2, liquidity providers would have to fully exit their V1 position (unstake LPT and withdraw liquidity) then provide liquidity and stake on the new set of contracts. A small inconvenience but that means there’ll be super high APRs for a little while after the migration, because it’s essentially going to start fresh all over again! Aside from that, core features introduced will help the DFX Protocol stay relevant in the DeFi space as it’ll allow other DeFi protocols to integrate / leverage the protocol to theirs more easily.
As always security remains top priority; in addition to thorough internal testing, auditing agency Pickax was commissioned to pick at the DFX V2 smart contracts. Nothing major surfaced, the the final audit report can be reviewed here.
Conclusion
This DIP has focused on the new iteration of the DFX Protocol and its main features. As mentioned above, the community will decide on whether or not to deploy V2. In any case, we’re super excited about what the community will discuss and decide on!
Edit (2022-10-07): added final audit report, and some relevant links.