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

Use asset values instead of asset prices in oracle calls #540

Closed
wants to merge 2 commits into from

Conversation

alcueca
Copy link

@alcueca alcueca commented Oct 13, 2023

Refactor to integrate with oracles using asset value terms instead of asset price terms.

Something is off in the liquidations, needs some debugging.

Also, the liquidations now do two oracle calls (one for _isHealthy and another to determine the liquidation), that is probably a non-starter due to gas reasons. If the liquidations can be refactored to work on position proportions instead of price then we wouldn't need the second oracle call.

@alcueca alcueca changed the title Merge branch 'main' of github.com:morpho-org/morpho-blue Use asset values instead of asset prices in oracle calls Oct 13, 2023
@MathisGD
Copy link
Contributor

MathisGD commented Nov 8, 2023

Thank you for your POC. I'm not in favor of continuing its development, as I don't find that it makes the code so much clearer. Also, as you mentioned in #535, we loose an optimization avoiding to call the oracle twice.

One advantage that it has, that I have not see mentioned, is that it enables complex oracles returning a different price depending on the amount (to reflect the market). But it's not even sure that such oracle will ever exist.

@MathisGD MathisGD closed this Nov 8, 2023
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.

2 participants