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

RFC: Soil Issuance Update #739

Closed
nickkatsios opened this issue Jan 4, 2024 · 1 comment
Closed

RFC: Soil Issuance Update #739

nickkatsios opened this issue Jan 4, 2024 · 1 comment
Labels
⛓ Contracts Related to Beanstalk and ecosystem contracts 📜 RFC Formal protocol RFCs

Comments

@nickkatsios
Copy link
Contributor

RFC: Soil Issuance Update

Authors

Ben Weintraub, Brendan Sanderson, Guy, Brean, deadmanwalking

Summary

When $\Delta B_{\overline{t-1}} < 0$, change Soil issued at gm to be the minimum of (1) $-\Delta B$ calculated using the instantaneous reserves from Multi Flow and (2) $-\Delta B_{\overline{t-1}}$.

Problem

Beanstalk occasionally overissues Soil at gm because Soil issuance below peg is solely based on $-\Delta B_{\overline{t-1}}$.

Beanstalk can read inter-block MEV manipulation resistant instantaneous reserves for whitelisted Well LP tokens via Multi Flow, but does not yet use these values to determine Soil issuance below peg.

Context

Consider an example where Beanstalk is at -300k deltaB for the first 58 minutes of a Season. At the 58th minute, i.e., 10 blocks before the next gm call, a Farmer buys and Sows 200k Beans, bringing the current deltaB to -100k.

Assuming no other trades in the final 2 minutes of the Season, the Soil issued at gm will be slightly less than 300k, despite Beanstalk only needing 100k Beans to be bought to return to peg. Before Multi Flow, this was necessary for sufficient manipulation resistance.

Solution

When $\Delta B_{\overline{t-1}} < 0$, change Soil issued at gm to be the minimum of (1) $-\Delta B$ calculated using the instantaneous reserves from Multi Flow and (2) $-\Delta B_{\overline{t-1}}$.

Intuition

In general, Beanstalk does not need to be particularly aggressive when issuing Soil. Beanstalk does not want to issue debt if it doesn't have to. Therefore, accounting for the instantaneous reserves in Multi Flow when below peg is appropriate.

Specification

TBD.

@Brean0
Copy link
Contributor

Brean0 commented Aug 11, 2024

#802 addresses this issue.

@Brean0 Brean0 closed this as completed Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛓ Contracts Related to Beanstalk and ecosystem contracts 📜 RFC Formal protocol RFCs
Projects
None yet
Development

No branches or pull requests

2 participants