solana-labs / solana-program-library

A collection of Solana programs maintained by Solana Labs
https://solanalabs.com
Apache License 2.0
3.56k stars 2.07k forks source link

lending: bring back reserve that has quote token #1992

Closed leofisG closed 1 year ago

leofisG commented 3 years ago

Since PR #1757 , there is no concept of quote token reserve anymore, instead all the reserve requires an oracle during initialization. However, it doesn't make sense for USDC to have a price since it should always equals to USD.

For Pyth oracle, we have a USDC/USD price feed, but for other oracle, e.g. Switchboard there is no such price feed.

jordaaash commented 3 years ago

The direction we've discussed for this is making an external program responsible for price discovery. This program can use Pyth, Switchboard, Serum, or some other source of price information, and normalize it however is needed by the lending market. If implemented this way, there won't be a notion of a reserve quote token or currency within the lending program itself.