The Fund: Technical Explanation

We have one goal: give you the best yield. This talks a little bit about how we do that and what we gain from it.
View simple explanation here.

RFT : Rari Fund Token
Each user's share of the fund is determined by their RFT balance. When you deposit funds to Rari, an equivalent amount of RFT (Rari Fund Token) is minted to your account. When you withdraw funds to Rari, the equivalent amount of RFT is burned from your account. As soon as you deposit, you start earning yield. Essentially, fund holdings and yield are split up proportionally across RFT holders by their USD balances. RFT's value is equivalent to stablecoins + the yield accrued on them.

Generating Yield
Currently, Rari generates yield by depositing a combination of DAI and USDC to the lending protocol dYdX as well as DAI, USDC, and USDT to the lending protocol Compound. In the near future, we will be generating yield from more currencies across more lending protocols, among other strategies.

Deposits
Only certain stablecoins are accepted for direct deposits (direct meaning without exchange to an accepted currency). When depositing one of these stablecoins, the Rari web client approves tokens to RariFundManager and calls RariFundManager.deposit(string currencyCode, uint256 amount). When you deposit another currency, the Rari web client approves tokens to RariFundProxy and calls RariFundProxy.exchangeAndDeposit(address inputErc20Contract, uint256 inputAmount, string outputCurrencyCode, LibOrder.Order[] orders, bytes[] signatures, uint256 takerAssetFillAmount) to exchange your tokens via 0x and then deposit them (please be aware that 0x charges an ETH protocol fee).

Withdrawals
Just like only certain stablecoins are accepted for direct deposits, only stablecoins held by the fund are available for direct withdrawals. When withdrawing one of these stablecoins, the Rari web client approves RFT to RariFundManager and calls RariFundManager.withdraw(string currencyCode, uint256 amount). When you withdraw another currency, the Rari web client approves RFT to RariFundProxy and calls RariFundProxy.withdrawAndExchange(string[] inputCurrencyCodes, uint256[] inputAmounts, address outputErc20Contract, LibOrder.Order[][] orders, bytes[][] signatures, uint256[] makerAssetFillAmounts, uint256[] protocolFees) to withdraw your tokens and then exchange them via 0x (please be aware that 0x charges an ETH protocol fee).

Security
Rari's Ethereum-based smart contracts are written in Solidity and reviewed by multiple partners for security. Rari does not have control over your funds: instead, the Ethereum blockchain executes all secure code across its entire decentralized network (making it very difficult and extremely costly to rewrite history), and your funds are only withdrawable by you (or an upgrade of RariFundManager). However, upgrades will become decentralized in the future via a governance protocol based on a potential token. Please note that using our web client online at app.rari.capital is not nearly as trustworthy as downloading, verifying, and using it offline. Lastly, the rebalancer is centralized, but it can only rebalance funds to different currencies and pools. In the near future, we will be implementing a smart-contract-based (and therefore decentralized) slippage limit.

Smart Contract Structure
RariFundManager handles deposits and withdrawals to the fund, as well as all other external functions, other than RariFundToken's functions as well as the exchangeAndDeposit and withdrawAndExchange functions of RariFundProxy (see Deposits and Withdrawals above for more information on RariFundProxy). RariFundManager depends on the external library RariFundController (a library useful only to RariFundManager).

Performance Fee
A 20% performance fee is deducted from all yield earned (interest and earnings like $COMP) by RFT holders. This fee is liable to change in the future, but fees on past interest cannot be changed.

Slippage / Bonus
When you deposit any asset, the fund will automatically exchange it for the fund's current allocations. This exchange incurs slippage that may work in your favor (returns a bonus) or negatively (negative slippage). The slippage is based on how liquid 0x's partner orderbooks are.

$COMP
All COMP (Compound's governance token) earned by the fund is liquidated into additional interest for RFT holders every 3 days.

Risk
You can learn more about the risk of investing in Rari here.

Slippage / Bonus
When you deposit any asset, the fund will automatically exchange it for the fund's current allocations. This exchange incurs slippage that may work in your favor (returns a bonus) or negatively (negative slippage). The slippage is based on how liquid 0x's partner orderbooks are.

$COMP
All COMP (Compound's governance token) earned by the fund is liquidated into additional interest for RFT holders every 3 days.

Risk
You can learn more about the risk of investing in Rari here.