← Back to home

CFD DEX and Flash Trillions

Contracts for Difference (CFD) Decentralized Exchange using a novel “Flash Collateral Trillions” borrowing of non-existent funds for efficient liquidations

Screenshots

CFD DEX and Flash Trillions screenshot 1
CFD DEX and Flash Trillions screenshot 2
CFD DEX and Flash Trillions screenshot 3

Problem Statement

Contracts for Difference (CFD) are trading instruments in which the underlying asset is not touched. Upon entry of a position, an entry price is recorded, and upon exit, the difference between the exit and entry price determines the payout. Actually, an “Average Entry Price” calculation is maintained, so that the trader can freely increase or decrease the position, end even flip it from long to short, etc., yet the payout amount can be calculated at any time from the quantity held and the Average Entry Price. In order to achieve extremely efficient liquidations, the protocol allows for “Flash Trillions”, i.e. borrowing of large amounts of funds which do not even exist, all without any fees. This is especially important when obscure illiquid instruments are traded.

Solution

The contracts are written in Solidity, and the front end in JavaScript / Next.js and Chakra. Chainlink is used as an oracle for liquidation reference prices. Since the DEX is based on Order Books, it is important that it runs on a very inexpensive L1 blockchain such as Gnosis or L2 blockchains such as zkEVM, Optimism, zkSync, Scroll, Mantle, Taiko, etc. Deployed on all above networks, along with IPFS pinned web3 dapps.

Hackathon

Scaling Ethereum 2023

2023

Prizes

  • 🏆

    💡 Polygon — Best dApp Deployed on Polygon zkEVM

  • 🏆

    🔴 Optimism — Just Deploy!

  • 🏆

    🥇 Mantle — Best Use

  • 🏆

    🥈 Taiko — Best Dapp

  • 🏆

    📜 Scroll — Just Deploy!

  • 🏆

    🏆 Scaling Ethereum Finalist

Contributors