> For the complete documentation index, see [llms.txt](https://docs.cofi.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cofi.app/the-finances.md).

# The Finances

## Interest Rates and Principal

Cofi uses multiple decentralized-finance lending pools both on Solana and Ethereum to provide its interest rate. In particular,  Cofi uses the [solend.fi](https://www.solend.fi) lending protocol on Solana and the  [yearn.finance](https://yearn.finance/#/home) no-risk vault strategies on Ethereum. What this means is that interest generation mechanisms are abstracted away from both stream creators and stream recipients and look more like variable-rate, interest-bearing bonds than a collateralized, growing lending pool. We highly recommend reading through the [Solend](https://docs.solend.fi/) and  [Yearn](https://docs.yearn.finance/) documentation if you want to see how their pools are decided and how their interest rates are determined - they're both quite nifty.

## Stake-Streams

Stake-streams are the core financial mechanism of the Cofi application. They are interest-bearing instruments that take between two and three core arguments: a **principal amount**, a **recipient**, and an optional **duration**.&#x20;

<figure><img src="/files/WtLF6Fh9UDULaOl78Ttc" alt=""><figcaption><p>Recipients get their own interest PLUS designated untimed stake-streams' interest <em>in real time</em></p></figcaption></figure>

### Untimed Streams

Untimed stake-streams are designated sets of principal that give rights to their generated interest to a designated recipient. The recipient of this interest can be any Ethereum account with an address - the user with access to this account's private keys can, at any point, withdraw the generated interest that an untimed stake-stream has made up to that point. Additionally, stake-streams from different users to a single recipient are accessible for withdrawal concurrently - one can withdraw all interest from all untimed streams at once. &#x20;

What makes this type of stream "untimed" is the ability for a stream creators to end them at any point and the ability for recipients to be able to withdraw interest at any time.&#x20;

### Timed Streams

While similar in principal, timed streams have two core differences in their design from untimed streams: a principal lock "promise" and a withdrawal "promise".&#x20;

Timed stake-streams require a preset length of time for which they become unavailable for withdrawal by the stream creator. A stream creator designates an end-date at which point the timed stake behaves as an untimed stake - withdrawable by the stream creator at will.&#x20;

During a timed-streams' locked duration, interest is generated and designated to the recipient. However, this interest is locked and compounded until the locked stake is complete. In this way, timed stake-streams are guaranteed to generate compounding interest for the duration set by the streams' creator.

### Anonymous Streams

By default, stakes-streams have your username attached to them for the receiver (and other supporters) to see. However, in the case that you do not want your username to be readily available for others to easily find, simply indicate that a stream should be *anonymous* at the point of creation. While the blockchain will still index your transaction and show your Ethereum address, we won't show your username and instead make your details anonymous on leaderboards and rewards screens.

## Growth Accounts

A growth account is a stake-stream that is designated for yourself. This acts similarly to a traditional savings account in which principal grows at a compounding interest rate. By default, streams others make into you will appear as interest here and compound their effects into your own personal growth account.

## Redeeming Interest

### Interest from Growth Accounts

Growth accounts behave like traditional savings accounts. When interest is generated, it is immediately withdrawable by the account holder. Unwithdrawn funds are compounded with time - making each interest-generating period grown faster than the last holding interest rate constant.

### Interest from Streams

Interest generated from stake-streams created by others is only withdrawable by the designated interest recipient and becomes available differently depending on the type of stream made.

#### Timed Streams

Timed streams are unavailable for withdrawal until their designated time period has elapsed. However, once available, interest is withdrawable immediately. If not withdrawn, interest accrues like a normal stake-stream until withdrawal occurs.

#### Untimed Streams

Untimed stream interest accrues until withdrawn, though interest withdrawal does not end the stake-stream. Streams continue to accrue interest until withdrawn (or redirected) by their creators and will continue to grow until such an event occurs.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cofi.app/the-finances.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
