UI Ideas

Adding paymaster support to your application means rethinking how to present the best flow to users

Flow 1: User pays with an ERC20

Having an user pay with an ERC20 token instead of ETH requires implementing an additional dropdown to select which token the user wants to use

Selection next to the wallet connection

The user selects globally the token he desires to use for his transactions.

On clicking, a selection of tokens is presented, which the Dapp can expand overtime.

It's also possible to propose different discounts for specific tokens (e.g. below the protocol's token has a higher discount)

See below the examples from KOI and Gravita.

Selection from the widget

At Zyfi, we propose the feeToken selection directly into the widget.

The input token of the swap is automatically pre-selected, but the user can choose another one if so desired.

Flow 2: The transaction is sponsored

Our sponsored paymaster allows to provide free or discounted transactions to your users.

As you set it with the sponsorshipRatio parameter when calling our API on each transaction, any off-chain business logic is possible.

For example, below we fully sponsor swaps is the user is buying over $100 of KOI:

We can also allow other parties to sponsor transactions through our API.

In the example below, an NFT project sponsor transactions for their holders

Last updated