hackquest logo

Infi

The Premier DEX Aggregator on Pharos Network

視頻

描述

Infi - The Premier DEX Aggregator on Pharos Network

Overview:

Infi is the premier DEX aggregator on Pharos Network which is fully on-chain and modular in nature. Its primary objective is to enable optimized token swapping experience on Pharos network by maximizing capital efficiency and simplifying user interaction. With its modular architecture, it identifies & executes swap paths that yield the optimal effective exchange rate across all DEXs on Pharos. The protocol features an advanced on-chain pathfinding algorithm capable of navigating multi-step routes involving trusted intermediary tokens

Twitter(X): https://x.com/InfiExchange

App link: https://infiexchange.xyz/swap

Demo: Youtube Link

Pitch Deck: Canva Link

Pitch Video: Youtube Link

Docs: https://infi-1.gitbook.io/infi-litepaper

Core features & design goals:

  1. Modular Extensibility: Utilizes a flexible Adapter pattern, allowing seamless integration of new DEX protocols without altering the core router logic.

  2. Optimal Rate Discovery: Employs sophisticated on-chain algorithms that rigorously search for swap paths maximizing the final output amount.

  3. Gas Cost Consideration: Factors in the network transaction costs (gas fees) associated with different paths, optimizing for the net value received by the user.

  4. Multi-Hop Capability: Intelligently routes trades through liquid intermediary ‘trusted tokens’ when direct liquidity between the desired pair is scarce or inefficient or when optimal.

  5. User Experience Enhancement: Simplifies interactions through a unified interface and reduce transaction costs via EIP-2612 permit support

Architechture Overview:

Core Components:

  1. Adapter Pattern: Adapters are specialized, individual smart contracts that act as translators or intermediaries between the generic InfiRouter and the unique interfeaces and functionalities of specific underlying DEX protocols

  2. InfiRouter: This smart contract serves as the primary entry point and central coordinator for the entire protocol. It handles state management, interface exposure, pathfinding logic & functions, swap execution, internal logic & administration.

  3. Pathfinding Algorithm: The core intelligence of InfiRouter lies in its on-chain pathfinding algorithm, implemented primarily within the internal _findBestPath function. This recursive algorithm systematically explores potential swap routes to identify the one offering the maximum output amount, potentially adjusted for gas costs. It utilizes a recursive depth-first search strategy.

Pathfinding Algorithm:

The algorithm operates recursively as follows:

  1. Base Case - Direct Path Evaluation: The function first considers all possible single-step path. It iterates through every registered adapter.

  2. Recursive Step - Multi-Hop Exploration:

    – The algorithm checks if further exploration is warranted based on the maxSteps constraint. If the current path being built has length ( l ) and ( l < - 1 ), it proceeds to explore two-step (or longer) paths originating from the current state. – It iterates through each potential intermediary token in the TRUSTED_TOKENS list.

What we achieved in the hackathon:

  1. Shipped the MVP with blazing speed

  2. Grew our X from 0 to 45+ in less than a week

  3. Onboard 20+ users in private beta of the app 1 on 1

黑客松進展

All the progress made was during hackathon duration.

技術堆疊

Ethers
Solidity
Next
Web3
Node

籌資狀態

Haven't raised any funds yet.

團隊負責人SShivraj Goswami
行業
DeFi