Making a deposit
In order to make a deposit first approve a compatible stablecoin allowance for the exchange on the amount you wish to deposit, then call the exchange's depositTokens
function:
Obs: An EIP-2612 compatible depositTokens
function is also provided for deposit functions in a single transaction.
After the operation completes check total exchange balance for an address using the balanceOf
function:
Balance is returned in dollars considering 18 decimal places.
In case you wish to withdraw funds (ex: profits from an operation) call the withdrawTokens
function:
The function will transfer stablecoin tokens to the msg.sender
for the requested amount, provided that the caller has enough unallocated balance. Since the exchange accepts multiple stablecoins the withdrawer should expect to receive any of these tokens.
Obs: If there aren't enough stablecoins available in the exchange the solicitant will receive ERC20 credit tokens issued by the credit provider contract which can later be redeemed for stablecoins at a 1:1 value conversion ratio.
Last updated