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

fix: add ability to send custom address to calculate plvGLP price #55

Closed
wants to merge 1 commit into from

Conversation

r0ohafza
Copy link
Contributor

@zobront
Copy link

zobront commented Feb 6, 2023

I don't think this change solves the issue. Whatever address you enter will not be a partner, which address(0) won't be as well. But I guess that in theory it's safer to use an address you KNOW will never be a partner.

The only way to solve what was brought up is to pass the address of the owner who the oracle is being called on behalf of, which may not be worthwhile.

Otherwise, you are simply accepting that it may the oracle may slightly undervalue assets for users who are partners, which seems reasonable, and this fix is fine.

@r0ohafza
Copy link
Contributor Author

r0ohafza commented Feb 6, 2023

I don't think this change solves the issue. Whatever address you enter will not be a partner, which address(0) won't be as well. But I guess that in theory it's safer to use an address you KNOW will never be a partner.

The only way to solve what was brought up is to pass the address of the owner who the oracle is being called on behalf of, which may not be worthwhile.

Otherwise, you are simply accepting that it may the oracle may slightly undervalue assets for users who are partners, which seems reasonable, and this fix is fine.

If sentiment accounts become partners then creating an oracle by passing the sentiment account address would account for the partner fee and value the token accurately

@zobront
Copy link

zobront commented Feb 7, 2023

Hmm I'm realizing there's a bit of a structural issue here.

Because if that's the case (all Sentiment accounts are partners, account in the Oracle is a partner), then it'll calculate the price correctly for holders and liquidations.

But once it's liquidated, the liquidator will not be a parter, so will get less than expected.

I'm not sure the best way to solve that. Do you have ideas?

@r0ohafza
Copy link
Contributor Author

r0ohafza commented Feb 7, 2023

Hmm I'm realizing there's a bit of a structural issue here.

Because if that's the case (all Sentiment accounts are partners, account in the Oracle is a partner), then it'll calculate the price correctly for holders and liquidations.

But once it's liquidated, the liquidator will not be a parter, so will get less than expected.

I'm not sure the best way to solve that. Do you have ideas?

Yeah, still not sure how to solve the liquidation issue at the moment, going to put this on hold until then, thanks a lot for your input here!

@r0ohafza r0ohafza closed this Feb 7, 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