> For the complete documentation index, see [llms.txt](https://docs.teller.org/teller-diamond/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teller.org/teller-diamond/facets-aka-mini-contracts/lending.md).

# Lending

#### `ttoken`

Contains all the ways to interact with a `tToken`, which include minting, burning and even strategies. Let's take a look at what's under the hood here.

* `strategies`
  * `ITTokenStrategy` The interface with the functions required to be implemented in a Dapp strategy contract. It contains the strategy to `rebalance()`, allows users to `withdraw()` from a pool or give us the `totalUnderlyingSupply()` of an underlying asset.
  * `compound` So far, we only have one current strategy for our `ttoken` and that is related to the **compound**decentralized application
    * The logic of this strategy is found in the `TTokenCompoundStrategy.sol`
    * More info on the compound strategy [can be found here.](https://www.notion.so/TToken-Compound-Strategy-116b80b5ecdb48da84d801d974f20ac4) Note that it implements the `ITTokenStrategy`interface
* `TToken` contains all the functions required to interact with a `ttoken`
  * It is `ERC20Upgradeable`, which means we can upgrade the interface contract to add more functions down the line
  * [**You can find the code here**](https://github.com/teller-protocol/teller-protocol-v1/blob/develop/contracts/lending/ttoken/TToken_V1.sol)
  * It can get/set strategies, fund/repay loans, burn tokens to redeem profit and get other metadata of the respective `ttoken`.
* `LendingFacet.sol` contains all the functions required to both create a lending pool (to allow DeFi developers to create their own markets) and to deposit into a pool. Depositing into a pool transfers the underlying asset to the pool and mints new `ttokens` of the underlying asset into the lender's wallet
