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

H-1: Update floorPrice on premint unstake #506

Merged
merged 1 commit into from
Dec 20, 2023
Merged

H-1: Update floorPrice on premint unstake #506

merged 1 commit into from
Dec 20, 2023

Conversation

toshiSat
Copy link
Contributor

@toshiSat toshiSat commented Dec 6, 2023

No description provided.

@elmutt
Copy link
Contributor

elmutt commented Dec 11, 2023

This is only part of his recommended fix and I dont think it fully fixes it:

A potential mitigation would be to ensure the floor price is updated when the user unstakes using the premint logic. This would allow to end the cycle after the first unstake action, but still leaves room for an arbitrage in case of a price deviation.

Additionally, consider using approxPrice() during the premint stake operation, or introducing some fee in premint unstake to disincentivize any internal arbitrage.

@toshiSat
Copy link
Contributor Author

toshiSat commented Dec 11, 2023

This is only part of his recommended fix and I dont think it fully fixes it:

A potential mitigation would be to ensure the floor price is updated when the user unstakes using the premint logic. This would allow to end the cycle after the first unstake action, but still leaves room for an arbitrage in case of a price deviation.

Additionally, consider using approxPrice() during the premint stake operation, or introducing some fee in premint unstake to disincentivize any internal arbitrage.

I think it fixes it enough, adding fees all of a sudden makes safEth not feeless, I don't just want to do that. This prevents the premint contracts from being drained, I would rather change it to completely fix it to using approxPrice() in the stake premint

@toshiSat toshiSat merged commit e141139 into develop Dec 20, 2023
1 check passed
@toshiSat toshiSat deleted the H-1 branch December 20, 2023 16:27
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