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

Vaults should price collateral in Dollars #4714

Closed
Tracked by #3924
Chris-Hibbert opened this issue Mar 1, 2022 · 1 comment
Closed
Tracked by #3924

Vaults should price collateral in Dollars #4714

Chris-Hibbert opened this issue Mar 1, 2022 · 1 comment
Assignees
Labels
Core Economy OBSOLETE in favor of INTER-protocol enhancement New feature or request Inter-protocol Overarching Inter Protocol oracle Related to on-chain oracles. Vaults VaultFactor (née Treasury)
Milestone

Comments

@Chris-Hibbert
Copy link
Contributor

What is the Problem Being Solved?

The stability of RUN relies on Vaults pricing collateral in dollars and lending RUN and liquidating Vaults based on the dollar price of the assets.

dtribble(keybase): Dollars. Or USDC potentially
btulloh(keybase): We must use USD prices of the collateral as reported by the oracle. Not USDC prices.

Description of the Design

The current code in vaults.js asks for prices in RUN.

  const quoteAmount = await E(priceAuthority).quoteGiven(
      collateralAmount,
      runBrand,
    );
michaelfix(keybase): I know we must have USD price oracles.  My question is one of API: should we access those price authority pairs using xBrand-to-runBrand, or should we somehow use a fake brand (no mint or issuer) specifically for USD and have xBrand-to-fakeUsdBrand?
dckc(keybase): The latter. It's not so much "fakeUsd" as "USD as defined by the oracle network"
(oops... I see you used "fake" to mean no mint)

Security Considerations

This is about economic security of the platform, and doesn't impact platform security.

Test Plan

We'll need tests for the dollar-based oracles, and we'll need to update tests to rely on dollar-based oracles.

@Chris-Hibbert Chris-Hibbert added enhancement New feature or request Core Economy OBSOLETE in favor of INTER-protocol Inter-protocol Overarching Inter Protocol oracle Related to on-chain oracles. labels Mar 1, 2022
@Chris-Hibbert Chris-Hibbert added the Vaults VaultFactor (née Treasury) label Mar 10, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 milestone Mar 23, 2022
@Tartuffo Tartuffo modified the milestones: Mainnet 1, RUN Protocol RC0 Apr 6, 2022
@Chris-Hibbert Chris-Hibbert removed their assignment Apr 12, 2022
@dckc
Copy link
Member

dckc commented May 3, 2022

This is addressed by scaledPriceAuthority.js in #5190, I'm pretty sure.

@dckc dckc closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Economy OBSOLETE in favor of INTER-protocol enhancement New feature or request Inter-protocol Overarching Inter Protocol oracle Related to on-chain oracles. Vaults VaultFactor (née Treasury)
Projects
None yet
4 participants