Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Prevent large token rebases in a general determenistic way #405

Closed
TheDZhon opened this issue Feb 24, 2022 · 6 comments · Fixed by #482
Closed

Prevent large token rebases in a general determenistic way #405

TheDZhon opened this issue Feb 24, 2022 · 6 comments · Fixed by #482
Labels
discussion next-upgrade Things to pickup for the next protocol upgrade

Comments

@TheDZhon
Copy link
Contributor

TheDZhon commented Feb 24, 2022

We've evaluated that too large stETH rebase could provoke oracle reports' sandwiching.

After the Merge we expect four sources of rebase:

  • CL rewards
  • EL rewards (MEV)
  • EL rewards (tx fee)
  • Coverage application (decreasing total shares amount)

Facing good weather conditions, everything is ok because threatening rebase changes starts from 7.5 basis points (BP) of TVL while we expect that CL rewards are about ~1.4 BP, EL rewards are about ~0.5-1.5 BP and coverage application rate-limited to 4 BP.

Nevertheless, MEV rewards could have spikes and outliers so we should care about stakeholders and prevent unfair arbitrage possibilities caused by the proto implementation peculiarities.

Two ways to carry out a possible solution could be proposed:

  • Make oracle reports happen more often (~12h, ~6h periods)
  • Induce global rate limits among all possible rebasing sources.

Context:

@TheDZhon TheDZhon linked a pull request Jan 31, 2023 that will close this issue
@ujenjt ujenjt added the next-upgrade Things to pickup for the next protocol upgrade label Jan 31, 2023
@TheDZhon
Copy link
Contributor Author

Resolved in #482

@sambacha
Copy link

sambacha commented Apr 6, 2023

Resolved in #482

The solution is in #482 though it is not yet deployed. Should this issue really be closed until said deployment on mainnet?

@TheDZhon
Copy link
Contributor Author

TheDZhon commented Apr 6, 2023

I see your concerns, thank you!

Re-opening the issue to avoid confusion and misgivings in the future 👍

@TheDZhon TheDZhon reopened this Apr 6, 2023
@sambacha
Copy link

sambacha commented Apr 6, 2023

I see your concerns, thank you!

  • Mainnet version also prevents large token rebases yet uses multiple limiters instead of just one
  • Even though it's not deployed on mainnet yet, the code is live on Görli and the fix is incorporated in the latest release candidate: v2.0.0-rc.1 (release)

Re-opening the issue to avoid confusion and misgivings in the future 👍

Thanks, also, should this rebase limit be tied to a specific oracle update window, I did not see any explicit mention of update frequency and rebase limit. It seems that should be the case potentially, as different oracle update frequency would necessarily change the scale of the rebase value.

This may just be a concern though for downstream users of this data point, and not necessarily affect Lidos direct usage of the max rebase value as a circuit breaker of sorts.

@TheDZhon
Copy link
Contributor Author

TheDZhon commented Apr 6, 2023

The limit applies as a part of each Oracle report (reports provided daily), yeah.

The limit isn't tied to a particular duration because it should prevent a step-wise positive token rebase (e.g., if the previous oracle report is missed, the limit doesn't take into account this fact).

@TheDZhon
Copy link
Contributor Author

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
discussion next-upgrade Things to pickup for the next protocol upgrade
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@TheDZhon @ujenjt @sambacha and others