Skip to content

Instantly share code, notes, and snippets.

@adrianmcli
Created May 16, 2021 01:29
Show Gist options
  • Save adrianmcli/cc8e39a6021e5c1551ed4d4bb12537ab to your computer and use it in GitHub Desktop.
Save adrianmcli/cc8e39a6021e5c1551ed4d4bb12537ab to your computer and use it in GitHub Desktop.
Draft UMIP for BASK's KPI Options

HEADERS

UMIP-XX
UMIP Title Add BASKUSD and BDIDPI_MCAP_DIFF as supported price identifiers
Authors Adrian Li
Status Draft
Created 2021-05-15
Discourse Link INSERT DISCOURSE LINK HERE

SUMMARY

The DVM should support price requests for BASKUSD and BDIDPI_MCAP_DIFF, where:

  • BASKUSD can be defined as the US Dollar value of the BasketDAO Gov token (BASK).
  • BDIDPI_MCAP_DIFF can be defined as the US Dollar value of:
    BDIDPI_MCAP_DIFF = MarketCap(BDI) - MarketCap(DPI)
    

This proposal is made anticipation of KPI Options to be created based on these price identifiers. The creation of these KPI Options is supported by members on the BasketDAO community discord.

MOTIVATION

The BasketDAO community has expressed (on their community discord) a desire to create KPI Options to incentivize market forces to support the BASK price as well as the market capitalization value of the BDI (relative to DPI). In order to do so, the following two price identifiers will need to be added.

BASKUSD

This identifier will report the current USD price of the BasketDAO Gov token (BASK) as traded on the open market.

Adding this identifier will allow the creation of KPI Options to incentivize market forces to improve the price of the BASK token. It will also enable the possibility of proposing BASK as collateral to borrow against. However, the addition of adding BASK as a collateral will be discussed in a separate UMIP.

BDIDPI_MCAP_DIFF

This identifier will report the absolute difference of the USD market capitalization value between the BasketDAO DeFi Index and the DefiPulse Index. More specifically, this value will be defined as follows:

BDIDPI_MCAP_DIFF = [USD market cap of BDI] - [USD market cap of DPI]

Adding this identifier will allow the creation of KPI Options to incentivize market forces to improve the relative market capitalization of BDI to DPI.

Note: It is anticipated that these Price Identifiers will be used to create KPI Options, however it is acknowledged that it may be used for a variety of purposes.

RATIONALE

The UMA Protocol would be improved by this proposal, as this can increase the number of KPI Options being created on the UMA protocol and thus increasing the value of assets supported by the DVM. There will also be collaborative benefits between the UMA and BasketDAO communities.

DATA SPECIFICATIONS

BASKUSD

BDIDPI_MCAP_DIFF

TECHNICAL SPECIFICATIONS

BASKUSD

Price Identifier Name: BASKUSD

Base Currency: BASK

Quote currency: USD

Intended Collateral Currency: TODO

Scaling Decimals: 18 (1e18)

Rounding: Round to nearest 8 decimal places (seventh decimal place digit >= 5 rounds up and < 5 rounds down)

BDIDPI_MCAP_DIFF

TODO

IMPLEMENTATION

BASKUSD

1. Query USD price of BASK from CoinGecko Live API (see below).
2. Round to nearest 8 decimal places.

It should be noted that this identifier is potentially prone to attempted manipulation because of its reliance on one pricing source. As always, voters should ensure that their results do not differ from broad market consensus. This is meant to be vague as the tokenholders are responsible for defining broad market consensus.

CoinGecko Live API

The CoinGecko live price feed API is available at the following URL:

https://api.coingecko.com/api/v3/simple/price?ids=basketdao&vs_currencies=usd

The response data uses the following JSON format:

{
  "basketdao": {
    "usd": 211.2
  }
}

BDIDPI_MCAP_DIFF

1. Query Market Cap of BDI and DPI from CoinGecko Live API (see below).
2. From the response, perform the following: MarketCap(BDI) - MarketCap(DPI)
3. Round this raw value

Note that this value may be negative if the market cap of BDI is less than the marketcap of DPI.

CoinGecko Live API

The CoinGecko live price feed API is available at the following URL:

https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=interest-bearing-dpi%2C%20defipulse-index&per_page=100&page=1&sparkline=false

SECURITY CONSIDERATIONS

Adding these new identifiers by themselves pose little security risk to the DVM or priceless financial contract users. However, anyone deploying a new priceless token contract referencing this identifier should take care to parameterize the contract appropriately to the reference asset’s volatility and liquidity characteristics to avoid the loss of funds for synthetic token holders. Additionally, the contract deployer should ensure that there is a network of liquidators and disputers ready to perform the services necessary to keep the contract solvent.

$UMA-holders should evaluate the ongoing cost and benefit of supporting price requests for these identifiers and also contemplate de-registering these identifiers if security holes are identified. As noted above, $UMA-holders should also consider re-defining these identifiers as liquidity in the underlying asset changes, or if added robustness (e.g. via TWAPs) are necessary to prevent market manipulation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment