Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose important economic data as RPC-backed subscriptions #4639

Closed
Tartuffo opened this issue Feb 22, 2022 · 2 comments
Closed

Expose important economic data as RPC-backed subscriptions #4639

Tartuffo opened this issue Feb 22, 2022 · 2 comments
Assignees
Labels
AMM BLD-Boost Issues relating to the BLD Boost contract and UI Core Economy OBSOLETE in favor of INTER-protocol Epic Inter-protocol Overarching Inter Protocol read-no-tx topic: reading from the chain without a transaction vaults_triage DO NOT USE Vaults VaultFactor (née Treasury)

Comments

@Tartuffo
Copy link
Contributor

Tartuffo commented Feb 22, 2022

This data can be used in Blockchain Explorers and via sites like The Graph for the community to get key information about the state of the RUN Protocol components.

Values will be emitted as a stream of states (cf. Notifiers and Subscriptions) published into cosmos chain storage (which is a map where values are strings and keys are strings representing a dot-separated hierarchical path, e.g. "animalia.arthropoda.crustacea.malacostraca.decapoda") and ideally also events, and consumable as a "prefix-lossy" subscription reading from the associated key.

From our meeting on Feb 22, here is the data we want to expose:

  1. AMM
    1. All trading pairs, the algo for them
    2. The pool amounts (X, Y, LP)
    3. Trades as they occur
    4. Liquidity change events (add, remove)
    5. Governance parameters, contract terms, fees
  2. Vault Factory
    1. Per Contract
      1. Governance parameters, contract terms, fees
      2. Allowed collateral types
      3. Current reward pool (fees collected so far)
      4. Number and amount of shortfall
    2. Per Collateral
      1. Governance parameters, interest rate, liquidation ratio, liquidation penalty per collateral
      2. Current debt limit
      3. Number of vaults
      4. Outstanding debt, collateral held
      5. Compounded interest
      6. Liquidation strategy (may be per contract)
      7. Liquidation state (how much is currently being liquidated)
    3. Per Vault
      1. Debt
      2. Collateral
      3. Interest snapshot (used to calc the compounded interest per collateral)
      4. Status (open, closed, liquidating)
  3. Liquidation contract
    1. Governance parameters (price impact limits, rate limits)
    2. Collateral and debt that it is currently working on.
    3. Cohort sale event (with price and the net shortfall)
  4. Reserve Contract
    1. How much of each asset type
    2. Size of the reward pool? (Question for Chris)
    3. Governance parameters
  5. Price Authourity
    1. For each asset
    2. Aggregate price
    3. Source information (per oracle node operator)
    4. Governance parameters
  6. runStake
    1. Per Contract
      1. Net amount minted
      2. Total collateral
      3. Distribution of utilization of loan amount (?)
      4. Governance parameters (debt limit, allowed ratio, interest rate curve)
    2. Per Account
      1. Locked BLD amount
      2. Debt
      3. Interest rate (?)
@Tartuffo Tartuffo added BLD-Boost Issues relating to the BLD Boost contract and UI Epic Inter-protocol Overarching Inter Protocol and removed BLD-Boost Issues relating to the BLD Boost contract and UI labels Feb 22, 2022
@Tartuffo Tartuffo changed the title Expose key RUN Protocol data via RPC and notification stream Expose key RUN Protocol economic data via RPC and notification stream Feb 23, 2022
@Tartuffo Tartuffo added the Core Economy OBSOLETE in favor of INTER-protocol label Feb 23, 2022
@Tartuffo Tartuffo self-assigned this Feb 23, 2022
@Tartuffo
Copy link
Contributor Author

@Chris-Hibbert wrote: "AIUI, the reward funds are currently directed to the cosmos-level vbank, where they are distributed directly. I think this shows up in the bootstrap wiring as rewardDistributor." So we'll need a ticket for that.

@Chris-Hibbert Chris-Hibbert added AMM Vaults VaultFactor (née Treasury) BLD-Boost Issues relating to the BLD Boost contract and UI labels Mar 10, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 milestone Mar 23, 2022
@turadg turadg assigned turadg and unassigned Tartuffo May 5, 2022
@gibson042 gibson042 changed the title Expose key RUN Protocol economic data via RPC and notification stream Expose important economic data as RPC-backed subscriptions May 13, 2022
@Tartuffo Tartuffo removed this from the Mainnet 1 RC0 milestone Sep 21, 2022
@dckc dckc added the read-no-tx topic: reading from the chain without a transaction label Jan 5, 2023
@ivanlei ivanlei added the vaults_triage DO NOT USE label Jan 17, 2023
@ivanlei ivanlei added this to the Vaults RC0 milestone Feb 1, 2023
@turadg
Copy link
Member

turadg commented Feb 13, 2023

I think all necessary data is in for Vaults Release. If any is missing, please file new issues.

@turadg turadg closed this as completed Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMM BLD-Boost Issues relating to the BLD Boost contract and UI Core Economy OBSOLETE in favor of INTER-protocol Epic Inter-protocol Overarching Inter Protocol read-no-tx topic: reading from the chain without a transaction vaults_triage DO NOT USE Vaults VaultFactor (née Treasury)
Projects
None yet
Development

No branches or pull requests

5 participants