Closed 0xean closed 1 month ago
adding much more testing and a better algorithm for calling withdraw()
please take another pass, marking as "ready for review"
One more thought regarding user interaction optimization: withdraw()
could instead withdraw all cooled down unstaking requests instead of the most recent one each call.
One more thought regarding user interaction optimization:
withdraw()
could instead withdraw all cooled down unstaking requests instead of the most recent one each call.
Yes, I thought about this also.
The complexity here is not trivial because we need to modify the array index while iterating the same array. I don't know a graceful way to handle this in solidity without introducing a significant amount of code that I don't think is really warranted. If you have an easy way to do it, I think its worth discussing.
@gomesalexandre - ready for another pass. Good to treat as high risk, so would prefer 2 stampers.
Creating this draft pull request to discuss this option.
If we decide we want to move forward, will continue with additional tests, but a basic POC test exists.
Some notes:
TLDR: we can do it, but there are just tradeoffs here. Is it better to allow it or not?