GXMarkets Money Market

Institutional Money Market built on Global Banking Protocol

Abstract

A decentralized protocol is being introduced in this paper. It will establish money markets with algorithmically set interest rates based on supply and demand, which in turn will allow users to exchange the time value of Ethereum assets smoothly.

1.0 Introduction

Cryptocurrencies and digital blockchain assets have developed their market into a dynamic ecological community comprising of investors, speculators, and traders, who are actively exchanging thousands of blockchain assets. The cultivation of financial markets, unfortunately, hasn’t kept up to allow participants to trade the time value of assets. The gap between people with surplus assets they can’t use, and people without assets (that have a productive or investment use) is filled by interest rates; trading the time value of assets benefits both parties, and creates non-zero-sum wealth. For blockchain assets, two major flaws exist today: Extremely limited borrowing mechanisms which cause mispriced assets (e.g. “scamcoins” with inexplicable valuations, because there’s no way to short them). Due to both on-exchange and off-exchange risks, and substantial storage costs without a mechanism to offset those costs, blockchain assets have negative yield. This contributes to volatility, as holding is disincentivized. Customers are able to to trade blockchain assets on margin through centralized exchanges (such as Bitfinex, Poloniex), with “borrowing markets” built into the exchange. These systems, however, have limitations: they are limited to certain customer groups, limited to a small number of (the most mainstream) assets, and are trust-based systems (you have to trust that the exchange won’t get hacked, abscond with your assets, or incorrectly close out your position). These facilities are also inaccessible to dApps because you can’t move a position on-chain, for example to use borrowed Ether or tokens in a smart contract or ICO; and balances and positions are virtual. Collateralized and uncollateralized loans can be facilitated between market participants directly through peer to peer protocols (including ETHLend, Ripio, Lendroid, dYdX). The downside is that users are forced to incur significant costs and frictions for decentralization; in every protocol reviewed, lenders are required to post, manage, and (in the event of collateralized loans) supervise loan offers and active loans; and loan fulfillment is often slow & asynchronous (loans have to be funded, which takes time). We propose, in this paper, a decentralized system for the frictionless borrowing of Ethereum tokens. This system enables proper money markets to function, creating a safe positive-yield methodology to storing assets, without the flaws of existing approaches.

2.0 The GXMarkets Protocol

The GXMarkets protocol is to establish money markets on the Ethereum blockchain, which are pools of tokens with algorithmically derived interest rates, based on the supply and demand for the token. There is direct interaction with suppliers (and borrowers) of an asset with the protocol, earning (and paying) a floating interest rate, without having to negotiate terms such as maturity, interest rate, or collateral with a peer or counterparty. Each money market is unique to an ERC-20 token (such as tokenized Ether, a stablecoin such as Dai, or a utility token such as Golem), and contains a transparent and publicly-inspectable balance sheet, with a record of all transactions and historical interest rates

2.1 Supplying Tokens

The supply of each user is aggregated by the GXMarkets protocol; when a user supplies a token, it becomes a fungible resource (fungible - derives from the Latin verb fungi, meaning "to perform” - is a word that often shows up in legal contexts. Something fungible can be exchanged for something else of the same kind. For example, we could say "oil is a fungible commodity.") This is very different to an exchange or peer-to-peer platform, where a user’s tokens are matched and lent to another user. With this method, users can withdraw their tokens at any time without waiting for a specific loan to mature, which allows complete liquidity. Interest accrues on the balance in a money market based on the supply interest rate unique to that asset. Users can view their balances (including accrued interest) in real-time; when the user makes a transaction that updates his or her balance (supplying, transferring, or withdrawing a token), accrued interest is converted into principal and paid to the user.

2.1.1 Primary Use Cases

A GXMarkets money market can be utilized as a source of additional returns on their investment for individuals with long-term investments in Ether and its derivative tokens. For example, a user that owns OmiseGo can supply their tokens to the GXMarkets protocol, and earn interest (denominated in OmiseGo) without having to manage their asset, fulfill loan requests or take speculative risks. The GXMarkets protocol can be used by dApps, machines, and exchanges with token balances, as a source of monetization and incremental returns by “sweeping” balances; this creates the potential to establish completely new business models for the Ethereum ecosystem.

2.2 Borrowing Tokens

With GXMarkets, users are able to frictionlessly borrow from the protocol, fron anywhere in the Ethereum ecosystem, using collateralized lines of credit. Borrowing from GXMarkets simply requires a user to specify a desired asset; there are no terms to negotiate, maturity dates, or funding periods; borrowing is instant and predictable, unlike peer-to-peer protocols. Each money market has a floating interest rate (similar to supplying an asset) set by market forces, which determines the borrowing cost for each asset. That each account must have a balance that more than covers the outstanding borrowed amount is an enforced rule; this called a collateral ratio. An account can take no action (e.g. borrow or withdraw) that would bring its value below our desired ratio; to increase (or reset) the collateral ratio, users are free to repay a borrowed asset in whole or in part, at any time. Balances held in GXMarkets, even while being used as collateral, continue to accrue interest normally.

2.2.1 Risk & Liquidation

If the value of a borrower's collateral decreases below a liquidation ratio (which is smaller than the collateral ratio used to initially borrow an asset), the collateral becomes available to purchase (with the borrowed asset) at the current market price, minus a liquidation discount. This eliminates the protocol risk, and incentivizes an ecosystem of arbitrageurs to quickly step in to reduce the borrower’s exposure. The liquidation function can be initiated by any Ethereum address that possesses the borrowed asset, in whole or in part, in order to exchange their asset for the borrower’s collateral. As both users, both assets, and prices are all contained within the GXMarkets protocol, liquidation is frictionless and does not rely on any outside systems or order-books.

2.2.2 Primary Use Cases

Without selling or rearranging a portfolio, new assets can now seamlessly be held. This ability gives new dominion to dApp consumers, traders and developers:

  • Without having to wait for an order to fill, or requiring off-chain behavior, dApps can borrow tokens to use in the Ethereum ecosystem, such as to purchase computing power on the Golem network.
  • Traders can finance new ICO investments by borrowing Ether, using their existing portfolio as collateral.
  • Traders looking to short a token can borrow it, send it to an exchange and sell the token, profiting from declines in overvalued tokens.

2.3 Ledger System

GXMarkets maintains a complete and auditable balance sheet and ledger, comprised of all transactions; for each money market (a) :

Cash(a) + Borrows(a) = Supply(a) + Equity(a)

Each transaction generates two accounting entries (a debit and credit) using international accounting standards:

 Event  Credit  Debit
 Supply Token  Cash  Supply
 Withdraw Token  Supply  Cash
 Borrow Token  Borrows  Supply
 Repay Borrowed Token (Customer)  Supply  Borrows
 Repay Borrowed Token (default event)  Supply (Collateral)  Borrows (Asset)
 Accrue Interest (Supply)  Equity  Supply
 Accrue Interest (Loan)  Borrows  Equity

2.4 Interest Rate Model

Individual suppliers or borrowers no longer have to negotiate over terms and rates, the GXMarkets protocol utilizes an interest rate model that achieves an efficient interest rate equilibrium, in each money market, based on the supply and demand of individual assets. The utilization ratio (U) for each money market (a) unifies supply and demand into a single variable:

U(a) = Borrows(a) / {Cash(a) + Borrows(a)}

Following economic theory, interest rates (the “price” of money) should increase as a function of demand; when demand is low, interest rates should be low, and vise versa when demand is high. The demand curve is codified through governance (and can be updated by the Chief Economist ) and is expressed as a function of utilization. As an example, borrowing interest rates may resemble the following:

Borrowing Interest Rate(a) = 10% + U(a) * 30%

For the protocol to be sustainable, and to withstand economic attacks (by both supplying and borrowing in the same money market), the total amount of interest earned by suppliers must be less than the total interest product by borrowers. The supply interest rate is a function of the borrowing interest rate, and includes a spread, S (such as 0.15), which represents the economic profit of the protocol:

Supply Interest Rate(a) = Borrowing Interest Rate(a) * U(a) * (1 − S)

3.0 Implementation & Architecture

A GXMarkets money market is a ledger that allows Ethereum accounts to supply or borrow tokens, while computing interest, a function of time. The protocol’s smart contracts will be publicly accessible and completely free to use for machines, dApps and humans.

3.1 Money Market Contract

A Money Market contract stores the current balance of each account. The Money Market acts similar to an ERC-20 token holding a balance for each account asset. Over time, interest is accrued on balances in the Money Market, which is described below as a low-gas method to achieve these balance updates.

The Money Market contract updates the balance sheet entries for the appropriate asset, as clients of the protocol supply or borrow assets. This balance sheet is additionally used to calculate the current interest rates for supplying and borrowing tokens, as described in section 2.4 above.

3.2 Interest Rate Mechanics

GXMarkets money markets are set by a pair of current interest rates (the supply and the borrowing rate), applied to all users uniformly. These rates adjust over time as the relationship between supply and demand evolves.

The history of each interest rate, for each money market, is captured by an Interest Rate Index , which is calculated each time an interest rate changes, resulting from a user supplying, withdrawing, borrowing, repaying or liquidating the asset. A user’s balance, including accrued interest, is simply the ratio of the current index divided by the index when the user’s balance was last checkpointed. The balance for each account address in the Money Market is stored as an account checkpoint .

An account checkpoint is a Solidity tuple (Solidity internally allows tuple types, i.e. a list of objects of potentially different types whose number is a constant at compile-time. Those tuples can be used to return multiple values at the same time). This tuple describes the balance at the time interest was last applied to that account. The current Interest Rate Index is also stored globally.

Both the supply and borrow Interest Rate Index for the asset are updated, every time a transaction occurs, to compound the interest since the prior index, using the interest for the period, denominated by r * t, calculated using a per-block interest rate.

Index(a,n) = Index (a,{n−1}) * ( 1+ r * t)

3.3 Borrowing

A user who has sufficient balances stored in GXMarkets, and wishes to borrow, may call MarketBorrow(address asset, uint amount) on the Money Market contract. This function call checks the user’s account value, and given sufficient collateral, will update the user’s borrow balance, transfer the tokens to the user’s Ethereum address, and update the money market’s floating interest rates.

Interest accrues on borrows in the same manner as balance interest was calculated in section 3.2; a borrower has the right to repay an outstanding loan at any time, by calling repayMarketBorrow(address asset, uint amount) which repays the borrower's principal and accrued interest.

If a user’s overall account value ever falls below the liquidation ratio due to the value of his or her collateral changing (e.g. the user is holding ZRX as collateral to borrow Ether and ZRX significantly falls in value), then we have a public function ` liquidateMarketBorrow(address customer, address collateralAsset, address borrowAsset, uint collateralAmount) ` which exchanges the invoking user’s asset for the borrower’s collateral, at a slightly better than market price.

The current exchange rate of each supported asset is maintained by a Price Oracle; the ability to set the value of assets to a committee which pools prices from the top 10 exchanges is delegated by the GXMarkets protocol. These exchange rates are used for all functions which require calculating the value equivalent of an account, including the determining of borrowing capacity and collateral requirements.

3.4 Market Status

Each market, as defined by an asset, can be in one of three states in the GXMarkets money market:

  • Unsupported
  • Supported
  • Suspended

All markets begin in ‘unsupported’ and may transition to the supported state, based on an action by the admin. Once a market is supported, any user may supply or borrow from the market as described above.

The admin has the ability to move a supported market into the suspended state, should for any reason, a market must be closed. A sufficient lead time will be provided to users by the GXMarkets governance committee prior to suspending a market. A suspended market does not allow users to continue to supply or borrow assets (though users may still withdraw or close borrowed positions).

In order for the protocol to have sufficient cash to repay all of the outstanding suppliers, it is necessary for all borrows to be repaid if a market is suspended indefinitely. Therefore, regardless of the borrower’s collateral health, once a market is suspended, all borrows of that asset are available to be liquidated at the standard discount.

3.5 Governance

To begin with, GXMarkets will have centralized control of the protocol in matters such as choosing the interest rate model per asset, and over time, will transition the control to the community and stakeholder. The admin or governance committee control the following rights in the protocol:

  • The ability to choose a new admin, such as a DAO
  • The ability to set the interest rate model per market
  • The ability to support, suspend or unsuspend a market
  • The ability to delegate which entity may set oracle prices
  • The ability to withdraw the equity (earned income) of the protocol

GXMarkets anticipates that, over time, these rights will become the responsibility of a DAO controlled by the community. The DAO would be in the form of an Ethereum contract which would, by proposal and vote, call the functions associated with the abilities above. As the admin (or DAO) may choose a new admin, that DAO would have the ability to progress over time based on the decisions of the stakeholders.

3.6 Contract Interface

 Function ABI  Action
marketSupply (address asset, uint256 amount) Transfers an ERC-20 token into Money Market and marks msg.sender’s updated balance. Updates Interest Rate Model
marketWithdraw(address asset, uint256 amount) Transfers an ERC-20 to msg.sender if funds available.
Updates Interest Rate Model
marketBorrow(address asset, uint amount) Checks msg.sender collateral value, and if sufficient, updates borrow balance and transfers an ERC-20 to msg.sender.
Updates Interest Rate Model
marketRepay(address asset, uint amount) Transfers an ERC-20 token into Money Market and reduces msg.sender’s borrow balance.
Updates Interest Rate Model
liquidate(address customer, address collateralAsset, address borrowAsset, uint borrowAmount) Trues up borrower’s interest, then transfers an ERC-20 token into Money Market to repay the borrowed position. Msg.sender receives borrower’s collateral at a discount. This function can only be called when a borrower breaches the liquidation ratio.
Updates Interest Rate Model
setAssetPrice(address asset, uint256 value) Sets the price oracle price of a given asset. Called by a representative of token holders.

Table 1. ABI and summary of select Money Market functions on the Blockchain

4.0 Summary

  • Properly functioning money markets for Ethereum assets are created by GXMarkets
  • Interest rates for each money market are determined by the supply and demand of the underlying asset
  • Users can supply tokens to a money market to earn interest, without trusting a central party
  • Users can borrow a token in the protocol (to use, sell, or re-lend) by using their balances as collateral

results matching ""

    No results matching ""