Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
Devan Purhar edited this page Dec 10, 2020 · 5 revisions

Robo-Advisor for Yield (RAY)

Summary

Staked introduces the Robo-Advisor for Yield (RAY), the easiest way to earn the highest yield on ETH, DAI, and USDC holdings. Users deposit funds into the RAY smart contract, customize which protocols should be considered, and an off-chain oracle monitors rates on eligible protocols. RAY automatically moves funds to the highest-yielding at option at any time. Users receive an ERC-20 tokens representing the value of positions they own.

RAY will support an expanding number of yield-generating opportunities, with initial support for Compound, dYdX, and bZx. Decisions about which protocols will be supported and key system variables will be handled through governance. This allows capital providers and smart contract authors to collaborate profitably in a decentralized manner.

RAY is a work in progress and several anticipated features have yet to be implemented. Please see the Roadmap at the bottom of this page and contact us if you have suggestions for greater clarity or better functionality.

How It Works

There are many ways to earn yield on your cryptocurrency and even more on the horizon. We refer to yield-generating contracts generically as Opportunities. One popular Opportunity is on-chain lending, sometimes referred to as decentralized finance, DeFi, and Open Finance. The on-chain lending protocols (Compound, dYdX, bZx, Nuo, et al) offer smart contracts allowing a cryptocurrency investor to trustlessly lend their crypto to someone else. Yields on these Opportunities change constantly in response to investor demand and other market factors.

Most investors want to earn the highest yield available. RAY delegates the analysis to software and reallocates assets in real time as the market changes. A RAY user simply chooses the Opportunities to be considered. An off-chain oracle monitors the yield environment and signals RAY when reallocation is profitable. The smart contract then handles the reallocation.

The oracle is currently run by Staked, but RAY will evolve to use multiple oracles run by third-party validators. Smart contracts will then take the median of investment instructions, similar to Maker's Medianizer.

The key innovation RAY provides is connecting yield-generating smart contracts with pooled liquidity. Given the pace of innovation, Decentralized Finance (DeFi) will continue to create a wide array of yield generating Opportunities that investors should consider. Pooled liquidity lowers the cost of finding and evaluating eligible Opportunities for all investors. Meanwhile, smart contracts that generate above-market yields get fast access to liquidity.

RAY's utility grows as new Opportunities are supported. Examples that we expect to support include:

  • Staking on ETH2.0
  • Purchasing locked ETH at a discount to fair value to provide liquidity
  • Novel token distribution systems (e.g. Signaling on Edgeware, Livepeer's Merkle Mine, NuCypher's Workdrop)
  • Automated tax loss harvesting
  • Overwriting call options
  • Providing liquidity to on-chain exchanges such as Uniswap or Bancor

We are optimistic that the ecosystem is just getting started! RAY enables Opportunities that are ephemeral, smaller, or otherwise restricted to access liquidity and maximize their potential.

RAY Token

Mint a new RAY by depositing capital into the smart contract and customizing the Opportunities that you want to be monitored. Depositors receive ERC-20 tokens - the Robo-Advisor for Yield (RAY) - representing the value of positions held. Holders can add or remove capital at any time, though it may be subject to liquidity constraints of the underlying protocol. The tokenized position can also be sold to a third-party.

Capital Allocation

RAY uses an off-chain oracle to measure the yields from eligible opportunities and allocate capital. The oracle regularly updates yields and allocates capital accordingly.

Funds can only be allocated to a white-listed group of contracts, minimizing the risk of a malicious oracle. Staked currently operates a single version of the oracle on its secure infrastructure. Eventually, multiple oracles run by third-party validators will operate independently and the smart contracts will use the median values, similar to Maker's Medianizer.

The oracle pulls yields directly from the smart contracts to avoid API errors or similar attacks (e.g. MITM). It estimates the impact of additional capital on each opportunity and uses a non-linear program to determine the optimal allocation of capital.

Alpha, the Benchmark Rate, and the Alpha Creators Pool

RAY aims to create ("Alpha"), or incremental yield above a benchmark rate. Initially, RAY uses the yield on Compound as the benchmark rate. A portion of the Alpha, initially 20%, is contributed to a pool of funds used as a loss reserve, to pay gas, and as a profit mechanic. This pool is known as the Alpha Creators Pool (ACP).

An example: Assume the benchmark rate is 4.0% annually and a RAY holder earns 5.0% over one year. 1.0% of Alpha has been created. When withdrawing, the RAY owner receives 4.8% yield and 0.2% yield is paid to the ACP.

The ETH staking yield and the DAI Savings Rate are likely to become the benchmark in the future. Changes to the benchmark or fee structure will be controlled through a governance process.

Governance

Several key variables control RAY's behavior. Staked initially controls these variables, but will distribute this responsibility to the holders of the ACP: suppliers of capital, creators of new yield-generating strategies, and network validators. We expect to gradually decentralize decision making, eventually reaching full decentralization.

The ACP will also act as a backstop in the event of loss. Much like MakerDAO's recapitalization capital loss will trigger minting and sale of ACP tokens until the loss is covered.

Adding New Opportunities

RAY will evolve as new yield-generating smart contracts are created. We expect to add additional contracts regularly. Authors of new RAY opportunities will receive ACP, funded through inflationary funding to directly compensate them for their contribution to the Alpha they've generated.

There are three functions that any new Opportunity Contract needs to support, outlined here:

  1. Ability to supply assets - supply()
  2. Ability to withdraw assets - withdraw()
  3. Ability to get balance of assets (capital + yield generated) -getBalance()

Each of these functions needs to be supported for at least one of the coins we support (currently ETH, DAI, and USDC). We will provide a generic contract with sample code shortly.

Roadmap

  • Support additional yield generating contracts (See Requests for Contracts for what we'd like to see supported)
  • Create Governance Token (ACP)
  • Re-invest collected RAY Fees in separate pool
  • Loss Recovery Mechanism
  • Term-lengths/lockup periods or early exits
  • Decentralized Governance
  • Decentralized Off-chain Oracles