Olympus Improvement Plan #1: Index Architecture DesignWhat is the Olympus Improvement Plan (OIP)?Like EIPs for Ethereum, OIPs stands for Olympus Labs Improvement Proposals. It is a continuously updated document about the project which includes core protocol specifications, client APIs, and contract standards. Community (especially developers) are welcomed to comment and suggest feedback to our current proposal. Anyone can submit an OIP on our Github and our tech team will actively review them and update the status of the OIP which will be available publicly.
Olympus Improvement Plan #1: Index Architecture DesignIn our very first OIP, we will highlight the high level design describing the general ideas of the components of the first financial product on the platform; indexes.
Then we will go into details for each of the described components, including their roles, responsibilities, and the interactions between the components. Finally, we list the possible usages of the MOT token on the platform and its advantages and disadvantages.
What is an index?An index is an indicator or measure of something, and in finance, it typically refers to a
statistical measure of change in a securities market. In the case of financial markets, stock and
bond market indices consist of a hypothetical portfolio of securities representing a particular
market or a segment of it. For instance, the S&P 500 is an example of an index, which consists of a portfolio of stocks based on the market capitalizations of 500 large companies listed on the NYSE or NASDAQ.
What purpose does an index serve for an investor? Traditionally, fund managers can create Exchange Traded Funds (ETFs) based on indexes such as S&P 500. For instance, we have index ETFs in the market which tracks a benchmark index like the S&P 500 closely. Index funds provide investors a simple way to own a portfolio of well diversified stocks, as the performance of the funds tend to follow the performance of the underlying index closely.
Creating a cryptocurrency portfolio based on an underlying indexIn the traditional market, indexes have served to measure the performance of its underlying stocks and bonds. However, there is a lack of choices for cryptocurrencies to track the performance of a certain basket of cryptocurrencies. For the American stock market, we have the S&P 500 to track the performance of a basket of 500 US companies listed on NYSE or NASDAQ. What if we were able to create an index to track the performance of the Top 10 privacy related tokens (we would probably construct a portfolio consisting of Monero, Zcash, Dash and so on).
Therefore, as part of our first OIP, we would like to create an index on the Olympus Platform which allows a combination of different tokens with weights assigned to them to simplify the process of constructing a portfolio of cryptocurrencies for investors.
We have the following foals for the system architecture
1. Scalable
2. Extensible
3. Developer friendly
4. Decentralized
5. Facilitated by Decentralised Autonomous Organisation (DAO)
Key components in the index architecture and their relationshipsIn order to achieve the goals listed above, we need to design the system in a flexible and extensible way for agents to interact with one another. The key components/agents in our index architecture design are:
1. Exchange provider and its adapters
2. Strategy provider and its clients
3. Price provider and its oracles
4. Core smart contract
Their relationships are shown in the diagram below:
Firstly, for an index to work, we require a continuous feed of live prices aggregated from a database. As one of our aim is to build a decentralised index, we will need to aggregate live prices from price providers and interact with their databases through their oracles. Next, we would require strategy providers to design indexes and decide on which tokens to be included inside the portfolio and assign weights to the respective tokens. Next, in order to facilitate simple buying and selling of the portfolio of cryptocurrencies designed by strategy providers, we will need exchange providers, like Kyber Network and Binance.
To integrate into the Olympus platform, all service providers will have to interact with the Olympus Core Smart contract to perform their respective functions listed above. Similarly, all 3rd party applications and 3rd-party clients can only use the above services by submitting requests to the core smart contract. By ensuring that there is one single point of entry, it makes the architecture of the index product clean, extensible, and easy to integrate.
Core smart contractThe core smart contract acts as a single point of contact for end-users (i.e. people who want to invest in a certain index) to submit requests. After the smart contract accepts the request from the end-user, it will then calculate requests, split them, and distribute to different agents.
For the index product, the main features should include:
1. Retrieving available indexes and their properties.
2. Retrieving token prices.
3. Buying tokens included in an Index from exchanges.
4. Cancel the order if it takes too long or the price becomes inappropriate.
5. Get notified when the order status is changed.
When an end-user submits a request to buy an index product, the core smart contract will hold the responsibility to retrieve information on available listed indexes on the Olympus platform created by strategy providers, retrieve token prices from price providers and their oracles, and buy tokens included in the portfolio from exchange providers. If the order cannot be fulfilled (due to lack of liquidity or changes in prices), the core smart contract will then cancel the order. When an order is fulfilled, it will also notify the end-user of the change in order status.
Although it may sound complicated, the end-user need not know what is happening on the backend when an order is being submitted because the smart contract will take care of all the processes. The user is only required to submit the order to the smart contract and it is designed to be straightforward.
Price Smart Contract and oraclesThe price smart contract plays the role of providing prices for tokens to the user as references when buying indexes, it can be extended to also provide instant value of Indexes in the future.
It should interact with 2 parts, providing data to the core smart contract and retrieving data feed from its oracles. To the core smart contract, it provide information such as price data, which tokens are supported and frequency of price update. Oracles, on the other hand, should enable the Olympus core smart contract to retrieve data feed from the price provider’s database.
Strategy Smart Contract and clientsThe strategy smart contract holds all the strategies provided by different organizations or
individual experts. Similar to the Price smart contract, it interacts with 2 parties as well, the
core smart contract and the end-users (i.e. investors). To the core smart contract, it gives a list of the available strategies and its properties, such as price, tokens within the portfolio, and weights of the tokens. Strategy providers are also able to set their strategies as private, which thereafter will not be visible to the public. For the end-users, the platform providers an interface for them to control their own strategies according to their expertise and preference.
In the current design, a strategy consists of:
1. Tokens in it.
2. Weights of the tokens in it.
3. Private or not (Future).
4. Price in MOT if it’s private (Future).
5. Dynamic code for adjusting strategy if certain circumstances change. (Future)
For strategy providers, it can be extended to different platforms, like Web-based, Windows/Mac application or a separate app. In the future, it can also provide the end user with the possibility to create their own strategy.
Exchange provider and adaptersThis part is responsible for handling all the actual order placements on the exchanges. It includes one smart contract and several adapters.
The smart contract interacts with the core smart contract and the adapters to make sure orders will be correctly processed and put onto exchanges according to cert algorithms. There are 2 kinds of exchanges at this moment, DEX and centralized exchanges. We will be using sub smart contracts to communicate with the DEXes and oracles for the traditional ones.
The exchange provider should determine which exchange it should take for the order sent from the core smart contract based on price/reputation of the exchanges. It should also have events for when a certain order is placed and for when it’s processed/completed. The provider also exposes an interface that if an order takes too long then a user could cancel it manually.
Use Of MOT on the platformMOT plays a very important role in the Olympus Ecosystem. There are several possible uses of the native MOT token.
For the indexes, the value for the user is that they can use the smart contract service to exchange (for example) their Ether into the indexes through all the possible exchange contracts, without having to manually split their money and create accounts on different exchanges and also benefit from the financial experts by following certain strategies.
Permit to buy OL financial products. This is to require the user to have a certain amount of MOT before they are allowed to buy financial products from our platform. It promotes the use of MOT, yet the downside of this is it limits the size of the active community (depending on the amount of MOT defined) which can make use of the Olympus platform.
Used as a fee on the platform. User pay MOT for a fee when interacting with the financial products. A part of this fee will be rewarded to the oracles/providers because they give the platform added value.
Voting process. By holding a certain amount of MOT, the user is permitted to vote on providers/oracles, with the reward of MOT to the providers/oracles tied to the number of votes. Most likely this possibility on its own is not a goal for users, as it doesn’t directly reward them with anything. Therefore, a rewards mechanism for the end users still needs to be researched.
Buy private strategies. The user can unlock certain indexes with MOT. The price in MOT to unlock the strategies could be decided by the providers for the Strategy Smart Contract. This might involve privacy solutions such as ZK-STARKS or Homomorphic encryption.
All of these possibilities can be used together, but the technology required for the last suggestion is still in active development in the blockchain space, so this should be implemented at a later stage. However, this possibility brings a lot to the table in terms of incentives for the providers to provide more strategies, which in turn attracts more strategy consumers. Similar work on this is being done by the Enigma decentralized Data Marketplace.
Moving forwardThe future is very exciting, and the architecture we described above is just the beginning. If we apply the concept of epics, we are currently in epic 1. The future holds a lot of possibilities:
Tokenization: For each index, there is the potential to programmatically create a smart contract and make a token to represent this index. When users buy it, a certain amount of these tokens will be transferred into the users’ wallet instead of the bought tokens. These tokens will be held/locked into the smart contract and the user can actually exchange them back after a certain locking period depending on the specific strategy.
DAO: It’s always interesting to think about how to make the community grow/develop without too much interference. The key is to create a system with reward / punishment mechanisms by using the MOT token.
Rebalancing: What we have created so far is only buying, but in reality, the market changes rapidly, thus it is interesting to think about assets getting rebalanced when certain circumstances change.
Strategy marketplace: Researching different projects requires a lot of knowledge and effort. That deserves respect and needs to be honoured. By paying MOT to the strategy provider, it attracts more professionals to get involved on the Olympus Platform and grow the community.
Tools for strategy organizations/managers: In the traditional financial industry, there are a lot of tools available for different parties/roles. However, in the blockchain space, these tools are still very limited. By creating the index product, it makes it possible to reach this market by creating tools for the organizations/funding managers.
To learn more about the OIP, please visit our Github:
https://github.com/Olympus-Labs/OIPs/blob/master/OIPs/oip-1.md.