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

fixed rate irm #123

Merged
merged 30 commits into from
Mar 5, 2024
Merged

fixed rate irm #123

merged 30 commits into from
Mar 5, 2024

Conversation

MathisGD
Copy link
Contributor

@MathisGD MathisGD commented Jan 18, 2024

Fixed rate IRM for Morpho Blue. Anybody can set the rate for a market but it can be set only once. Typical use case is that the market creator batches the creation of the market with the fixed rate IRM with the setting of the rate they want for it on the IRM.

Note that this IRM probably doesn't make sense alone, as a lending pool with fixed IRM faces illiquidity risks. It will be used to experiment with different stuff like terms on blue.

This IRM makes market creators vulnerable to a griefing attack: for an oracle, you can set the rate for all the markets that make sense with this oracle, making these markets that could have been created in the future ususable. Meaning that now to create a market with the same pair of assets (with a different LLTV for example) you might have to re-deploy the oracle because a malicious actor could have set the rate already.

@MathisGD MathisGD self-assigned this Jan 18, 2024
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/libraries/ErrorsLib.sol Outdated Show resolved Hide resolved
src/interfaces/IFixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/libraries/ErrorsLib.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
@MathisGD MathisGD marked this pull request as ready for review February 8, 2024 10:15
hardhat.config.ts Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/interfaces/IFixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
test/forge/FixedRateIrmTest.sol Outdated Show resolved Hide resolved
test/forge/FixedRateIrmTest.sol Outdated Show resolved Hide resolved
test/forge/FixedRateIrmTest.sol Outdated Show resolved Hide resolved
MerlinEgalite
MerlinEgalite previously approved these changes Feb 10, 2024
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
foundry.toml Outdated Show resolved Hide resolved
src/FixedRateIrm.sol Outdated Show resolved Hide resolved
Rubilmax
Rubilmax previously approved these changes Feb 19, 2024
foundry.toml Show resolved Hide resolved
QGarchery
QGarchery previously approved these changes Feb 19, 2024
Jean-Grimal
Jean-Grimal previously approved these changes Feb 19, 2024
MerlinEgalite
MerlinEgalite previously approved these changes Feb 19, 2024
MathisGD and others added 9 commits February 28, 2024 10:37
Co-authored-by: Merlin Egalite <44097430+MerlinEgalite@users.noreply.github.com>
Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com>
Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com>
Copy link
Contributor

@MerlinEgalite MerlinEgalite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are failing :/

@MathisGD
Copy link
Contributor Author

MathisGD commented Mar 5, 2024

Tests are failing :/

not anymore :-) (weird rounding in adaptive curve irm when fuzzing that i can't reproduce locally, but not impact). Will open an issue to investigate

@MerlinEgalite MerlinEgalite merged commit 45fe696 into main Mar 5, 2024
4 checks passed
@MerlinEgalite MerlinEgalite deleted the feat/fixed-rate branch March 5, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants