Interface
dToken contract is fully compatible with ERC20 standard, other interfaces are descripted here.
Send Transactions
mint(address _dst, uint _pie)
mint certain amount of underlying to dst address_dst: account who will get dToken.
_pie: underlying token amount.
redeem(address _src, uint _wad)
redeem certain amount of dToken from dst address_src: account whose dToken will burn from.
_wad: dToken amount to burn.
redeemUnderlying(address _src, uint _pie)
redeem certain amount of underlying from dst address_src: account whose dToken will burn from.
_pie: underlying token amount to withdraw.
ERC20 Interface
Please refer to https://eips.ethereum.org/EIPS/eip-20.
Call
currentExchangeRate() returns (uint)
return the most recent exchange rate, scaled by 1e18totalUnderlying() returns (uint)
return the total underlying token amountgetRealLiquidity() returns (uint)
return current liquidity of the underlying tokenbalanceOfUnderlying(address _account) returns (uint)
_account: account address.
return the underlying token balance of the given accountgetBaseData() returns (uint, uint, uint, uint, uint)
return (decimals, exchangeRate, mintFeeRate, redeemFeeRate, totalUnderlying)decimals: token decimals.
exchangeRate: the most recent exchange rate, scaled by 1e18.
mintFeeRate: the fee rate of mint(), scaled by 1e18.
redeemFeeRate: the fee rate of redeem()/redeemUnderlying(), scaled by 1e18.
totalUnderlying: the total underlying token amount.
originationFee(bytes4 _sig) returns (uint)
_sig: function signature to query.
return fee, scaled by 1e18paused() returns (bool)
return true if paused, false if not pausedfeeRecipient() returns (address)
return fee receiving address
Last updated
Was this helpful?