2️⃣Configure the Widget
Our widget offers a range of variable features for you to customize according to the specific needs of your project. You can begin by configuring the fundamental settings, such as the default source and destination chains, tokens, and the input amount in the default setting.
Disabling the specific chains
XY Finance offers services across multiple chains, and our partners can choose to disable certain chains by configuring the disabledChains
setting. This results in a simpler and more streamlined interface for users, allowing them to quickly find the information they need. Here's an example with a few disabled chains to demonstrate this.
Disabling the specific tokens
If you choose to disable a particular token from appearing on their widget, it will no longer be searchable by its symbol name or address. This provides customers with an easy way to block tokens they may dislike or not trust. To illustrate this, we'll use our $XY token as an example.
Featuring the tokens you wish to promote
To make it easy for customers to promote a token to their partners, we offer a 'featured token' function. With this feature, you can pin the token you want to display at the top of the list, giving it greater exposure.
Configure the referrer
This option requires you to provide a web3 wallet address or smart contract address. Please complete the form. If the commissionRate
is not configured, the referrer parameter will solely be utilized for tracking the traffic linked to your account.
Set the commission rate
Setting the commissionRate will collect a fee percentage from the user's swap amount, which is then directly distributed to the specified wallet address. XY Finance will receive a share of these fees, varying according to the use case and transaction volume.
commission rate
represents the fee you wish to collect. It is an integer between 0 and 20,000. In this range, 20,000 corresponds to 2%, 1,000 represents 0.1%.referrer
parameter represents the address where you want to receive the fees. The collected fee in every transaction will be directly transferred to this address. Before proceeding, please ensure that the provided address is under your management and capable of receiving assets correctly.
For additional information, please refer to our Widget API Reference.
Last updated