Skip to main content

UI

Overview#

This 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 params#

front-end supports

ParameterTypeDescription
themeStringSets them to dark or light mode.

Swap Page#

ParameterTypeDescription
inputCurrencyaddressInput currency that will be swapped for output currency.
outputCurrencyaddress or ETHOutput currency that input currency will be swapped for.
exactAmountnumberThe custom token amount to buy or sell.
exactFieldstringThe 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 prevent ETH being populated in both token fields

Pool Page#

The Pool page basically has 2 subroutes: add & remove liquidity.

Add Liquidity#

ParameterTypeDescription
Token0addressPool to withdraw liquidity from. (Must be an ERC20 address with an existing token)
Token1addressPool to withdraw liquidity from. (Must be an ERC20 address with an existing token)

Remove Liquidity#

ParameterTypeDescription
Token0addressPool to withdraw liquidity from. (Must be an ERC20 address with an existing token)
Token1addressPool to withdraw liquidity from. (Must be an ERC20 address with an existing token)