FlationDEX

commedity markets dex

IntroductionKey FeaturesHow It WorksHow To UseCredits Contracts Addresses

screenshot

Introduction

FlationDEX lets you trade commedity markets like XAU/USD and XAG/USD with leverage. It is decentralized, open source, and accessible to everyone.

Key Features

FlationDEX has all the features you need for fast and secure on-chain trading, including:

  • Cross Margin: Margin is shared between positions, minimizing liquidations.

  • Risk Management: Set limit, stop, take-profit, and stop-loss.

  • Dynamic Funding: Longs pay shorts (and vice versa) based on open interest.

  • Trustless: Interact directly with on-chain smart contracts (no intermediaries).

How It Works

You buy to profit from rising prices. You sell to profit from falling prices.

Your profits are paid from the pool. Your losses are paid to the pool.

  • 50% of trading fees go to the pool.
  • 40% go to the treasury which buys back the protocol token, among other things.
  • 10% go to keepers which trigger order executions.

Your account is liquidated when its margin level reaches 20%.

All prices are provided in real-time on-chain by Chainlink and trufflation .

How To Use

To clone and run this project , you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:

# Clone this repository
$ git https://github.com/malawadd/chainlink-truflation.git

# Go into the repository
$ cd chainlink-truflation

# Install dependencies
$ yarn install

# Run the app
$ yarn dev

Note If you're using Linux Bash for Windows, see this guide or use node from the command prompt.

//

Note 2 make sure you mint USDC token avalible in the contract section below .

Credits

FlationDEX uses the following open source packages:

  • svelte Kit SvelteKit is built on Svelte, a UI framework that uses a compiler to let you write breathtakingly concise components that do minimal work in the browser .
  • tippy.js TTippy.js is the complete tooltip, popover, dropdown, and menu solution for the web, powered by Popper.
  • ethers dThe ethers.js library aims to be a complete and compact library for interacting with the Ethereum Blockchain and its ecosystem
  • rollupjs The JavaScript module bundler Compile small pieces of code into something larger and more complex
  • chartjs Simple yet flexible JavaScript charting library for the modern web
  • Foundry Foundry is a smart contract development toolchain.

Contracts Addresses

USDC TOKEN: 0x8325F6AdBe43004A2670bAa519276584fEAbE85a

Trade: 0x2F21DBd134D023cA4a635911F742ADf6927f4406

Pool : 0x7802C218Fd4363674CcD519936781733777a1295

Store : 0x3252Ad9e90B36a5680cC407b967a3d84E5eEc21D