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

Readme and fix license #99

Merged
merged 8 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023 Morpho Labs
Copyright (c) 2023 Morpho Association
MathisGD marked this conversation as resolved.
Show resolved Hide resolved

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Morpho Blue IRM
# Morpho Blue IRMs

Some interest rate models for Morpho Blue:
MathisGD marked this conversation as resolved.
Show resolved Hide resolved
MathisGD marked this conversation as resolved.
Show resolved Hide resolved

- [AdaptiveCurveIRM](./src/AdaptiveCurveIrm.sol)
MathisGD marked this conversation as resolved.
Show resolved Hide resolved

## Resources

- AdaptiveCurveIRM: [documentation](https://www.notion.so/morpho-labs/Morpho-Blue-Documentation-Hub-External-00ff8194791045deb522821be46abbdc?pvs=4#d8269074bfd649009f28625a9caa38ea), [announcement article](https://morpho.mirror.xyz/aaUjIF85aIi5RT6-pLhVWBzuiCpOb4BV03OYNts2BHQ).

## Audits

All audits are stored in the [audits](./audits/)' folder.
All audits are stored in the [audits](audits)' folder.

## Licences

The primary licence is MIT, see [LICENCE](LICENSE).

## Getting started
MathisGD marked this conversation as resolved.
Show resolved Hide resolved

Install dependencies: `forge install`

MathisGD marked this conversation as resolved.
Show resolved Hide resolved
Run tests: `forge test`
10 changes: 6 additions & 4 deletions test/AdaptiveCurveIrmTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ contract AdaptiveCurveIrmTest is Test {
MarketParams internal marketParams = MarketParams(address(0), address(0), address(0), address(0), 0);

function setUp() public {
irm =
new AdaptiveCurveIrm(address(this), CURVE_STEEPNESS, ADJUSTMENT_SPEED, TARGET_UTILIZATION, INITIAL_RATE_AT_TARGET);
irm = new AdaptiveCurveIrm(
address(this), CURVE_STEEPNESS, ADJUSTMENT_SPEED, TARGET_UTILIZATION, INITIAL_RATE_AT_TARGET
);
vm.warp(90 days);

bytes4[] memory selectors = new bytes4[](1);
Expand Down Expand Up @@ -187,8 +188,9 @@ contract AdaptiveCurveIrmTest is Test {
function testRateAfter3WeeksUtilizationTargetPingEveryMinute() public {
int256 initialRateAtTarget = int256(1 ether) / 365 days; // 100%

irm =
new AdaptiveCurveIrm(address(this), CURVE_STEEPNESS, ADJUSTMENT_SPEED, TARGET_UTILIZATION, initialRateAtTarget);
irm = new AdaptiveCurveIrm(
address(this), CURVE_STEEPNESS, ADJUSTMENT_SPEED, TARGET_UTILIZATION, initialRateAtTarget
);

Market memory market;
market.totalSupplyAssets = 1 ether;
Expand Down