Page cover

Swap Tokens

Learn how to swap tokens on Alphix with dynamic fees and streamlined approvals.

UI Elements

1

Swap Interface

2

Token Selection

Select from a growing selection of tokens as new Unified Pools launch.

3

Input Amount

Users can specify either the token input or the token output to swap to a predefined amount of tokens.

4

Multi-Hop Routes

The swap interface displays the route a swap takes. This can be as simple as a set of two tokens or more complex if there is no existing Unified Pool with the selected tokens. In that case, the swap is routed through multiple pools. The tokens can be hovered over to switch between the different dynamic fee trend views.

5

Dynamic Fee Trend

The dynamic fee trend is a graph plotting the recent 30-day trend to provide additional context for the current fee. This allows swappers to understand the context in which they are swapping, which informs trading decisions.

6

Liquidity Page Shortcut

Clicking on the dynamic fee trend segment takes the user directly to the liquidity page of the corresponding pool, which provides deeper analytics - more information in Add Liquidity.

Performing the First Swap

Alphix uses Permit2arrow-up-right to streamline approvals. During the initial swap, this requires three steps.

1

Approve Permit2

This grants Permit2 the authority to manage token approvals through a single, secure contract. The user retains the power to decide what amount of tokens to approve; by default, the connected wallet will prompt infinity.

2

Sign Token Permit

After the Permit2 Contract is approved to access tokens, a permit has to be signed enabling it to interact with the PoolManager using the user's tokens. This signature has a deadline set at 30 minutes and only enables the exact swap amount to be accessed.

3

Execute the Swap

As the final step, the Swap Modal prompts the swap transaction to the user.

After the initial setup with Permit2, the user can swap with two transactions if an unlimited Permit2 allowance was approved. By default, Alphix will prompt the user to sign a permit that is only for the selected swap amount and will expire after 24 hours. Subsequent swaps or swaps after expiry of Permit2 require a new signature but no approval transaction, freeing the user from paying gas fees while remaining secure.

circle-info

The Approval amounts as well as slippage and deadline preferences can be set in the Settings page.

Last updated