Version: V1
UI
#
OverviewThis section briefs the DMM frontend page and the parameters used. As the page supports additional params in the URL, users and developers can use these query parameters to link to the DMM frontend with custom prefilled settings.
#
Global paramsfront-end supports
Parameter | Type | Description |
---|---|---|
theme | String | Sets them to dark or light mode. |
#
Swap PageParameter | Type | Description |
---|---|---|
inputCurrency | address | Input currency that will be swapped for output currency. |
outputCurrency | address or ETH | Output currency that input currency will be swapped for. |
exactAmount | number | The custom token amount to buy or sell. |
exactField | string | The field to set custom token amount for. Must be input or output . |
ETH is the default input currency. When a different token is selected either for input or output, ETH will default to be the quote pair.
#
Constraints- Addresses must be valid ERC20 addresses.
- Slippage and amount values must be valid numbers (or error will prevent from swapping). Slippage can be 0, or within the range 10->9999 bps (which converts to 0%, 0.01%->99%)
The UI prevents ETH from being populated in both token fields
#
Pool PageThe Pool page basically has 2 subroutes: add
& remove
liquidity.
#
Add LiquidityParameter | Type | Description |
---|---|---|
Token0 | address | Pool to withdraw liquidity from. (Must be an ERC20 address with an existing token) |
Token1 | address | Pool to withdraw liquidity from. (Must be an ERC20 address with an existing token) |
#
Remove LiquidityParameter | Type | Description |
---|---|---|
Token0 | address | Pool to withdraw liquidity from. (Must be an ERC20 address with an existing token) |
Token1 | address | Pool to withdraw liquidity from. (Must be an ERC20 address with an existing token) |