# Interface

## 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 1e18`*

* totalUnderlying() returns (uint)

  *`return the total underlying token amount`*

* getRealLiquidity() returns (uint)

  *`return current liquidity of the underlying token`*

* balanceOfUnderlying(address \_account) returns (uint)

  * \_account: account address.

  *`return the underlying token balance of the given account`*

* getBaseData() 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 1e18`*

* paused() returns (bool)

  *`return true if paused, false if not paused`*

* feeRecipient() returns (address)

  *`return fee receiving address`*
