The CompX Router

The CompX router was formerly known as Alamex. The contracts are all identical to Alamex, only the front end was changed when moving to CompX.

The CompX router uses Deflex routing technology. As previously discussed, this allows swaps to include multiple ecosystem LPs to decrease costly price changes and take advantage of price imbalances within the ecosystem to deliver the maximum yield on your swaps. As an introduction, below is an overview of the benefits of using the CompX router:

Fees

CompX charges a very competitive 0.02% fee on the value of the swap, and it does this without token gating like other routers do. Every user gets access to the same low rate regardless of their holdings. CompX only charges a fee when a swap uses multiple routes. If the best route is through a single pool, no fees will be charged.

Minting fAssets

fAssets are the liquid staking tokens (LST's) that are used by Folks Finance (FF) for bookkeeping. Normally these tokens aren't seen by users as they're held behind the scenes at FF and not distributed. The only exception to this is the FF lending pools that you find across Algorand's dexes. Those pools hold these LST's and allow users to accrue both swap fees and interest. The CompX router has access to the FF APIs and is able to deposit assets such as USDC and ALGO into FF lending markets, and mint the LST versions like fUSDC, fALGO and many more that can then be held in the users wallet. There are various uses for these fAssets, including using them as interest bearing collateral to borrow xUSD from a CompX vault.

Single Signature

As discussed, routers create complex paths through the defi landscape that ensure that the user gets the most value from their swaps. If you consider how many pools are used in these routes, it becomes quite clear that it would be burdensome to sign each transaction individually with hardware wallets. By the time you've validated all of your signatures, the total swap could fail due changed market conditions. The CompX router puts all the transactions that will be taking place into one single transaction group. This can be signed and completed in a single transaction. This means that you can operate in defi easily with a cold wallet. You can have both the ability to enact complicated swaps and the safety of a hardware wallet. This feature simplifies the need for a complicated hot wallet/cold wallet setup.

Auto opt-in/opt-out

When creating swap paths, the CompX router may use pools with assets that the user has not opted into. During the execution of the transaction group from a single signature, the user's wallet automatically opts into these necessary assets for the swap. After completing the swap, the contract opts out of these assets, returning the wallet to its previous state.

Last updated