# InterestManager

The task of the `InterestManager` is to invest `Dai` into an interest-generating protocol. Currently this is implemented as `InterestManagerCompound` which invests into Compound.

* `invest`: Invests `Dai` to generate interest
  * `uint amount`: The amount of `Dai` to invest
  * `returns`: The amount of `cDai` received
* `redeem`: Redeems `Dai`
  * `address recipient`: The address to receive the redeemed `Dai`
  * `uint amount`: The amount of `Dai` to redeem
  * `returns`: The amount of burned `cDai`
* `redeemInvestmentToken`: Redeems `Dai`, but with the `amount` parameter being the amount of `cDai` to convert instead of the amount of `Dai` to redeem.
* `accrueInterest`: Calls the underlying protocol to update the accrued interest which in this case is `cDai.accrueInterest()`
* `withdrawComp`: Transfers `COMP` tokens to the `compRecipient`


---

# 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://docs.ideamarket.io/contracts/interestmanager.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.
