-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat(oracle): add oracle wrappers #169
Conversation
6d2a660
to
359f412
Compare
@@ -2,5 +2,5 @@ | |||
pragma solidity >=0.5.0; | |||
|
|||
interface IOracle { | |||
function price() external view returns (uint256); | |||
function price() external view returns (uint256 borrowablePrice, bool canBorrow, bool canWithdraw); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to see canBorrow and canWithdraw to be flipped to borrowPaused and withdrawPaused (or something similar), as the default value of these should be to allow these interactions.
Also, the naming of canWithdraw in this interface is not consistent with canWithdrawCollateral in Blue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could argue that it's "safer" to require a non-default value for these flags though. I'm ok with both anyway!
1a3bb68
to
5cbe214
Compare
Moved to periphery repo |
This is only a first step to discuss further the topic of oracles. Nothing is settled, it's just a bunch of suggestions I'm making to bootstrap further debates, now that it seems the majority agrees to implement a single per-market oracle wrapper (see #49)