Methods
The public methods of the Core contract
lpFee
: Returns the fee used for liquidity providers.
changeLpFee
: Changes the LP fee of the Core contract. Only the owner of the Core contract can call this function.
infinityNFTFee
: Returns the fee used for INFT holders.
changeInfinityNFTFee
: Changes the INFT fee of the Core contract. Only the owner of the Core contract can call this function.
getTotalFee
: Returns the total fee of the Core contract for swaps and burns.
getPools
: Returns the pool addresses for two ERC20 tokens.
initializeDex
: Initializes the Xfai DEX. initializeDex creates the seed pool for the DEX. Only the owner of the Core contract can call this function.
pause
: Pauses any function that can change the state of a pool within Dexfai. Only the owner of the Core contract can call this function.
swap
: Swaps one hosted ERC20 token for another hosted ERC20 token. This low-level function should be called from a contract which performs important safety checks.
flashLoan
: Enables users to request flash loans from Dexfai.
mint
: Performs two-sided liquidity provisioning and mints in return LP tokens for a given pool. The amount of LP tokens minted depend on the amount of _token0
and _token1
provided. This low-level function should be called from a contract which performs important safety checks.
burn
: Burns existing LP tokens for a given pool. The amount of _token0 and _token1 returned depend on the amount of LP tokens burned and on the reserves & weights of pool0 & pool1. This low-level function should be called from a contract which performs important safety checks.
skim
: Forces the token balance of a pool to match its reserves.
sync
: Forces the reserves of a pool to match its token balance.
Last updated