FLING - Dex Aggregator & Trading Tool

FLING - DEX Aggregator & Trading Tool

To aid the currently thriving economy for the ICON community, we aim to bring a long needed defi product–DEX aggregator and trading tool for ICON.

We recognize the importance of user-friendly UX that Balanced and OMM iterated on, but this hasn’t been popular for veteran traders looking to fine-tune their trades at a high volume and price.

Long term, Fling will be a frontend for BTP. It will implement the cross-chain bridge, and help users find the best prices for their assets between chains.

Solution For

  • Fine tuned trading with in-depth calculations
  • Advanced traders with significant trading volume
  • In the future, it will serve as an alternative frontend for BTP
    • Support traders looking for the best deals across multiple chains

Core Functionality

  • TradingView charts for all exchanges, simple price quote for complex routes
  • Link ICONex & Ledger wallets
  • API to request swap quote between two coins in backend
  • Smart contract to execute signed swap transaction
  • Frontend shows transaction success/failure as a toast message

Tokenomics

There won’t be a token at the present time. This application will just serve to unify exchanges on ICON in a simple, non-rent-seeking interface. While only on the ICON chain, the product will continue not to seek fees from users, and simply provide the best price/execution quality.

In post-grant phases of the project, it will integrate BTP and serve as an alternative frontend, powering a cross-chain DEX aggregator. At this stage of the project, monetization may be introduced. This may include an application token, if fitting.

Technical Analysis

The initial technical design and architecture has already been reviewed, and the services required to bring Fling to life would include a DEX scraper which communicates with external DEXs, an API server, a pathfinder which communicates with our API server, and a Redis service to facilitate communication between these microservices.

The greatest technical risk of this project stems from needing to create a connection to any new incoming DEXs (and inability to use a generic framework). In addition, if any DEX does not provide enough information via their API to serve our needs, we will need to spend additional resources to analyze smart contracts for the respective DEX instead.

Open Source

The frontend and smart contract components will be published open source on GitHub. The backend will be closed source and be operated by the MouseBelt team.

UI Mockups

Untitled

  1. Wallet connection
  2. Basic Swap UI
    • Input and output token - Select available tokens from ICON chain (bnUSD, BALN, ICX, sICX…) + user inputs numeric value of the token. Displays estimated USD value of the field amount.
    • Route - Routing information - minimal info with only best option shown.
    • Minimum amount - Calculated amount for guaranteed amount that can be received by the user. Calculated in output token unit.
    • Gas fee - Calculated amount for transaction cost based on the current chain. Display estimate in USD alongside input unit.
    • Refresh button - User can refresh to manually refresh all calculations displayed on the UI.
    • Slippage tolerance - Written in numbered percentage such as “Slippage Tolerance - 3%”. May be configurable.
    • Directional swap button - User can change the from and to tokens with each other.
    • Line chart - Displays price over time for the selected tokens. TradingView integration.
      • Settings - Should allow time range selection of 5m, 15m, 1h, 4h, 1d.
    • Candlestick chart - Displays OCHL data for the selected tokens. TradingView integration.
      • Settings - Should allow time range selection of 5m, 15m, 1h, 4h, 1d.
    • Transaction deadline - Revert transaction if the transaction does not occur within the user-input threshold (in minutes).

Our Team

MouseBelt, an ICON P-Rep, will be the main team working on this grant and has helped/is currently helping to bring these products to the ICON ecosystem:

Additionally, the team previously helped to create and develop the exchange Multi, which featured API keys for market making, margin trading, staking, TradingView charts, and asset/address-based validations, socket-based orderbook, device detection/2FA/address whitelisting for enhanced security, light/dark theming, and more.

Integrated Exchanges

  • Convexus / CXS
  • Balanced / BALN

Miscellaneous Work

  • Community Manager - Work with development team & management to provide scheduled updates.

Milestone 1 (2 weeks)

  • Branding - UI Design, style guide, illustrations
  • Backend development - DEX scraper + API development
  • Frontend research - Code review of existing open-source repositories and their latest deployments

Milestone 2 (2 weeks)

  • Illustrations
  • Smart contract development - Testnet deployment + Fallback mechanisms
  • Backend development - API + Redis
  • Frontend development - UI development

Milestone 3 (4 weeks)

  • Smart contract testnet audit
  • Backend development - Pathfinder + Optimization + Test Suite
  • Frontend development - TradingView, wallet integration, error handling and validations
  • QA - Regression test suite, testnet tests, gather bugs
  • General copywriting, design polish, community building, hiring for next phases

Milestone 4 (4 weeks)

  • Backend development - Path finder + Optimization + Test Suite + Documentation
  • Frontend development - Internal QA & Feedback updates

Final Milestone

  • Testnet beta release + feedback/QA updates

Future Phases

Phase 2

  • Custom token support
  • Integration of BTP
  • Launch on one BTP connected chain
  • Security Audit of contracts
  • Hana wallet support

Phase 3

  • Launch on ICE and Polkadot ecosystem
  • Documentation
  • Magic wallet support

Phase 1 Outline

Funding Amount Requested

$65,000

Super excited to see something like this come to ICON - especially with how it could utilize BTP :eyes:

5 Likes

Hi folks! As we approach the end of our 2nd voting cycle I’d like to extend anyone to ask any further questions that may be preventing you from sending a vote our way! We’re eager to get this project kickstarted with your support.