Melon Whitepaper

Sunday, June 17, 2018
Download document
Save for later
Add to list is a project of OpenBook

MELON PROTOCOL: A BLOCKCHAIN PROTOCOL FOR DIGITAL ASSET MANAGEMENT DRAFT RETO TRINKLER AND MONA EL ISA Abstract. The Melon protocol is a blockchain protocol for digital asset management on the Ethereum platform. It enables participants to set up, manage and invest in digital asset management strategies in an open, competitive and decentralised manner. 1. Introduction Digital assets which do not gain their value from collat- eralisation, called un-collateralised assets. Finally, digital The value and importance of a wide range of digital as- assets which are derived from existing digital assets called sets1 has risen dramatically over the last few years. Hence derivatives. the question naturally arises how to manage this new and fast-growing asset class in the most advantageous way. 2.1. Collateralised Assets. Collateralised Assets, are This could be done by investing in a hedge fund which assets which gain their value from the collateralisation of specializes in digital assets. real-world assets. Examples are Dai from the Dai Credit However, the lack of standardisation can make com- System[13], Dassets[11] from String Technology or t0[12] parison of fund performances difficult and fund auditing from Overstock. An example for a digital asset backed by practices can be very opaque. a commodity is DGX from Digix[4] which binds the value A second deterrent, is the time and high cost required of gold to a digital asset. for setting up and running a hedge fund. This limits the 2.2. Un-collateralised Assets. Un-collateralised assets range of possible hedge fund managers to a comparatively are digital assets which gain their value in the scarcity small group of people. It arguably also limits competi- of the token itself. Examples for un-collateralised assets tion between hedge funds creating qualitatively less good are ETH (Ethereum[7]), ETC (Ethereum Classic[6]), REP hedge fund performances[15]. (Augur[1]), DGD (Digix[4]) or MKR (Maker[13]). Even- A third deterrent to investing in a hedge fund is some tually even companies issuing tokens as shares on the of the outdated technological infrastructure, giving room Blockchain will belong to this set. for a lot of inefficiencies. Section 2 through 4 of this paper will discuss the gen- 2.3. Derivatives. The third set of digital assets are eral mechanics of the Melon protocol. Section 5 through derivatives of other digital assets. In the context of this 7 will discuss how the Melon protocol can be used to solve work, a derivative is defined as a digital asset which has above objectives of openness, competitiveness and secu- its value directly derived from another digital asset. An rity. Finally, section 8 will propose a solution for protocol example for this set is a contract for difference (CFD) of development. an existing digital asset. In conclusion, the restriction to digital assets will be with the adoption of Ethereum and the various decen- 2. Assets tralised applications and services built upon it be less and less restrictive. To better understand the general mechanics of the Melon protocol, lets start by defining the term digital asset 3. Portfolio management strategy. A digital asset management strat- Having seen the selection of digital assets waiting to be egy is, in the context of this paper, regarded as a strategy managed by up-and-coming Portfolio Managers, let’s now on how to manage a portfolio 2. Each portfolio can hold a discuss the general mechanics of how this can be achieved variety of digital assets, where these digital assets repre- technically. sent the value a portfolio can hold. Each portfolio consists of a core part and a set of mod- As a motivation to the challenge ahead, let’s look at a ules (see figure 1) few examples of these digital assets currently available, or in development. 3.1. Core. The core part, written in a set of smart- For the sake of ease, and to highlight the differentiation contracts, can be seen as the part which holds everything in underlying value, we categorise digital assets into three together. The modules, also written in a set of smart- sets: Digital assets which gain their value from collateral- contracts, can be seen as the auxiliary functionality to isation of an underlying asset, called collateralised assets. the core part. The core part together with a set of rules E-mail addresses: (Reto Trinkler) [email protected], (Mona El Isa) [email protected] 1 Throughout the present work, a digital asset, is regarded as a digital token of value, run and stored on the Ethereum Blockchain. There is no technical difference assumed between what an asset and what a token is, the terms are interchangeable. However in the context of portfolio management usually the term asset is used. 2 Throughout the present work, a portfolio is regarded as a finite set of digital assets. 1

MELON PROTOCOL: A BLOCKCHAIN PROTOCOL FOR DIGITAL ASSET MANAGEMENT DRAFT 2 on how the core interacts with its modules constitute the a fee in form of another execution cost, such as for exam- Melon protocol. ple the gas cost to be paid on the Ethereum network. To solve the problem of ambiguous prices, the Melon proto- 3.2. Modules. The modules provide auxiliary function- col will require the Portfolio Manager to choose one price ality to the core part. For example, providing off-chain feed module providing one specific price against which the data, storing of portfolio relevant data or the executing of assets under management (AUM) are evaluated. calculations for the portfolio. The exchange module specifies an on-chain exchange The modules are the parts of the portfolio which have where assets can be traded. This is required as it poses subjective functionality. Through the modular concept a restriction on where the Portfolio Manager can trade of the portfolio, these subjective parts can be changed. his/her funds. See also registrar module. For example different Portfolio Managers might want to The trading module restricts trading and links to a pre- charge different management fees and apply their own selected exchange on which an asset can be traded. For methods on how to calculate these fees. The modular example, no trade size can be higher than 10% of the concept allows the managers to chose the management volume traded of this asset. This module is intended to fee module of their liking. Thus they can select the fees reduce the amount of order book manipulation in favour and calculation methodology by simply linking the corre- of the Portfolio Manager. sponding module to the core. A Portfolio Manager will be able to receive a manage- Modules can be freely developed by anyone. Develop- ment fee as well as a performance fee. These fees are spec- ers can then define a commission that is paid back to them ified in the management fee module and the performance every time someone uses their module. fee module. The management fee is generally calculated The Melon protocol includes the following modules as by reference to the assets under management, i.e. the a foundation: gross asset value (see appendix C) of the portfolio. The Registrar: Links assets to price feeds to trading. performance fee is generally calculated by reference to the Functionality: A way to build assets specific func- increase in the gross asset value. This increase in gross as- tionality. set value is also referred to as the alpha generated by the Price Feeds: Provide a price for an asset by taking portfolio manager. There is usually a high water mark, one or several data sources into account. which means that if the portfolio performing below a de- Exchanges: On-chain marketplaces such as fined benchmark since inception, the Portfolio Manager EtherEx[8] or Maker-Market[10], where one or does not get paid a performance fee. Alternative forms a set of assets can be traded. of performance fees are conceivable. For example, the in- Trading: A set of rules on how trading is permitted. terval by which the performance fee gets paid out can be Management Fee: A gross asset value (see appen- selected by the Portfolio Manager. dix C) independent payment for the Portfolio Before the deployment of a portfolio, a Portfolio Man- Manager. ager decides which modules he/she would like to use. Performance Fee: A gross asset value (see appen- Once the portfolio is deployed this then can be seen as dix C) dependent payment for the Portfolio Man- the offering of a legal contract. The contract terms are un- ager. ambiguously visible and securely held by the Blockchain. In the registrar module, the Portfolio Manager selects Therefore, the smart-contract terms are agreed upon by a finite amount of assets, a finite amount of correspond- the investor upon investing in the portfolio. ing price feeds, as well as a finite amount of exchanges on which these assets can be traded. All a Portfolio Manager 4. Investing and Redeeming can ever do is trade those specific assets on those specific There are two ways to invest in a portfolio. The first exchanges. The smart contracts do not allow funds to be way is to buy shares of the portfolio on any marketplace on sent in any other way or to any other accounts. which they are traded. The second way is to create shares The functionality module allows a Portfolio Manager to by investing Ether directly into the respective smart con- retain actions or rights and avoid penalization from non- tract of the portfolio. action (eg. Augur’s REP tokens). These interactions be- Similar to investing there are three ways to redeem tween token custodian and corresponding smart-contracts from a portfolio. The first way is to sell shares of the need to be programmed in as it is no longer an individual’s portfolio on any marketplace on which they are traded. or non-contract account which controls these funds. And the second way is to annihilate shares. This can be The price feeds module is needed as asset prices, in gen- done by eral, tend to be different on different exchanges. This is because of the inherent way prices are set - a price is set • redeeming into a separate portfolio or by demand and supply which constitutes of market par- • redeeming directly into Ether via a program ticipants wanting to buy or sell. In this context, the word trade3. market participants also refers to trading algorithms, etc. In general, market participants reflect a different demand 4.1. Net Asset Value. Shares of a portfolio are designed and supply profile on different exchanges generating differ- such that they fulfil the following properties: ent bid/ask prices. While it’s true that arbitrageurs keep • Shares are fungible. the differences small, they remain, for at least as long as • Shares reflect ownership of the portfolio. there is a fee to be paid on the execution of trades. A • The inherent value of the shares is given by the fee might be a commission to the exchange or broker, or value of the underlying assets of the portfolio. 3A program trade is a trade where orders are entered directly into the market and executed automatically.

MELON PROTOCOL: A BLOCKCHAIN PROTOCOL FOR DIGITAL ASSET MANAGEMENT DRAFT 3 Figure 1. Protocol version links existing portfolios and collects licensing fees • Share price is relatively independent of invest- The quantity of shares qFti are then allocated to the ments and withdrawals made. Investor. For the investment to get incorporated takes at Shares will be represented by a smart-contract follow- least one block time, i.e. more than 10 to 19 seconds. Dur- ing the Ethereum token standard[5]. Thus they are fun- ing this time period the share price might change. How- gible and tradable on exchanges such as EtherEx[8] or ever the Investor will be able to invest via a limit order Maker-Market[10]. Furthermore, Portfolio Managers can hence they have no risk of getting an unexpected price. hold and manage shares of other portfolios. Shares also reflect ownership of the portfolio, where the 4.3. Annihilation. By redeeming funds F denominated formula of ownership is the following: in Ether, from a portfolio, shares are annihilated. The in- vestor redeems funds F by exchanging shares against the underlying value they represent. Shares holding (1) Ownership = To request a withdrawal of amount F , one has to with- Total shares in existence draw: For example if one holds ten out of a hundred total F qFti = ti ⇔ F = ptmi qFti  shares then the ownership is 0.1 or 10%. This is dynamic, (3) as people invest and redeem the total amount of shares pm in existence changes and therefore also the percentage of of shares. ownership. This quantity of shares qFti represents a percentage of The inherent share price (see appendix G) is defined by ownership, called otFi . The formula for otFi is the following: the net asset value per share (see appendix F) and thus by the value of the underlying assets. qFti Every time an Investor invests Ether in a portfolio, (4) otFi = Total shares in existence shares are created and every time an Investor redeems Ether, shares are exchanged against the value of the un- The Investor now redeems this percentage of all the as- derlying assets and thereby annihilated. This mechanism sets a portfolio holds, directly from the smart contract of of creating and annihilating shares keeps the share price the portfolio. In doing so he/she sets up a new portfolio. relatively independent of investments respective to with- The new portfolio of the Portfolio Manager is thus: drawals made. htai1    ti  In conclusion, the inherent share price is set, not by de- ha 1 t  hai2   htai2  mand, but by performance. Each investor has the ability t  .  → (1 − oFi )  .      to exchange its shares at any time against the value of the  ..   ..  underlying assets. htain htain 4.2. Creation. By investing funds F denominated in Where the separated part, is the part which belongs to Ether, into a portfolio, shares are created. The Investor the Investor, redeeming funds: sends these funds directly to the smart contract of the  ti  ha 1 portfolio where they are added to the portfolio htmi (see  htai2  appendix B): otFi  .     ti   ti  ..  ha 1 + F  ha 1 t  hai2  t  hai2  htain  . → ..      ..   This separated part can now be seen as the portfolio  .  ti ti of the investor. The investor becomes its own Portfolio ha n ha n Manager. They can now either decide to manage this new Where by convention htai1 is the amount of Ether the port- portfolio to their liking or liquidate the assets to Ether folio m holds, at time ti . through a program trade. A program trade is an algo- Then the quantity of shares qFti created for funds F , at rithm that liquidates a portfolio to complete the redeem- time ti is calculated. The formula is the following: ing process. F Since portfolios separate when redeeming funds, one (2) qFti = cannot directly expect or anticipate any future trades ptmi made by the redeeming investor. All one can see on the Note, by definition the share price ptmi is independent of Blockchain is the separating of the portfolio. This pro- Funds F invested. cess can be done in a simple and convenient way, where

MELON PROTOCOL: A BLOCKCHAIN PROTOCOL FOR DIGITAL ASSET MANAGEMENT DRAFT 4 the investor chooses his/her selling off strategy on an off- and millions. Such benefits will favour all investors, but es- chain server which listens to the Blockchain and trades pecially large scale money managers for whom the major- accordingly. ity of operating costs will be eliminated (well over 50% of a typical asset management firm’s costs today are made up 4.4. Open and closed-ended portfolios. Generally of fund administration and operations infrastructure[9]). one differentiates between two types of portfolios. open- These cost savings can be passed on to savers. The lower ended portfolios and closed-ended portfolios. The differ- operating costs will also enable new up-and-coming Port- ence between the two is that in the former there’s no limit folio Managers to enter the market by reducing minimum on how much investors can invest while in the latter there scale requirements and start up costs. is. In a closed-ended portfolio, once the investment limit of The cost of running a portfolio on the Blockchain is the portfolio has been reached the process of creation will equal to the core usage fees, modular commissions and the be suspended. At this point, shares can only be bought infrastructure costs to be paid on the Ethereum platform on exchanges. (see Figure 2). 4.5. Active and passive management. The portfolio The usage fees are set by the protocol and the modular management process outlined previously (section 3.2) is fees are set by the module developers. Both of them are referred to as active management; whereby the Portfo- expected to be a fraction of a cent or a fraction of the lio Manager receives a performance fee in addition to the trade volume for each usage. management fee. These actively managed portfolios are The infrastructure costs are equal to the gas used for usually benchmarked against a financial index (such as the the execution of the underlying smart contracts. The gas S&P500 in US equity markets) which determines the ad- costs are dependent on the gas price set for the transac- ditional value or alpha, that the Portfolio Manager’s asset tions and the amount of gas used in executing these smart allocation strategy delivers to investors in the portfolio. contracts[16]. Some investors do not wish to participate in active In conclusion, by having low set up requirements and management, due to its perceived zero sum nature[14]. low costs of running a portfolio one can create a never- They would rather forgo the Portfolio Manager’s perfor- seen-before competitive environment for asset manage- mance fee and have a return that matches a benchmark in- ment strategies. dex. For such investors, passively managed portfolios pro- vide performance that closely tracks a benchmark index, but with only a management fee to pay. This management 7. Decentralised fee covers the costs incurred by the Portfolio Manager in A Melon protocol portfolio can be set up, managed and replicating the benchmark index. Therefore, for passively invested in, using a decentralised technological infrastruc- managed portfolios on Melon, there will only be a man- ture relying on the Ethereum Blockchain. agement fee module associated with the Melon portfolio, In this context, one can differentiate between decen- to cover these management costs. There will be no addi- tralised storage and decentralised execution. tional performance fee incurred. In conclusion, the Investor is always in control of their 7.1. Decentralised Storage. All of the Melon proto- investment and can exchange back shares to get the un- col’s smart-contracts, portfolio track records and assets derlying value of the assets without having to ask for per- are stored on a decentralised Blockchain. mission from the Portfolio Manager or anybody else. Storing smart-contracts and portfolio track records in a decentralised way mitigates the risks around single points 5. Open of failure and provides open and reliable storage of infor- As seen in section 4, portfolio share prices are de- mation. fined by the net asset value per share. This is true for Storing portfolio assets in a decentralised way, reduces each portfolio deployed, meaning that share price of all custody risks. Melon protocol portfolios are visible and comparable on Incidents like the financial crisis of 2008 and the 2013 the Blockchain. The Portfolio Manger’s managing and bank deposit levy in Cyprus have taken a heavy toll on trading track-record is visible and auditable in the same the trust of centralised custodians. Legislation of bail-ins way. in many developed countries doesn’t help either[2][3]. In addition, all of the Melon protocols’ smart contracts are open-source4. 7.2. Decentralised Execution. Execution of the smart- In conclusion, the Melon protocol is an open-source contracts is done in a decentralised manner using the blockchain protocol. Portfolio track-records and perfor- Ethereum virtual machine (EVM) which is distributed mances are visible and auditable by everyone. onto all nodes connected to the Ethereum network. The result is generally more efficiency, security and predictabil- 6. Competitive ity. Most notably, counterparty and settlement risks of The competitive gains of the Melon protocol are in the trades are reduced significantly. form of lower cost and time barriers to setting up and In conclusion, by having decentralised storage and ex- running a portfolio. ecution one can mitigate some of the potential security The costs and complexity to setting up a portfolio us- vulnerabilities and market inefficiencies, such as reducing ing the Melon protocol are lower than they are with tradi- single points of failure, custody-, counterparty-, and set- tional asset management, seconds and cents versus months tlement risks. 4They are published under

MELON PROTOCOL: A BLOCKCHAIN PROTOCOL FOR DIGITAL ASSET MANAGEMENT DRAFT 5 Figure 2. Variable Costs of a Melon protocol portfolio 8. Protocol Development and Andrey Ternovsky for their support, feedback and improvements to this paper. To build the Melon protocol and strengthen the net- work effect, there will be a digital token issued. This token is called the Melon token (MLN) and will be distributed References through a contribution period. These Melon tokens can then be used to use the core, [1] Augur - decentralized prediction market. as all usage fees are collected in Melon token. Accessed: 2016-08-26. Since module developers invest time and effort into [2] Beteiligung der gläubiger an der bankenrettung. building these modules and since many of them will have an active cost of running, such as for example server costs und-effektenhaendler/aufsichtsinstrumente/stabilisierungs- of running a price feed, there needs to be a way to in- und-abwicklungsplanung/kapitalmassnahmen/. centive them. Melon solves this by incentivizing module Accessed: 2016-08-26. developers in the same way as almost every blockchain [3] Deal reached on bank “bail-in directive”. incentivizes its miners - by creating an amount for them created through inflation. The Melon protocol will do the room/20131212IPR30702/Deal-reached-on-bank- same thing and thus effectively future proofing develop- %E2%80%9Cbail-in-directive%E2%80%9D. Ac- ment. cessed: 2016-08-26. All Melon tokens collected in form of usage fees will go [4] Digix platform. Accessed: 2016- into a smart contract(s) called a Governance and Multi- 08-26. chain fund. The purpose of this fund is that Melon token [5] Ethereum - token standard. Holders can vote to spend tokens to cover the costs of de- ploying Melon on other blockchains or to cover the costs Accessed: 2016-08-26. of governance of the Melon protocol. [6] Ethereum classic. Accessed: 2016-08-26. 9. Future Directions [7] Ethereum platform. Ac- cessed: 2016-08-26. To drive adoption, there will be portals5. These are [8] Etherex - decentralized exchange. user-friendly web applications to access the Melon proto- Accessed: 2016-08-26. col. This will allow users to interact with the protocol [9] Hedge fund cost survey. easily. The value of the protocol is directly correlated with the %20Fund%20Survey Sept2008.pdf. Accessed: value of these portals. The better and easier the portals, 2016-08-26. the more usage fees will be collected and the higher the [10] Maker market. rewards for module developers. market. Accessed: 2016-08-29. 10. Conclusion [11] String technology. Ac- cessed: 2016-08-26. The Melon protocol proposed a blockchain protocol for [12] t0. Accessed: 2016-08-26. digital asset management on the Ethereum platform. It [13] N. M. et al. The Dai Credit System, 2015. enables participants to set up, manage and invest in dig- ital asset management strategies in an open, competitive [14] W. Sharpe. The arithmetic of active management. and decentralised manner. In The Financial Analysts’ Journal Vol. 47, No. 1, January/February 1991, pages 7–9, 1991. 11. Acknowledgements [15] P. Wei, Y. Altshuler, and A. Pentland. Decoding We would like to use this opportunity to express our Social Influence and the Wisdom of the Crowd in Fi- gratitude to everyone who supported us throughout the nancial Trading Network. MIT Media Lab, 2012. course of writing this paper. [16] D. G. Wood. Ethereum: A Secure Decen- A special thanks to Garrett Cassidy, André Wolke, Ro- tralised Generalised Transaction Ledger, 2016. man Bischoff, Jorge Mielgo, Sandro Lera, Dylan Grice 5 One example for a portal is the Melon portal:

MELON PROTOCOL: A BLOCKCHAIN PROTOCOL FOR DIGITAL ASSET MANAGEMENT DRAFT 6 Appendix A. Terminology Token: By the term token is meant, a digital token of value adhering to the Ethereum token standard [5]. Portfolio: A collection of smart-contracts, divided into a core smart-contract(s) and into auxiliary smart-contracts called modules. Portfolio Manager: Portfolios are managed by one person or a group of persons, referred to as a Portfolio Manager. Module: A module is on or a set of smart-contracts which has an auxiliary functionality to the core smart-contract of the portfolio. Time Step: The term time step means, the time interval between blocks on the Ethereum Blockchain. Where time is taken from the block timestamp issued by the miner. For example (ti , ti+1 ] is the time between after block with timestamp ti and the following block with timestamp ti+1 . Appendix B. Portfolio Formally we expand the portfolio as follows. Assuming there are n ∈ N digital assets available. This constitutes the following vector set a of assets:   a1  .  (5) a =  ..  an where ak is the k-th available asset, for k ∈ N. By convention the first asset a1 represents Ether. Then the portfolio htmi , is defined as the vector set of asset holdings of a portfolio m at time ti .  ti  ha 1 (6) htmi =  ...  ∈ Rn   ≥0 htain where htaik is the amount, in token units of ak , a portfolio m holds at time ti , for k ∈ N. Appendix C. Gross Asset Value Let pti be the vector set of asset prices, at time ti . Then pti is:  ti  p a1 (7) pti =  ...  ∈ Rn   ≥0 ptain where ptaik is the price per token unit of asset ak in Ether, at time ti , for k ∈ N. Note, since by convention a1 represents Ether, and the prices are given in Ether the first price ptai1 is always equal to one. The Gross Asset Value or GAV v̂htim in Ether of portfolio htmi at time ti is: n X (8) v̂htim = hpti , htmi i = ptaik htaik k=1 with the standard scalar product on Rn . The GAV can be seen as the gross value of the portfolio. Appendix D. Net Asset Value The Net Asset Value or NAV vhtim in Ether of portfolio htmi at time ti is: (9) vhtim = v̂htim − Management Feesti − Performance Feesti Management Feesti resp. Performance Feesti is the management resp. performance fees given to the Portfolio Man- ager for timestep ti . Appendix E. Delta To define the Delta ∆(ti ,tj ] of a portfolio m, within the time (ti , tj ], where ti < tj , we first define the Delta of ∆(ti ,ti+1 ] , i.e. the Delta of a single time step. Let be: t0 = time of contract creation tl = time of first investment t = min {vhkm 6= 0} tk ∈[t0 ,ti ] I ti = Sum of all investments within (ti−1 , ti ] W ti = Sum of all withdrawals within (ti−1 , ti ]

MELON PROTOCOL: A BLOCKCHAIN PROTOCOL FOR DIGITAL ASSET MANAGEMENT DRAFT 7 Where both I ti and W ti is a value in Ether. Then the Delta of a single time step is: t vhi+1 m − I ti+1 + W ti+1 (10) ∆(ti ,ti+1 ] = vhtim By design, the Delta of a portfolio, is independent of funds invested or withdrawn within the time (ti , ti+1 ]. By factoring together these Deltas of single time steps we get the general definition of the Delta ∆(ti ,tj ] of a portfolio m as:    1 if tj ≤ tl   j−1  Q t ∆(tk ,tk+1 ] if ti < tl < tj ∧ vhkm 6= 0, k ∈ {l, l + 1, . . . , j − 1}    k=l (11) ∆(ti ,tj ] = j−1 Q t ∆(tk ,tk+1 ] if tl ≤ ti ∧ vhkm 6= 0, k ∈ {i, i + 1, . . . , j − 1}        k=i 0 otherwise  t Note, the case where ti < tl < tj and vhkm = 0, for a k ∈ {l, l + 1, . . . , j − 1} is when the first investment has been made but the funds have been withdrawn completely at some point within time (tl , tj−1 ]. The GAV in this case can not be calculated by factoring together Deltas of single time steps, as this would mean a division through zero. The Delta in this case is set to 0 for all times, even if the portfolio receives investments in the future. The same is true for the second t similar case where tl ≤ ti and vhkm = 0, for a k ∈ {i, i + 1, . . . , j − 1}. By induction, we can see that the Delta ∆(ti ,tj ] remains independent of funds invested or withdrawn within the time (ti , tj ]. Appendix F. Net Asset Value per Share Expressed mathematically the NAV per share ptmi of portfolio m, at time ti is: (12) ptmi = ∆(t0 ,ti ] where t0 is the time of contract creation. The price ptmi is denominated in Ether. Appendix G. Share Price The share price is defined by the Net Asset Value per Share (see appendix F) and is denominated in Ether.