fix: Fixes the problems that result from empty share reserves#415
fix: Fixes the problems that result from empty share reserves#415jalextowle merged 32 commits intomainfrom
Conversation
2d03d20 to
e8df59d
Compare
28ed238 to
d3b5c59
Compare
69ec048 to
1e7f0e6
Compare
Hyperdrive Gas Benchmark
This comment was automatically generated by workflow using github-action-benchmark. |
jrhea
left a comment
There was a problem hiding this comment.
Okay i made an initial pass, but i still haven't reviewed the tests
ControlCplusControlV
left a comment
There was a problem hiding this comment.
Minor nits from me + Jonny's suggestions, can re-review once those are patched
|
Have you looked at fixing CI? Would prefer if CI failing was not the norm |
ControlCplusControlV
left a comment
There was a problem hiding this comment.
Some minor nits, looks really good but I still have some outstanding questions and still a lot of commented out code
It's just a spelling issue. I fixed most of the spelling mistakes before I left, but I missed this one. My style is generally to review when the linter is broken or a unit tests or two is broken, but to make sure that everything is fixed prior to the PR being merged. I'm happy to do something different, but in this particular case, it would have slowed down our development cycle over a typo. |
2a8cab0 to
5da6a5e
Compare
5da6a5e to
68c401e
Compare
|
Hmm, looks like |
gtowle03
left a comment
There was a problem hiding this comment.
Excellent work. I am very proud
Fixes: #385.
To add some context to the issue, this PR adds a minimum share reserves that should prevent a host of critical and high severity issues from being possible. During the development of this feature, we noticed another DOS vector that could result from the share reserves being reduced to a small non-zero value. As part of this PR, we found sane defaults for the major yield sources and added tests demonstrating that these default values are sufficient to prevent the numerical issues that have been found with
_updateLiquidity.This minimum share reserves change consists of two parts:
With this in mind, we have
minimumShareReservesshares set aside in the share reserves that sets a hard lower bound on what the value can be. Similarly, we haveminimumShareReservesLP shares set aside to serve as a hard lower bound for the active LP total supply.