Skip to content
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
26d31af
Update welcome-to-optyfi.md
Kilniv Nov 28, 2021
811be15
Update why-optyfi.md
Kilniv Nov 28, 2021
45b032e
Update how-optyfi-works.md
Kilniv Nov 28, 2021
9709a1d
Update join-the-community.md
Kilniv Nov 28, 2021
2ef2451
Update README.md
Kilniv Nov 28, 2021
5977a40
Update tokens-and-pools.md
Kilniv Nov 28, 2021
a74dd2f
Update vaults.md
Kilniv Nov 28, 2021
924f68a
Update strategy-composition.md
Kilniv Nov 28, 2021
bf4146b
Update README.md
Kilniv Nov 28, 2021
ddc17a7
Update investment-strategies.md
Kilniv Nov 28, 2021
b5b628e
Update reward-strategies.md
Kilniv Nov 28, 2021
537e9dd
Update risk-framework.md
Kilniv Nov 28, 2021
cc5066d
Update strategy-execution.md
Kilniv Nov 28, 2021
e3387b9
Update optimization-engine.md
Kilniv Nov 28, 2021
1125112
Update participants.md
Kilniv Nov 28, 2021
1a9f37b
Update use-cases.md
Kilniv Nov 28, 2021
47d7edc
Update participants.md
Kilniv Nov 28, 2021
8ca8cd0
Update how-optyfi-works.md
Kilniv Dec 12, 2021
3767589
Update join-the-community.md
Kilniv Dec 12, 2021
acc4e25
Update welcome-to-optyfi.md
Kilniv Dec 12, 2021
8d255ac
Update why-optyfi.md
Kilniv Dec 12, 2021
e88d229
Update README.md
Kilniv Dec 12, 2021
57cee05
Update optimization-engine.md
Kilniv Dec 12, 2021
78c537f
Update risk-framework.md
Kilniv Dec 12, 2021
525c4da
Update strategy-composition.md
Kilniv Dec 12, 2021
cae0f0a
Update strategy-execution.md
Kilniv Dec 12, 2021
2bb5850
Create strategy-execution.md
Kilniv Dec 12, 2021
8f44f7b
Update tokens-and-pools.md
Kilniv Dec 12, 2021
8f17440
Update vaults.md
Kilniv Dec 12, 2021
c5b9bd5
Update use-cases.md
Kilniv Dec 12, 2021
43e0c6c
Update governance-overview.md
Kilniv Dec 12, 2021
2469676
Update optyfi-dao.md
Kilniv Dec 12, 2021
a5ca8de
Update voting.md
Kilniv Dec 12, 2021
e0876d5
Update operators.md
Kilniv Dec 12, 2021
135ce51
Update treasury.md
Kilniv Dec 12, 2021
8b14309
Update opty-governance-token.md
Kilniv Dec 12, 2021
8e389b6
Update opty-tokenomics.md
Kilniv Dec 12, 2021
7d0e59a
Update liquidity-mining-and-staking.md
Kilniv Dec 12, 2021
4093dd4
Update adaptive-user-rewards-distribution.md
Kilniv Dec 12, 2021
506ab3c
Update liquidity-mining-and-staking.md
Kilniv Dec 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions intro/how-optyfi-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ The OptyFi Protocol continuously monitors DeFi activity, predicting the yield of
The yield optimization model proceeds as follows:

1. **Dynamic Strategy Generation:** Strategies are dynamically composed based on the integrated protocols and blockchains.
2. **Optimization Engine:** Constantly monitors changing conditions across DeFi pools and scores the universe of possible strategies.
2. **Optimization Engine:** DeFi pools are constantly monitored, where the plethora of possible strategies are evaluated according to changing conditions.
3. **Strategy Execution Engine:** Smart contracts can execute any valid yield strategy \(across integrated protocols/blockchains\) while enforcing risk constraints.
4. **Automated Vaults:** Vault assets are automatically and continuously routed to the most optimal strategy.
5. **Modular Design:** Specialist vaults optimize a single type of asset providing optimal yield for a specific risk level. Portfolio vaults allocate assets across specialist vaults, diversifying risk and providing optimal asset allocation.

![OptyFi vault assets will be routed across multiple pools and protocols in real time.](../.gitbook/assets/how-it-works.svg)

Capital never stays idle with OptyFi.
By combining these elements together into a working application, OptyFi ensures capital to never stay idle.
Comment thread
Kilniv marked this conversation as resolved.
Outdated

11 changes: 5 additions & 6 deletions intro/join-the-community.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

The best way to get involved with OptyFi is to join our growing community of builders and users committed to risk-adjusted capital efficiency in DeFi. You can start by joining one or more of our community channels.

### [Forum](https://forum.opty.fi)
### [Discord](https://discord.gg/kVxKHUEpy8)

Join our forum for discussions on product development, feature requests, OPTY tokenomics, and other topics.
This is our most active community channel and the best place to learn and contribute to OptyFi.

### [Discord](https://discord.gg/kVxKHUEpy8)
### [Forum](https://forum.opty.fi)

This is our most active community channel and where you can learn and contribute the most to OptyFi.
Discuss product development, feature requests, OPTY tokenomics, and other topics by joining our Forum.

### [Twitter](https://twitter.com/optyfi)

Follow us on Twitter for announcements and updates.
Hear first about announcements and updates by following us on Twitter.
Comment thread
Kilniv marked this conversation as resolved.
Outdated

### [Medium](https://medium.com/optyfi)

Expand All @@ -21,4 +21,3 @@ Enjoy and stay up-to-date with our in-house research and content by following ou
### [GitHub](https://github.com/opty-fi)

Review and contribute to our open-source code repository on GitHub.

2 changes: 1 addition & 1 deletion intro/welcome-to-optyfi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The OptyFi Protocol provides simplified access to optimized yield across DeFi.

The Protocol ****evaluates thousands of yield strategies across hundreds of liquidity pools, dozens of protocols and multiple blockchains. OptyFi optimizes capital as assets deposited into vaults are continuously deployed into the most profitable strategies based on predefined risk profiles and preferences.
The Protocol evaluates thousands of yield strategies across hundreds of liquidity pools, dozens of protocols and multiple blockchains. OptyFi optimizes capital deposited into vaults which function as assets that are continuously deployed into the most profitable strategies. Strategies are determined based on predefined risk profiles and preferences.
Comment thread
Kilniv marked this conversation as resolved.
Outdated

This document aims to provide an overview of OptyFi including:

Expand Down
2 changes: 1 addition & 1 deletion intro/why-optyfi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Yield was the "killer application" that brought DeFi to the world's attention. But we are still at a very early stage.

The current status of DeFi yield consists of fragmented yield aggregation apps with hand-picked and inflexible yield strategies. Until DeFi is able to offer a user experience and technical sophistication comparable to TradFi, we will not achieve mainstream \(retail or institutional\) adoption.
The current status of DeFi yield consists of fragmented yield aggregation apps with hand-picked and inflexible yield strategies. Until DeFi is able to offer a user experience and technical sophistication comparable to TradFi, it will not achieve mainstream \(retail or institutional\) adoption.
Comment thread
Kilniv marked this conversation as resolved.
Outdated

OptyFi aims to deliver the user experience and technical sophistication of traditional asset management while preserving the ground-breaking advantages of decentralization.

Expand Down
11 changes: 4 additions & 7 deletions protocol/optyfi-protocol/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# The OptyFi Protocol

The OptyFi Protocol approaches DeFi yield from a first principles perspective.

Starting with an abstracted view of liquidity pools, we define yield [strategy steps](strategy-composition.md#strategy-step) which can be combined in [sequence](strategy-composition.md#strategy-sequence) into yield strategies, which in turn can be combined in parallel into yield portfolios. The universe of possible strategies form a directed [Strategy Graph](strategy-composition.md#strategy-graph), and executing a yield strategy can be conceptualized as traversing this Strategy Graph.

Users deposit their assets into OptyFI vaults, from where these assets are continuously deployed into optimal strategies that match the [risk profile](risk-framework.md#risk-profiles) of the vault.

[Strategy Execution](strategy-execution.md) contracts are able to execute any arbitrary multi-step strategy while enforcing [risk constraints](risk-framework.md). The [Optimization Engine](optimization-engine.md) continuously monitors thousands of data points across hundreds of liquidity pools in order to recommend the current optimal strategy to vaults.
The OptyFi Protocol approaches DeFi yield from a [first principles perspective](https://fs.blog/first-principles/).

Starting with an abstract view on liquidity pools, we define yield [strategy steps](strategy-composition.md#strategy-step), which are [sequentially combined](strategy-composition.md#strategy-sequence) into yield strategies. Multiple yield strategies can in turn be combined in parallel to obtain yield portfolios. The plethora of possible strategies form a directed [Strategy Graph](strategy-composition.md#strategy-graph), and executing a yield strategy can be conceptualized as traversing this Strategy Graph.
Comment thread
Kilniv marked this conversation as resolved.
Outdated

Users deposit their assets into OptyFi vaults. These vaults function as a liquidity pool from which assets are continuously deployed into optimal strategies that match the [risk profile](risk-framework.md#risk-profiles) of the vault.

[Strategy Execution](strategy-execution.md) contracts are able to execute any arbitrary multi-step strategy while enforcing [risk constraints](risk-framework.md). The [Optimization Engine](optimization-engine.md) continuously monitors thousands of data points across hundreds of liquidity pools in order to recommend the current optimal strategy to vaults.
19 changes: 9 additions & 10 deletions protocol/optyfi-protocol/optimization-engine.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Optimization Engine

DeFi is known to be volatile and DeFi yield markets are significantly inefficient. This means that the yields \(and risk\) of liquidity pools change continuously even for pools with the same underlying asset. The composability of DeFi protocols allows assets to be exchanged for "derivative assets" \(e.g. DAI for cDAI\) creating more potential volatility.
DeFi is known to be volatile and DeFi yield markets are significantly inefficient. This means that the yields \(and risk\) of liquidity pools change continuously, even for pools with the same underlying assets. The composability of DeFi protocols allows assets to be exchanged for "derivative assets" \(e.g. DAI for cDAI\), creating more potential volatility.

OptyFi is designed to allow continuous discovery of the most optimal yield strategies. Since this requires evaluation of multiple blocks of data from hundreds of liquidity pools, initially OptyFi's Optimization Engine is designed as an off-chain process that "recommends" the optimal strategy to each vault. [Strategy Execution](strategy-execution.md) smart contracts are responsible for executing this strategy, ensuring it includes only approved pools and enforcing risk constraints of the vault.
OptyFi is designed to allow continuous discovery of the most optimal yield strategies. Since this requires evaluation of multiple blocks of data from hundreds of liquidity pools, OptyFi's Optimization Engine is initially designed as an off-chain process that "recommends" the optimal strategy for each vault. [Strategy Execution](strategy-execution.md) smart contracts are responsible for executing this strategy, ensuring it includes only approved pools and enforcing risk constraints of the vault.
Comment thread
Kilniv marked this conversation as resolved.
Outdated

![How the OptyFi optimization engine works.](../../.gitbook/assets/optimization-engine%20%281%29.svg)

## Implementation

The Optimization Engine is implemented in a custom developed python library Opty.py which will be open-sourced and shared with the community. Key functions include:
The Optimization Engine is implemented in a custom python library (Opty.py) developed by the OptyFi team. This library will be open-sourced and shared with the community. Key functions include:

| Component | Function |
| **Component** | **Function** |
| :--- | :--- |
| **getPoolData** | Fetches liquidity pool data from the OptyFi API server. Currently, automated jobs capture pool data from the blockchain on an ongoing basis and make this data available to the Optimization Engine. However, this should be replaced by the Graph Protocol prior to launch. |
| **predictRates** | Uses fetched pool data to predict the deposit, borrow and reward rates for liquidity pools for the upcoming rebalancing window. This component incorporates pool data modelling; time series modelling and prediction and price impact modelling. |
| **buildStrategies** | Dynamically generates all possible strategies given the enabled pools. |
| **scoreStrategies** | Provides a score to each generated strategy based on the predicted rates. |
| getPoolData | Fetches liquidity pool data from the OptyFi API server. Currently, automated jobs capture pool data from the blockchain on an ongoing basis and make this data available to the Optimization Engine. However, this should be replaced by the Graph Protocol prior to launch. |
| predictRates | Uses fetched pool data to predict the deposit, borrow and reward rates for liquidity pools for the upcoming rebalancing window. This component incorporates pool data modelling; time series modelling and prediction and price impact modelling. |
| buildStrategies | Dynamically generates all possible strategies given the enabled pools. |
| scoreStrategies | Provides a score to each generated strategy based on the predicted rates. |

## Decentralization

The OptyFi road map includes the decentralization of the Optimization Engine. Possible approaches include implementation on an L2 chain or the development of a custom and efficient OptyFi Yield Chain.

The OptyFi road map includes the decentralization of the Optimization Engine. Possible approaches include implementation on an L2 chain or the development of a custom and efficient OptyFi Yield Chain.
10 changes: 5 additions & 5 deletions protocol/optyfi-protocol/risk-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Currently the OptyFi Protocol implements three pool ratings:

The system is flexible to accommodate an arbitrary number of pool ratings without modification to smart contract code.

Each liquidity pool integrated with the OptyFi Protocol is assigned a pool rating. This rating is currently established by governance vote. However in the future, governance may vote to use an external service \(such as [defiscore.io](www.defiscore.io)\), or subscribe to pool ratings from community [risk analysts](../participants.md#risk-analysts).
Each liquidity pool integrated with the OptyFi Protocol is assigned a pool rating. This rating is currently established through governance voting. However, in the future, governance voting may result in the use of external services \(such as [defiscore.io](www.defiscore.io)\) or community [risk analysts](../participants.md#risk-analysts) to determine the risk of a pool.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor feedback here to improve clarity.
Recommendations:
Each integrated liquidity pool is assigned a pool rating.
governance voting may decide for the use of....
....risk analysts as a determinant of the risk attached to a pool.


Currently, all pools for a given protocol are assigned the same rating, as follows:

| Protocol | Pool Rating |
| **Protocol** | **Pool Rating** |
| :--- | :--- |
| Aave | T1 |
| Compound | T1 |
Expand All @@ -29,9 +29,9 @@ Currently, all pools for a given protocol are assigned the same rating, as follo

## Risk Profiles

Each strategy is assigned a risk profile based on the ratings of pools involved in the strategy along with the complexity of the strategy. Currently, the following risk profiles are defined:
Each strategy is assigned a risk profile based on the ratings of the pools involved in the strategy along with the complexity of the strategy. Currently, the following risk profiles are defined:

| Risk Profile | Description | Pool Ratings | Strategy Complexity |
| **Risk Profile** | **Description** | **Pool Ratings** | **Strategy Complexity** |
| :--- | :--- | :--- | :--- |
| RP0 | Default | N/A | Hold In Vault |
| RP1 | Basic | T1 | Multi-Step, No Borrow |
Expand All @@ -56,7 +56,7 @@ The limits work as follows:

To better understand the application of these investment limits, take a look at the examples below.

| Protocol | Protocol Investment Limit Mode | Protocol Max Percent | Pool | Pool Max Percent | Pool Max Amount |
| **Protocol** | **Protocol Investment Limit Mode** | **Protocol Max Percent** | **Pool** | **Pool Max Percent** | **Pool Max Amount** |
| :--- | :--- | :--- | :--- | :--- | :--- |
| Compound | Percent | 500% | cDAI | 100% | N/A |
| Compound | Percent | 500% | cBTC | Null \(defaults to 500%\) | N/A |
Expand Down
13 changes: 6 additions & 7 deletions protocol/optyfi-protocol/strategy-composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Yield strategies are the fundamental building block of the OptyFi Protocol and its most compelling innovation.

Conceptually, yield strategies are generated dynamically based on the structure of DeFi liquidity pools. The building blocks for strategies are strategy steps and strategy sequences. The universe of possible strategy sequences together form a strategy graph.
Conceptually, yield strategies are generated dynamically based on the structure of existing DeFi liquidity pools. The building blocks for strategies are [strategy steps](strategy-composition.md#strategy-step) and [strategy sequences](strategy-composition.md#strategy-sequence). Put together, the entirety of strategy sequences form the [strategy graph](strategy-composition.md#strategy-graph).

## Strategy Step

A strategy step is the fundamental building block of a strategy. A strategy step may consist of a deposit step or a borrow step.
A strategy step is a fundamental building block of a strategy. A strategy step can be categorized as a deposit step or a borrow step.

### Deposit Step

Expand All @@ -22,19 +22,18 @@ Depositing an underlying token into a pool as collateral and then borrowing an u

## Strategy Sequence

A strategy sequence is comprised of multiple strategy steps.
A strategy sequence is composed of multiple strategy steps.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same meaning, leave original as 'composed' is used more frequently.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to comprises as the use of 'comprised of' is incorrect.


If a token is deposited into a pool and the LP token you receive in return can be deposited into a second pool, then you can "string together" two strategy steps to form a two-step strategy sequence.

![A Two-Step Strategy Sequence.](../../.gitbook/assets/strategy-sequence.svg)

This process can be generalized into n-steps based on the condition `outputToken(step[n-1]) = inputToken(step[n])`.

In today's DeFi reality, strategy sequences are usually limited to a maximum of two deposit steps or two deposit steps with a borrow step.
In today's DeFi reality, strategy sequences are usually limited to two deposit steps or two deposit steps with a borrow step.

## Strategy Graph

The universe of possible strategy sequences forms a directed \(possibly cyclic\) graph which we refer to as the Strategy Graph. The nodes of the Strategy Graph represent liquidity pools and inbound edges represent deposits into those liquidity pools.

OptyFi's Strategy Graph is determined by liquidity pools integrated with the Protocol. Integrating a new liquidity pool to the Protocol creates a new node which potentially generates many more possible strategies.
The entirety of possible strategy sequences form a directed \(possibly cyclic\) graph which we refer to as the Strategy Graph. The nodes of the Strategy Graph represent liquidity pools and the inbound edges represent deposits into those liquidity pools.

OptyFi's Strategy Graph is determined by liquidity pools integrated within the Protocol. Integrating a new liquidity pool to the Protocol creates therefore updates the Strategy Graph, potentially generating multiple new strategies.
Comment thread
Kilniv marked this conversation as resolved.
Outdated
Loading