reserve-protocol / protocol

Permissionless asset-backed, yield-bearing & overcollateralized stablecoins on Ethereum
Other
150 stars 107 forks source link

issuance premium #1173

Closed tbrent closed 3 months ago

tbrent commented 3 months ago

Add issuance premium to BasketHandler that begins on and can be toggled off by governance.

One of the bigger things to note is that this changes the price of a BU pretty significantly, since the upper BU price now takes into account any issuance premium that may apply. Interestingly this means during a de-peg the BU high price remains at $1.01, or just above its peg, instead of falling with the low price. This part should get some special attention, it feels more potentially dangerous to me than the actual issuance quantity change.

Had to do a few things to reduce BasketHandler contract size as well, such as finally deleting lotPrice()

openzeppelin-code[bot] commented 3 months ago

prevent toxic issuance

Generated at commit: fb29675b49a6abe3ffb79f09617640949c612bbe

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
3
3
0
15
38
59
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

tbrent commented 3 months ago

issuance premiums for all the currently-backing collateral

Screenshot 2024-07-13 at 8 55 58 PM

tbrent commented 3 months ago

depegs

tbrent commented 3 months ago

still-to-add: a single fork test case on the new functionality