This is the first version of our Documentation, it will be improved and extended soon.
Page cover

Swap

Swapping requires a balance of tokens, which can be claimed through our Faucet in the sidebar. Refer to Beta Access.

The Swap page lets you exchange tokens through Unified Pools.

UI Elements

1

Swap Interface

2

Token Selection

Select from the existing Beta Tokens - aBTC, aETH, aUSDC, aUSDT - to swap between them.

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 Liquidity.

Performing the First Swap

Alphix uses Permit2 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.

In the testnet Beta, the Permit2 setup is simplified to reduce UX friction

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.

Last updated

Was this helpful?