XFAI — An Overview

Published in
7 min readDec 6, 2023


Ahoy, XForce and Linea DeFi Voyagers! For those unfamiliar, we’d like to formally introduce ourselves as XFAI — Linea’s next generation Decentralized Exchange (DEX) — with a vision to revolutionize the decentralized finance (DeFi) landscape, XFAI isn’t just another Uniswap fork, it’s a whole different range of cutlery.

XFAI — Linea’s next generation DEX

Not only is XFAI garnering attention for having the lowest gas fees of any DEX on Linea, we have attracted over $2m in TVL, comprising over 6% of Linea’s total DeFi TVL — including the largest wrapped Bitcoin (wBTC) TVL across the entire chain.

XFAI quickly became the DEX of choice for Linea users to complete their DeFi Voyage swap wave tasks due to the lowest swap fees on Linea, and with an ongoing liquidity provisioning wave for the DeFi Voyage, XFAI is a promising option for users to provide liquidity to complete their voyage tasks - with Liquidity Providers (LPs) being able to earn higher fees than with other DEXs per volume capita due to XFAI’s key features.

With the overwhelming success of Linea DeFi Voyage so far, Linea is already positioning itself to be the new home for DeFi, especially as the industry enters the next bull run. Traders seem primed to migrate to Linea for more favourable gas prices, scalability, and trading opportunities compared to high-cost chains like Ethereum.

XFAI’s ground-breaking exchange, offering minimal slippage for swaps and better trading returns.

The introduction to innovation

XFAI is the brainchild of blockchain maestro brothers Lum and Taulant Ramabaja who are renowned and accredited in their fields of AI and decentralized systems having won multiple prestigious awards, supported by core team members hailing from successful projects such as Parity Tech, Polkadot, Synthetix and Ecomi (to name just a few), and backed by AU21 Capital, Rarestone Capital, Moonwhale, Tokenomik, LD Capital, TDeFi, Fission Capital, Kyros Ventures and Vendetta Capital.

XFAI is the mathematically most capital efficient DEX and aims to be the pinnacle of trading on the Linea ecosystem, boasting an entirely new innovative DEX architecture that:

  • Eliminates fragmented liquidity
  • Enables better swap results with minimal slippage
  • Offers the lowest gas fees for swapping on all of Linea
  • Gives better returns for LPs
  • Ensures better token liquidity for projects
  • Has less set-up costs for projects
  • All whilst remaining completely permissionless

*and breathe*

An overview of the benefits of XFAI and the problems it solves with existing DEX designs.

An exchange like no other

A new concept of DEX without token pairs, instead introducing a new double weighted constant market maker design, XFAI pushes the boundaries and re-invents the norm for how swaps happen. Summarized in simple terms, unlike other DEXs with multiple token pairs and multiple liquidity pools for tokens, XFAI instead has one single deep pool of liquidity for each token, which is balanced against a weight of ETH.

When pools are created on XFAI, liquidity providers commit the primary token that they want to supply + an equal value of ETH to be used as the balancing weight. The result of this is that liquidity for each token is concentrated into its own deep pool, resulting in more efficient swaps with minimal slippage, and eliminating the flaw of liquidity being “fragmented” into lots of different pools as with other DEX designs. Because of this, XFAI is more performant than exchanges like Uniswap even with a small percentage of the liquidity proportionally, and XFAI’s performance grows exponentially as liquidity increases.

On Uniswap and similar DEXs, token liquidity is fragmented into multiple token pairings which often have low liquidity, whereas on XFAI all tokens have their own unique pool.

This unique design also introduces several other standout benefits for traders on Linea, the first of these being that every token is directly swappable without the need for intermediaries. For example, if you wanted to swap from between tokens on Uniswap that didn’t have direct pairings then you’d actually have to do two swaps in the background, but with XFAI’s double weighted model, every token acts as if they were directly paired with every other token, meaning that direct swaps between tokens can all happen in one smooth motion which minimizes slippage. All of this culminates in the best trading results possible, meaning more money in your wallet at the end of a swap.

On Uniswap and similar DEXs, Token X would need to be swapped for ETH, which would then get swapped for Token Y. On XFAI, Token X can be swapped directly for Token Y.

A new hope for LPs

It’s not just traders who win with XFAI though, the benefits of this new DEX design are widespread, with LPs on XFAI actually being able to make lucrative profitable returns in exchange for providing liquidity (tokens). In contrast, LPs on exchanges such as Uniswap often make negative returns on their liquidity provisioning, owing to fees for providing liquidity being confined to a singular token pairing, which is a problem that is countered by the XFAI approach.

When it comes to fees, XFAI excels ahead in the earning opportunities that are available to LPs, due to the nature of XFAIs concentrated liquidity pools. To recap, when LPs provide liquidity to XFAI, they provide their primary token plus an equal value in ETH as a balancing weight, and the tokens that they have provided each sit in their own singular pools of liquidity, but on other DEX designs, this liquidity is fragmented into different token pairings.

When traders swap tokens on an exchange, liquidity providers earn swap fees — on exchanges like Uniswap, LPs would earn fees for whenever their provided liquidity is traded with, but because liquidity is fragmented into different pools, traders only earn fees when their specific pool is transacted against. With XFAI however it’s a different story, as liquidity for each token sits in one singular deep pool traders earn fees every time a swap happens with the primary token that they’ve provided, meaning more fees and liquidity provisioning opportunities that actually result in profit. Basically, with XFAI, LPs win.

On Uniswap and similar DEXs, LPs only earn fees for the specific pairing of liquidity that they provided, whereas on XFAI, LPs earn fees every time their primary token is traded with.

A liquidity haven for projects on Linea

As well as benefiting traders and LPs, the benefits from XFAI’s design lend themself to projects too, creating a more viable trading ground for the wider Linea ecosystem with better liquidity. When projects create liquidity pools on exchanges, they normally have to create multiple token pairings, meaning their liquidity is fragmented between multiple pools/pairings, and they have to commit more capital to create these multiple pools. With XFAI, projects only need to create one liquidity pool, meaning less start-up costs as they don’t need to create multiple pairings, giving them access to deep concentrated liquidity for their token and more viable swaps for their community — it’s a no brainer.

XFAI’s performance as a simulation, with XFAI having just 10% of the liquidity of a token on Uniswap, XFAI would yield a better swap deal in 55.44% of trade instances, increasing as XFAI’s liquidity increases.

XFAI will also be introducing liquidity generation events for projects, allowing projects on Linea to bootstrap communities by offering token rewards for committing funds which are converted into liquidity, further deepening their token pool and making swaps even more performant, and spurring on the growth of the Linea ecosystem.

Linea as a home for XFAI

XFAI is a Linea exclusive project, having chosen Linea as it’s home chain due to the next generation scalability and advanced performance that Linea as a leading zkEVM offers, with the capabilities of Linea as a next generation chain being an optimal fit for a next generation DEX. Linea’s wealth of experience, being backed by Consensys and championed by Metamask, makes Linea a clear choice for XFAI as Linea seems set to drive the next wave of adoption through its technical capabilities and rich network of credible partners.

Having already established notable partnerships with leading names on Linea like Mendi Finance and StakeStone, XFAI aims to play an integral role within the rich Linea DeFi ecosystem, and grow in tandem with Linea as they onboard the next generation of DeFi users onto their next generation chain. XFAI is incredibly excited to work alongside Linea to usher in the mass adoption of DeFi and champion the incredible experience and high performance that comes with Linea.

About XFAI

XFAI is a new breed of Decentralized Exchange with a new double weighted constant market maker design, enabling better swaps for all tokens & better returns for stakers & LPs. XFAI solves the problem of fragmented liquidity, with singular token pools for assets, meaning concentrated liquidity, thanks to unique architecture which enables every token to be immediately swappable with every other token in a single hop swap, with minimal slippage and better price discovery for long tail tokens.

To stay up to date with the latest on everything XFAI, follow us on X/Twitter and keep an eye on our Telegram Announcements Channel for the most recent updates. You can join our Community in leading the DeFi revolution on Linea.




XFai develops tooling for the DeFi space – we graph the DeFi space to build game-changing products. Starting with the DLO: the DEX Liquidity Oracle