Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
eaab822
V2 Adapter
adhusson Nov 7, 2025
0999c10
docs: clarify
adhusson Nov 11, 2025
c56bf18
fix: enforce price of 1 in force deallocate
adhusson Nov 12, 2025
70db510
feat: no manager, rename vars, doc
adhusson Nov 17, 2025
55511bc
fix tests and interface
adhusson Nov 17, 2025
43d7c68
feat: add durations
adhusson Nov 20, 2025
1f3ff72
bump forge std
adhusson Nov 20, 2025
4a3b955
feat: simplify durations lib
adhusson Nov 25, 2025
81cbeb9
feat: make durations dynamic
adhusson Nov 25, 2025
df60b71
small fixes
adhusson Nov 26, 2025
4f41f7d
use solidity's packed arrays
adhusson Nov 26, 2025
9a380aa
update buffer compoutation & naming & docs style
adhusson Nov 27, 2025
c935db4
remove lastUpdate in position, add tests
adhusson Nov 28, 2025
3fda204
save a call on first buy
adhusson Nov 28, 2025
9620e81
fix force deallocate change, refactor selfDeallocate
adhusson Nov 29, 2025
9ce37d3
durations library
adhusson Nov 30, 2025
d354fa5
move durations lib
adhusson Dec 1, 2025
a40c730
rename matching duration function
adhusson Dec 1, 2025
0e2df83
Merge branch 'main' into feat/durations
adhusson Dec 1, 2025
3bf51f7
Merge branch 'main' into feat/adapter-v2
adhusson Dec 1, 2025
9d75ff8
Merge branch 'feat/adapter-v2' into feat/durations
adhusson Dec 1, 2025
cc6855f
Merge branch 'feat/durations' into feat/durations-dynamic-packed-2
adhusson Dec 1, 2025
f8c2c67
fix test
adhusson Dec 1, 2025
9430b8f
simpler line order
adhusson Dec 1, 2025
dc76ebc
feat: immutable durations
adhusson Dec 8, 2025
9f22da3
fix currentGrowth update and simplify interface
adhusson Dec 8, 2025
5dd09b8
fix: currentGrowth update
adhusson Dec 8, 2025
00582cb
fix missing currentGrowth update and reorg update
adhusson Dec 8, 2025
3d4f0cb
Merge branch 'feat/adapter-v2' into feat/durations
adhusson Dec 8, 2025
b9d2427
Merge branch 'feat/durations' into feat/durations-immutable-packed
adhusson Dec 9, 2025
b3f2404
fix onBuy return value
adhusson Dec 9, 2025
881cfcc
fix first lastUpdate
adhusson Dec 9, 2025
dd27eb6
remove positions
adhusson Dec 9, 2025
485ab91
rename withdraw fn, simplify check, add comments, parameterize durations
adhusson Dec 10, 2025
9f8e924
cleanup events and add forceDeallocate update test
adhusson Jan 13, 2026
b501788
fix: accounting & interface, add comments
adhusson Jan 29, 2026
6eca160
fix: dont insert passed maturity on buy
adhusson Mar 4, 2026
639b496
midnight
adhusson Apr 9, 2026
740eb32
fix shadowing
adhusson Apr 9, 2026
bd2f671
cleaner realizeLoss , prioritize removing future growth
adhusson Apr 10, 2026
0f0f133
autorealize loss, more midnight update, fixes
adhusson Apr 14, 2026
27673c6
fix accounting based on net credit
adhusson Apr 16, 2026
1e3ecd7
simplify durations
adhusson Apr 16, 2026
95469bc
Merge branch 'main' of github.com:morpho-org/vault-v2 into feat/adapt…
adhusson Apr 16, 2026
909693d
simplify
adhusson Apr 16, 2026
ccf4d65
simplify
adhusson Apr 16, 2026
fde7336
reorder eliminate dead code
adhusson Apr 16, 2026
fdfb079
reject stale pointer hint
adhusson Apr 17, 2026
a31b7bc
reject stale pointer hint
adhusson Apr 17, 2026
b3984f3
reuse storage pointer
adhusson Apr 17, 2026
208962c
remove unused vars
adhusson Apr 17, 2026
50f360b
Merge branch 'feat/adapter-v2' into doubly-linked-list
adhusson Apr 17, 2026
7cec5c9
docs
adhusson Apr 17, 2026
35726bf
Merge branch 'feat/adapter-v2' into doubly-linked-list
adhusson Apr 17, 2026
189cc77
doubly linked list and max active maturities
adhusson Apr 17, 2026
322d29c
fixes
adhusson Apr 17, 2026
20cb109
prevent stale hints without resetting next pointer
adhusson Apr 17, 2026
a58c8f3
Merge pull request #912 from morpho-org/doubly-linked-list
adhusson Apr 19, 2026
d29e0ab
fixes and renames
adhusson Apr 20, 2026
2b761c6
singly linked list
adhusson May 5, 2026
d414c15
Update midnight submodule
adhusson May 5, 2026
30d3424
WIP
adhusson May 7, 2026
a8f4b49
dll again, no hints
adhusson May 7, 2026
fbd5728
fix tests
adhusson May 7, 2026
f1118e9
dynamic casts
adhusson May 7, 2026
12fc817
var renamings
adhusson May 7, 2026
5ad7871
remove current maturity from pending list, log available maturities diff
adhusson May 11, 2026
7b0e8cc
update to new midnight
adhusson May 15, 2026
585e535
midnight to main
adhusson May 15, 2026
8c600db
cleaner accrue
adhusson May 15, 2026
9375528
misc fixes
adhusson May 20, 2026
ff2b8f9
simplify durations management
adhusson May 20, 2026
14edbe8
silence block ts lint
adhusson May 20, 2026
152f34c
fixes
adhusson May 20, 2026
aabff67
inline change
adhusson May 20, 2026
4b01b43
do not log first maturity
adhusson May 20, 2026
f4ea362
renamings
adhusson May 21, 2026
5c017c3
max pending maturities cosntant
adhusson May 21, 2026
2c04dfc
per market growth tracking, var renames
adhusson Jun 1, 2026
672bc4a
harmonize with unsorted
adhusson Jun 1, 2026
63bee3c
adopt unsorted simplification
adhusson Jun 1, 2026
9a1e7cf
block force deallocate offer callback
adhusson Jun 3, 2026
a6f32b2
simplify remove net credit calls
adhusson Jun 5, 2026
67d3e54
cancel root, no redundant >0 check, live toId
adhusson Jun 10, 2026
8e2f0a2
logic and naming
adhusson Jun 10, 2026
9f938f6
tests
adhusson Jun 10, 2026
3cf8c76
harmonize tests
adhusson Jun 10, 2026
f5545b0
restructure accruals
adhusson Jun 14, 2026
6dd4cac
update durations caps
adhusson Jun 14, 2026
a5dd311
update midnight to latest main
adhusson Jul 20, 2026
fa653cc
fix comments remove dead code add sentinel role
adhusson Jul 27, 2026
81199da
check realize loss is possible
adhusson Jul 30, 2026
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
1 change: 1 addition & 0 deletions .github/workflows/certora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/checkout@v6
with:
submodules: recursive
token: ${{ secrets.MORPHO_V2_READ_TOKEN }}

- name: Install Jq
uses: sergeysova/jq-action@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.MORPHO_V2_READ_TOKEN }}

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "lib/morpho-blue"]
path = lib/morpho-blue
url = https://github.com/morpho-org/morpho-blue
[submodule "lib/midnight"]
path = lib/midnight
url = https://github.com/morpho-org/midnight
7 changes: 5 additions & 2 deletions foundry.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"lib/forge-std": {
"rev": "77041d2ce690e692d6e03cc812b57d1ddaa4d505"
"rev": "0844d7e1fc5e60d77b68e469bff60265f236c398"
},
"lib/metamorpho": {
"rev": "00da9ad27da8051bce663eeac02f3b9c0c0aa8d8"
},
"lib/metamorpho-v1.1": {
"rev": "2d160ba9bb945ca3bf12efb182427445dce59c27"
},
"lib/midnight": {
"rev": "799b8176089148bc7d85e2ae2bfbc4eb25ff26a2"
},
"lib/morpho-blue": {
"rev": "cf3f0ce68db99421bcd808d505cfe49d61f4eaa0"
},
Expand All @@ -17,4 +20,4 @@
"lib/openzeppelin-contracts": {
"rev": "b72e3da0ec1f47e4a7911a4c06dc92e78c646607"
}
}
}
23 changes: 18 additions & 5 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,32 @@ via_ir = true
optimizer = true
optimizer_runs = 100000
bytecode_hash = "none"
evm_version = "cancun"
evm_version = "osaka"
dynamic_test_linking = true
ignored_error_codes = ["transient-storage"]

[profile.default.fmt]
wrap_comments = true

[lint]
ignore = [
"lib/**",
"src/imports/MorphoImport.sol",
"src/imports/MidnightImport.sol",
"src/imports/MetaMorphoImport.sol",
"src/imports/MetaMorphoV1_1Import.sol",
"src/imports/AdaptiveCurveIrmImport.sol",
"test/**/*.sol",
]
exclude_lints = [
"unsafe-typecast",
"erc20-unchecked-transfer",
"screaming-snake-case-immutable",
"asm-keccak256"
]
ignore = [
'test/**/*.sol'
"unaliased-plain-import",
"unused-import",
"asm-keccak256",
"mixed-case-function",
"block-timestamp",
]

[profile.no_via_ir]
Expand Down
2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 61 files
+1 −0 .github/CODEOWNERS
+6 −0 .github/dependabot.yml
+98 −101 .github/workflows/ci.yml
+6 −1 .github/workflows/sync.yml
+3 −3 CONTRIBUTING.md
+62 −14 README.md
+12 −0 RELEASE_CHECKLIST.md
+9 −14 foundry.toml
+2 −2 package.json
+2 −12 scripts/vm.py
+8 −2 src/Base.sol
+60 −0 src/Config.sol
+477 −0 src/LibVariable.sol
+2 −2 src/Script.sol
+170 −60 src/StdAssertions.sol
+24 −7 src/StdChains.sol
+13 −17 src/StdCheats.sol
+632 −0 src/StdConfig.sol
+2 −2 src/StdConstants.sol
+2 −2 src/StdError.sol
+22 −4 src/StdInvariant.sol
+4 −12 src/StdJson.sol
+6 −2 src/StdMath.sol
+15 −13 src/StdStorage.sol
+2 −2 src/StdStyle.sol
+10 −18 src/StdToml.sol
+6 −15 src/StdUtils.sol
+2 −4 src/Test.sol
+195 −59 src/Vm.sol
+10 −19 src/console.sol
+2 −2 src/console2.sol
+2 −2 src/interfaces/IERC1155.sol
+2 −2 src/interfaces/IERC165.sol
+2 −2 src/interfaces/IERC20.sol
+8 −8 src/interfaces/IERC4626.sol
+2 −2 src/interfaces/IERC6909.sol
+2 −2 src/interfaces/IERC721.sol
+7 −13 src/interfaces/IERC7540.sol
+8 −8 src/interfaces/IERC7575.sol
+3 −8 src/interfaces/IMulticall3.sol
+691 −1,380 src/safeconsole.sol
+2 −2 test/CommonBase.t.sol
+381 −0 test/Config.t.sol
+452 −0 test/LibVariable.t.sol
+2 −2 test/StdAssertions.t.sol
+25 −25 test/StdChains.t.sol
+19 −20 test/StdCheats.t.sol
+2 −2 test/StdConstants.t.sol
+3 −4 test/StdError.t.sol
+2 −2 test/StdJson.t.sol
+8 −8 test/StdMath.t.sol
+24 −27 test/StdStorage.t.sol
+2 −2 test/StdStyle.t.sol
+2 −2 test/StdToml.t.sol
+13 −13 test/StdUtils.t.sol
+4 −4 test/Vm.t.sol
+2 −4 test/compilation/CompilationScript.sol
+2 −4 test/compilation/CompilationScriptBase.sol
+2 −4 test/compilation/CompilationTest.sol
+2 −4 test/compilation/CompilationTestBase.sol
+81 −0 test/fixtures/config.toml
1 change: 1 addition & 0 deletions lib/midnight
Submodule midnight added at 799b81
Loading