# Cofi Documentation

👋 Welcome to Cofi!

<figure><img src="/files/wbs5IZPE3t9o4zvcWhmb" alt=""><figcaption></figcaption></figure>

Cofi is a web3 application built on the Ethereum and Solana networks that allows users to raise, direct, and prove funding for both themselves and others. Depositors piggyback on the ever-growing Decentralized Finance ecosystem, providing liquidity to stable-asset pools with optimized APY interest rates. That interest is directed by the user in "stake streams" to designated recipients - coalescing as a single source of funding for any Ethereum wallet account.&#x20;

\
Every Cofi financial action is powered using the decentralized web3 stack, which means that it too can be used, in turn, to add to the functionality of other web3 compatible applications. This developer documentation portal is designed to help other developers learn how to use the Cofi smart contracts, provide understanding of their fundamental mechanisms, and contextualize the use-cases and unique value proposition that Cofi brings to the DeFi ecosystem.&#x20;

<figure><img src="/files/rQ9UI9PFoWv9nKeaTN7Y" alt=""><figcaption><p>Connect to and Support others on Cofi</p></figcaption></figure>

## ⁉️ | [FAQ](/frequently-asked-questions)

Your one-stop shop for all things Cofi.

## 💸 | [The Finances](/the-finances)

How does Cofi make money grow so fast *with crypto* but *without* *crypto risk?*

## 🪄 | [Rewards](/rewards)

Get unique, verifiable, and rare digital rewards from those you support - no NFTs required.

## 👜 |[ The Cofi Wallet](#undefined)

Learn about our default non-custodial wallet system with its perks-and-features.


# Frequently Asked Questions

Let's cover the basics.

## What is Cofi?

Cofi is a decentralized application built on Solana and Ethereum that lets you generate interest in no-risk lending pools. What makes Cofi unique is the decentralized way that interest is designated to *any* Ethereum wallet in what we're calling *stake-streams.* Users get verifiable proof-of-support for designating interest recipients, creating singular pools of interest accessible by the stake recipient *at any time\** and in *any way\*.*

<figure><img src="/files/3SBOA94ybGCwzgol14Z8" alt=""><figcaption><p><em>It's us!</em></p></figcaption></figure>

## How does Cofi create its interest rate?

The Decentralized Finance ecosystem grows at a fast clip. The *for-the-people* approach to collateralized lending (a complicated, usually middleman-riddled subject dominated by banks) was programmatically made redundant by the Solana and Ethereum world computers and, more recently, has garnered hundreds of billions in its lending systems. Cofi taps into these lending pools, eliminates risk, and exposes only the *positive* variable-rate interest. What this means is that you get the interest rate that the bank would *usually* get - instead, lent from people, to people.

## What is a "stake-stream"?

The interest that someone creates with their money can be directed to *anyone, anywhere.* When you designate a person to receive the interest you would have otherwise earned for yourself, we call it a "stake stream" - you "stake" a bit of your own principal and "stream" the interest to whomever you like. When you don't pick someone to receive this interest, you keep it yourself - something like a "self-stake" (or, really, a savings growth account).

## How much does Cofi take for depositing funds?

Transactions are built on the Ethereum Blockchain, which comes with it a fee structure that ensures that each user does not overwhelm the network. Cofi gets none of this fee and, as a matter of fact, takes *no* fees from the deposits users make. Instead, Cofi receives a percentage of the interest that you generate for yourself and others.&#x20;

## Who controls the money that I use on Cofi?

You do! Cofi doesn't store user funds and doesn't have access to any of your private financial information. What this means is that you control your data and that Cofi acts as a simple portal to interact with the larger financial world instead of a gatekeeper that forces you to give us data just to be shown a slice of what we want you to see.

## Is there any risk? It's crypto, right?

There is no platform considered to be entirely risk free. That said, Cofi's very low risk doesn't come from the financial systems we create but instead the smart contract risk (like a bug in the code) and something called *liquidation risk* (like the risk found when there's a worldwide bank-run). We've taken precautions against the former and are highly skeptical of the latter.

## Why would I ever give my interest away?

By supporting others with stake-streams, you can earn their customized, unique rewards. Rewards are made by stake-stream receivers to be issued to their supporters on a month-by-month basis and once a reward is created, it becomes anchored to that point in time to only those specific supporters. Due to the limited nature of these rewards, you can convert these "lazy-minted" rewards into fully interoperable, Ethereum-based non-fungible tokens which can be transferred or and sold anywhere.\
\
You can also make your own rewards that people who stake into you can earn for themselves! Make them however you like - they're free forever.

## Is there a mobile app?

Yep. We've made both an iOS and Android app that can work with our full platform (though, Web3 wallets need to use the desktop version for now). We're ironing out the kinks, but we expect to have the iOS version ready before the Android application.

## Web3 version? I thought all of Cofi was based on Web3.

Cofi is built using Web3 - or, the *decentralized web.* However, there are multiple ways of interacting with this new web standard. You can come to Cofi and create an account that's interoperable with the Web3 world *or* bring your own wallet and interact directly with the tools we've made.&#x20;

## What assets do you support?

At launch, we're only supporting Ethereum-flavored USDC as a source of funds for streams. This means that, for now, there is only very low inherent risk in the types of stake-streams that you can make on-platform. That said, we are able to support any ERC-209 compliant asset with time, and we expect to move quickly to any blockchain that can provide users with the same financial security and support that Ethereum can with time.

## Who made Cofi?

The Darwins team built Cofi in sunny Southern California. We come from a variety of backgrounds and are looking to help build both a diversified and unified future for the decentralized web. \
\
Find us [here](https://www.darwins.io) at darwins.io!


# The Finances

How the money moves.

## 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.


# Rewards

Get (and give!) rewards for support.

## What's a Cofi reward?

Rewards signify the proof of support from stake-stream creators. Cofi gives every user the ability to designate a month-by-month reward that earners can receive when supporting them. These rewards are customizable, made specifically by each recipient for their supporters. While Cofi only supports pictures as rewards for now, we expect to support many different types of digital file types later on.

\
\
As a supporter, you earn unique, verifiable, traceable, and ultimately blockchain-backed rewards that you can use as proof-of-support anywhere in the world. These rewards are upgradable to Ethereum-based NFTs and can even be bought and sold on common NFT trading platforms like OpenSea.

<figure><img src="/files/pQVhnM7GMmGx7eIjrJA1" alt=""><figcaption><p>Get rewards from the people you support through Cofi stake-streams!</p></figcaption></figure>

## Creating Rewards

Rewards can be made by any Cofi user. By designating a month, year, and customization details, a person can automatically reward their supporters through digital, unique rewards. You can plan multiple months of rewards in advance and each person who supports you earns their corresponding unique reward.\
\
Rewards are "lazy-minted" on Ethereum when they are earned. Each reward is assigned a unique cryptographic hash that proves a time and recipient as well as their support. Each of these is capable of "upgrading" into their fully minted, Ethereum-based NFT.

![Make rewards for your supporters quickly and simply](/files/GpRl6C7iKRpkWjIX2La3)

### Limiting your rewards

Subscribers (\*) have access to a couple more tools when creating their rewards. At launch, GIFs are supported for subscribers, as well as stake-stream size limitations and leaderboard positioning month-to-month. For example, subscriber rewards can designate a GIF reward that is only dispensed to the top 3 supporters who create stakes of $100.00 USD or more. This would limit the supply of rewards available for that month as well as create incentives for supporters to compete for extra-scarce items.

## Receiving Rewards

### Earning Rewards

When a Cofi user offers a standard reward, stake-stream supporters automatically receive the reward at the end of the corresponding month. However, a subscriber might set limitations that limit the availability of the reward (and this information is available in each individual rewards' information screen).

### Upgrading Rewards

Once a reward is earned, supporters can choose to upgrade their rewards to Ethereum ERC-721 NFTs, which are supported across most Ethereum wallets and exchanges. Upgraded rewards can be:

* Transferred to any Ethereum-compatible wallet
* Sold on NFT marketplaces like OpenSea and EnjinX
* Used as profile pictures on Twitter and other Ethereum-compatible platforms

... amongst other things.

The process of upgrading rewards is backed by the Ethereum network. Like stake-streams, this incurs a cost that ensures correct usage of the Ethereum network. Once this process is completed, all subsequent transfers would also incur network fees as a function of the Ethereum blockchain.


# The Cofi Wallet

The Cofi non-custodial wallet is the new hotness, (don't) trust us.

The Cofi wallet is the default mode of interaction with the Cofi platform. That's not to say it's the only way (or even the primary) way to interact with our application and its features, but we've designed Cofi to work for users of all types in a way that we think best melds the security of self-custody and the protection of central recovery mechanisms.&#x20;

## Blockchain support

The Cofi wallet is a Hierarchically Deterministic (HD) Wallet. This means that the wallet can store any cryptocurrency asset in the long-term, though we are only supporting three at launch.

<figure><img src="/files/3TqpDLM3ySe9FBtEqBn9" alt=""><figcaption><p>The Cofi non-custodial wallet is designed with practicality in mind</p></figcaption></figure>

### Solana

The Cofi wallet is primarily a Solana account as the primary source of interest generation lives on Solend, located on the Solana blockchain.  Solana offers low fees, secure transactions, and scalability that we prefer. With that in mind, we've also rolled in Ethereum and Bitcoin wallets for both asset storage and recovery.&#x20;

### Ethereum

The Cofi wallet contains an Ethereum account wallet as the original smart contracts used to generate and direct interest as well as create rewards are deployed to the Ethereum network. At launch, you can store and use Ethereum in a Cofi wallet to fuel transactions directly or simply as a tool to track your portfolio.

### Bitcoin

The Cofi wallet supports bitcoin storage. Because Bitcoin cannot be transferred on the Ethereum blockchain, you cannot use bitcoin to make stake-streams.

## Recoverability

If you lose access to your account, you can use a combination of your other credentials to attempt wallet recovery.

{% hint style="info" %}
Because the Cofi wallet is non-custodial, Cofi itself *cannot* recover your wallet if the following steps are impossible. For this reason, you should keep backups of your seed phrase in a safe and memorable location.
{% endhint %}

### &#x20;Password + PIN:

The usual method of decrypting and using the Cofi wallet is through a combination of password and a 4-8 digit PIN. You will notice that every transaction on the Cofi platform requires confirmation through your stored PIN. This decodes the version of your wallet that instances when you log in to the Cofi application, allowing you to make stake-streams and withdraw interest (as well as any other blockchain actions)

### Security Question

If you lose your password, use your security question to send a verification link to your email address. This will allow you to reset your password and continue using the Cofi app.

{% hint style="info" %}
Make sure to make you security question hard to figure out! If it's too easy, bad actors can access your account if they can access your emails.
{% endhint %}

### Seed Phrase

The wallet seed phrase is a 12-word mnemonic that can be used to recover your wallet. This mechanism will instance any Ethereum wallet, even in the case the Cofi ceases to exist. **We highly recommend you store this phrase in a secure location.**


