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

feat(oracle): add oracle wrappers #169

Closed
wants to merge 8 commits into from

Conversation

Rubilmax
Copy link
Collaborator

@Rubilmax Rubilmax commented Jul 24, 2023

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)

@@ -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);
Copy link
Contributor

@pakim249CAL pakim249CAL Jul 24, 2023

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.

Copy link
Collaborator Author

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!

@Rubilmax Rubilmax changed the base branch from main to feat/single-oracle July 31, 2023 12:13
@Rubilmax Rubilmax marked this pull request as ready for review July 31, 2023 12:14
@Rubilmax Rubilmax self-assigned this Jul 31, 2023
@MathisGD
Copy link
Contributor

MathisGD commented Aug 7, 2023

Moved to periphery repo

@MathisGD MathisGD closed this Aug 7, 2023
@Rubilmax Rubilmax deleted the feat/oracle-wrappers branch August 28, 2023 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use only one oracle Implement first oracles Oracle could return more things
3 participants