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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.dforce.network/lend/dtoken/interface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
