# Morpho Midnight Adapter security review — root merge 1 of 2 This merge covers 25 supplied results for [morpho-org/vault-v2 at bbeda7b27ae80abcf070e0158cb8a31e87bb2286](https://github.com/morpho-org/vault-v2/tree/bbeda7b27ae80abcf070e0158cb8a31e87bb2286). The register and tested IKR lead identify Midnight at `4e2570e51171d09228645b2d5bdf84ef24b1720b`. Artifact names below identify the originating results and preserve the distinction between upstream test observations, static review, and independent reruns. This merge performed document and input checks only. Evidence for the two independently reproduced findings is summarized defensively. The original artifacts contain the Foundry test source, invocation and full logs. ## Findings that survived independent verification Both survived as **Low** in the independent checks. Both have plausible Informational dispositions. This group produced no independently verified Medium or High finding. Scope and novelty judgments below remain provisional where they rely on the disputed register sources. ### 1. Shortfall allowance consumption depends on fill partitioning (ACC-1) **Low — Low impact × Medium likelihood.** A ratified maker sale can encounter the guardrail earlier under ordinary partial fills. The reproduced effect is reduced capacity to execute subsequent shortfall sales, with no loss of depositor assets shown and book values effectively equal within rounding for equal completed sales. Exhaustion fails closed, and an allowance increase is timelocked. Partial fills are an ordinary execution pattern, so the verifier rated likelihood Medium. The README describes this guardrail as an operational aid (line 112) and says allowance is consumed at every below-amortized-value sale (line 117). The issue is the practical difference for an equivalent aggregate sale, with Informational plausible given the documented per-sale behavior. Sources: `b03-accounting`, `b04-accounting`. **Affected code.** `src/adapters/midnight/MidnightAdapter.sol:145–148, 643–686`; `src/adapters/midnight/README.md:112, 117`. `onSell` charges the difference between amortized value and proceeds against the allowance using the market's current rate. The spread then lowers rates across active markets, including the sold market, raising the per-unit book value of its remaining credit. Later fills charge against that revised basis, so the aggregate budget charge can include amounts already absorbed during earlier fills. A curator or allocator acting maliciously is unnecessary on the ratified maker path. The allocator-split run is corroboration of the accounting mechanism. Sources: `b03-accounting.candidates[0]`, `b04-accounting.checks[0]`. **Evidence.** `test/poc/ShortfallAllowanceChunking.t.sol` was independently rerun on the pinned checkout. The 18-decimal output reported **10 passed, 0 failed, 0 skipped** including inherited tests. In the equal-size accounting comparison, the one-fill and split budget charges were **50,069,921,111,211,219,809** and **52,599,017,994,081,945,687** base units, respectively, an increase of **2,529,096,882,870,725,878**. The separately constrained maker test showed the one-fill sale completing and the partitioned sale stopping short. Its spent budget is for an incomplete sale and is therefore not comparable as an equal-volume charge. The tight example had only **1.86%** headroom over the single-fill charge. The focused six-decimal rerun reported **2 passed, 0 failed, 0 skipped**, with equal-size charges **50,069,921** and **52,599,028** base units. Independent variants reported approximately **+2.4%** with a second equal-sized market and **+37.8%** in a half-position comparison. The latter is a test measurement, with no claim that it is typical or an upper bound. Sources: `b04-accounting.checks[0].output`, `pocOutput6Decimals`, `variantOutput18`, `variantOutput6`. **Scope and mitigation.** The verifier distinguishes Cantina 3.1.1 (PDF pp. 5–7, deferred realization of allocator-controlled losses), Cantina 3.6.6 (p. 19, buy-side partition rounding), TrustSec R-7 (pp. 19–20, sale-rate checks) and R-14 (p. 24, rounding documentation). The verifier reports that the old design lacked this allowance. The force-sale lead treated ACC-1 as already known for its work and deliberately excluded it. Its unchanged-value measurements address a separate invariant and are consistent with path-dependent budget usage. The proposed defensive change is to define allowance consumption on a consistent economic basis across fills and test that partial fills cannot charge the same previously absorbed shortfall twice. Preserve fail-closed behavior and any intended rounding conservatism. **UNVERIFIED** as a fix. Sources: `b04-accounting`, `b06-forcesell-shortfall`, `b02-register`. ### 2. Direct whitelist revocation leaves pending approvals valid (FUZZ-1) **Low — Medium impact × Low likelihood in the independent assessment.** The peripheral access control can fail for one account if a current whitelister has already issued an unused, unexpired approval and revokes through the direct setter. The original and independent workers reported a collateralized borrow of **1e18 base units** after direct revocation. No theft or vault loss was shown. `b03-gates` classified the same mechanism as Informational. Both candidate workers consider that disposition plausible because of the preconditions, existing signer controls, and absence of asset loss. Sources: `b03-fuzz`, `b04-fuzz`, `b03-gates`. **Affected code.** `src/adapters/midnight/gates/WhitelistEnterSubGate.sol:52–56, 59–87`; `src/adapters/midnight/gates/IKRCompatibleEnterGate.sol:56, 60`; `src/adapters/midnight/README.md:174–175`. The direct status setter leaves the per-whitelister nonce untouched. Signed approval validity can therefore outlast the direct status change. The verifier ruled out consumed and expired signatures, future nonces, and signatures while the signer lacks the whitelister role. The gates worker also observed that removing and re-granting the role can leave an outstanding approval valid again. README line 175 describes approvals as valid while unexpired and from a current whitelister, which supports an operational interpretation. Sources: `b03-fuzz.candidates[0]`, `b04-fuzz.checks[0]`, `b03-gates.lowInfo`. **Evidence.** `test/poc/WhitelistSigSurvivesRevocation.t.sol` was rerun byte-identically from a fresh clone with Foundry 1.8.5. The initial attempt failed with `vm.getCode: no matching artifact found`; after building the required contract artifacts the rerun reported **2 passed, 0 failed, 0 skipped**. The two gas results, **26,734,823** and **29,008,084**, matched the original worker's report. Six additional refutation tests bounded applicability. Sources: `b04-fuzz.checks[0].output`, `extraTests`, `repairNote`; `b03-fuzz.candidates[0].poc`. **Scope and mitigation.** The verifier cites the scope sections on Cantina PDF p. 4 and TrustSec PDF p. 6 as excluding the gate contracts. TrustSec R-5 (PDF p. 18, printed p. 17) reports the analogous direct-setter problem in the ratifiers, and R-6 concerns ratifier signature handling. The verifier treats the gate instance as distinct because its submission is permissionless; the known pattern and documented validity conditions leave room for a different competition ruling. TrustSec CR-1 (p. 25) concerns trust in gate controllers. The funding and force-sale leads excluded FUZZ-1 as already known within their assignments; that exclusion is separate from prior-audit novelty. Consider binding signed approvals to a per-side/per-account status epoch that advances on direct revocation, or providing explicit signature cancellation and documenting its scope across signers. The verifier confirmed existing counter-signature and signer-removal controls, with short deadlines limiting exposure. **UNVERIFIED** as a fix. Sources: `b03-fuzz`, `b04-fuzz`, `b03-gates`, `b05-funding`, `b06-forcesell-shortfall`, `b02-register`. ## Ranked Low and Informational observations The two Low candidates are ranked above. Below, order reflects practical review relevance. “Observed” means the originating result reports a test of the stated behavior. **UNVERIFIED** marks source-only claims or observations without a reported independent rerun where that distinction matters. Documented behavior, trusted configuration and refuted hypotheses are identified separately from candidate findings. 1. **Force-sale activation and price-floor configuration are independent — Informational, observed; independent rerun UNVERIFIED.** The floor defaults to zero. A previously ratified sale can become eligible when timelocked force-sale status takes effect, so review pending offers and price floors together. Trusted configuration and related to Cantina 3.2.4 per the register. Force-sellable markets can also absorb shortfall from an ordinary sale, increasing their book value when the rate is lowered. The worker measured **about 42.84 tokens** of the spread assigned to one such market. `MidnightAdapter.sol:273–277, 334–338, 638–686`. Sources: `b06-forcesell-shortfall.lowInfo`, `b02-register`. 2. **Factory registration establishes deployment provenance — Informational, observed; downstream security impact UNVERIFIED.** The permissionless adapter factory accepts an arbitrary parent reporting an asset, and the wrapper recognizes adapters from registered factories. Gates and factory workers observed acceptance of custom-parent deployments without demonstrating durable admission, misdirected credit, or cross-account loss. One probe reverted with **0x96e13529**, which those results did not decode. The dedicated rogue-adapter lead could not run. Clarify the parent-vault trust assumption in deployment guidance. `MidnightAdapterFactory.sol:24–41`; `MidnightAdapter.sol:152–171, 427–477`; `gates/IKRCompatibleEnterGate.sol:40–53`. Sources: `b03-factories`, `b03-gates`, `b05-rogue-adapter`. 3. **Exposure caps lag realized credit losses — Informational, observed; independent rerun UNVERIFIED.** NAV uses live credit immediately after Midnight records bad debt. Storage, duration utilization and vault allocation retain the old face exposure until synchronization. One loss test recorded `realAssets` falling from **100000000000030600145311** to **50000000000015300072655** while allocation stayed **100593430826474621736007** until it synchronized to **50296715413237310868003** (base units). Zero-asset withdrawal synchronizes without a second NAV loss, and IKR testing also observed synchronization in the zero-asset path. This is conservative cap use and partially overlaps Cantina 3.2.5. The source-only concern about exiting before Midnight recognizes loss remains **UNVERIFIED** and was characterized as generic loss timing limited by available vault liquidity. `MidnightAdapter.sol:25–26, 427–477, 716–738, 817–855`. Sources: `b03-loss-bad-debt`, `b03-invariants`, `b05-ikr-redeem`, `b03-vault-roles-caps`. 4. **Exact whole-position IKR is sensitive to live credit — Informational, observed; independent rerun UNVERIFIED.** Continuous fee accrual or an intervening credit reduction can leave a request above the live reduce-only position. The worker quantified a dust-scale example and found no asset loss. A one-unit redemption can also move gross credit while leaving seller net credit unchanged due to pending-fee rounding. `MidnightAdapter.sol:436–477`; `lib/midnight/src/Midnight.sol:370–383, 794–816`. Sources: `b05-ikr-redeem.lowInfo`. 5. **Ratifier disabling preserves existing roots — Informational, static; UNVERIFIED.** Re-enabling preserves underlying authorizations, including old roots from removed allocators that are still ratified. Persistence after allocator removal is documented and reactivation requires allocator action. Direct ratifier status changes that leave signed approvals valid are covered by TrustSec R-5/R-6. Stale/malleable signatures repeating the current status can produce duplicate events (observed, no state change); event consumers should key events on maker, root and nonce. The EIP-712 domain omits name and version while binding chain and verifying contract. `MidnightAdapter.sol:348–352, 503–505`; price ratifier lines 33–91, rate ratifier lines 35–93, whitelist interface lines 10–11 and implementation lines 92–94. Sources: `b03-ratifiers`, `b03-fuzz`, `b02-register`. 6. **Callback safety depends on ordering and market-local locks — Informational, observed and static.** Forced callback authorization uses a transient flag without binding every trade field. Review of the pinned path and negative probes found no usable untrusted call before the flag is cleared. Same-market nested operations in a locked sale reverted where appropriate; a nested IKR in another market remained consistent. A lossy market can block in-callback NAV reads as intended. The zero-unit callback variant is **UNVERIFIED** as a separate scenario and the reported lock lifetime is transaction-local. Negative probes found that a third party could not use the adapter as payer despite its standing Midnight allowance. `MidnightAdapter.sol:114–117, 427–528, 613, 617–700, 837–855`; `lib/midnight/src/Midnight.sol:320–468`. Sources: `b03-reentrancy`, `b03-loss-bad-debt`, `b06-forcesell-shortfall`. 7. **Shared cap IDs and adapter authority require deliberate configuration — Informational, UNVERIFIED as a standalone lead.** Family and collateral caps can aggregate across adapters; cross-adapter collateral exposure may use different units. Duration ID utilization is computed by the adapter at buy time and lives outside recorded Vault V2 allocation. Callback funding depends on the adapter's delegated vault role and committed funding data. Removing role authorization can prevent adapter-initiated sales or force removal; the roles worker found no timelock bypass in source review. Funding and invariant results provide narrower positive checks on cap consistency and normal role use. `MidnightAdapter.sol` functions `ids`, `allocate`, `deallocate`, `forceRemove`, `onBuy`, `durationAllocations` and timelock functions; `VaultV2.sol:567–586`; `MorphoMarketV1AdapterV2.sol` function `ids`. Sources: `b03-vault-roles-caps`, `b07-vault-roles-caps`, `b05-funding`, `b03-invariants`. 8. **Buy funding has an ordering edge case and can recognize interest early — Informational, observed; independent rerun UNVERIFIED.** First-position self-funding reverted with `ZeroAllocation` because the funding withdrawal runs before allocation. Funding from an existing position or another same-vault Midnight adapter worked in the funding worker's tests; that directly corroborates the reentrancy review's reading and supersedes the earlier TrustSec R-13 assumption for this commit. Withdrawing early-repaid units at par recognizes their discount immediately, as in ordinary deallocation, subject to vault accrual limits. Overlap with Cantina 3.6.5. `MidnightAdapter.sol:478–482, 579–611, 716–738`; `VaultV2.sol:576–581, 633–634`. Sources: `b05-funding`, `b03-reentrancy`, `b03-accounting`. 9. **Duration configuration and maturity boundaries — Informational, observed; independent rerun UNVERIFIED.** The constructor accepts duration thresholds up to **4,294,967,295 seconds**, whereas Midnight caps initial time to maturity at **3,153,600,000 seconds**. Longer thresholds consume a slot without tracking exposure. Duration buckets are inclusive and age out at the next second after the threshold; this is the documented threshold semantics. Raw over-wide packing contaminates the adjacent field and out-of-range indexed reads yield zero; constructor bounds protect supported adapter inputs. Matured unrepaid claims remain at par, contribute no unearned interest to spreads, and require force-sale status for below-par sales. Stored nonzero rates on matured markets have no NAV effect. `MidnightAdapter.sol:64–71, 161–169, 586–603, 641–666, 769–778, 817–863`; `libraries/PackedDurationsLib.sol:6–30`; `lib/midnight/src/Midnight.sol:755`. Sources: `b03-maturity`, `b03-fuzz`, `b06-forcesell-shortfall`. 10. **Documented rounding and dust — Informational, observed; independent rerun UNVERIFIED.** Rate flooring may recognize small amounts early on buy or spread. Six-decimal tests measured a one-off **20,027 base units** at **10^15 base units** of credit and **365 days**, and **994 base units** across **1,000** additional one-unit fills in the large-position case. Small and large cases differed: under the stated tick in another test, **1,000** 200-unit fills paid **198,000** versus **198,820** for one fill of equal credit, with the discrepancy borne by the taker. NAV never exceeded net credit in those checks. The first zero-asset dust fill with no position reverts with **panic 0x12**, as documented. Accounting measured **42 wei per 100k tokens** in a buy partition comparison and no zero-unit drift. The force-sale tests measured **102,771,377,917 wei** of early book value in a spread and kept reported excess under **10^12 wei** over **256** fuzz runs. `MidnightAdapter.sol:19–24, 145–146, 540–547, 673–686, 859`. Sources: `b07-usdc-precision.measurements`, `b03-accounting`, `b03-fuzz`, `b03-invariants`, `b06-forcesell-shortfall.lowInfo`. 11. **Rate-ratifier extreme values may panic — Informational, observed; independent rerun UNVERIFIED.** An allocator-selected very large rate overflows checked multiplication before maturity, while the maturity case eliminates the time multiplier. The worker reproduced **panic 0x11** at **31,536,000 seconds** remaining and acceptance at par at maturity. Ordinary boundary checks were exercised in the component fuzz suite. Distinguish this leaf arithmetic from the adapter's documented `uint64` rate cast and TrustSec R-2. `ratifiers/MidnightAdapterRateRatifierV1.sol:105–108`; `MidnightAdapter.sol:509`. Sources: `b03-ratifiers`, `b03-fuzz`, `b02-register`. 12. **Gate and deployment configuration affordances — Informational, static; UNVERIFIED.** The wrapper accepts an arbitrary subgate, follows the subgate's credit-side role setter for factory registration and exposes permissionless transient-admission clearing. Gates review found no intervening untrusted call to clear admission during the ordinary IKR path. Factory review noted empty durations and invalid gate, role-setter or subgate parameters as potential operational misconfigurations. The three CREATE2 factories bound the caller and salt, and the deployment address also bound constructor arguments. Tests confirmed address prediction and duplicate rejection. One build profile measured factory runtime **23,682 bytes** (margin **894 bytes** to **24,576**) and adapter runtime **21,619 bytes**. These sizes are profile-specific. `gates/IKRCompatibleEnterGate.sol:20–53`; `gates/WhitelistEnterSubGate.sol:34–40`; three factory create functions; `MidnightAdapter.sol:152–171`. Sources: `b03-gates`, `b03-factories`, `b03-fuzz`. ### Explicitly refuted or superseded - **IKR settlement-fee residue.** Accounting flagged a possible rounding mismatch as UNVERIFIED. Real-stack IKR tests at six and 18 decimals found exact fee agreement and zero adapter dust. At tick zero the seller-side price component vanishes, so the fee expression matches the adapter's round-up. Preserve that assumption in any future IKR pricing change. `MidnightAdapter.sol:395–400, 436–456`; `lib/midnight/src/Midnight.sol:346–352, 405`. Sources: `b03-accounting.lowInfo`, `b05-ikr-redeem`. - **Group-zero cancellation permanently blocks IKR.** The ratifier worker's end-to-end test disproved it and the IKR lead confirmed it: Midnight's consumed-amount check adds zero seller assets for this IKR offer, even when group consumption is at its maximum. This agrees with the zero-asset caveat in TrustSec R-11. `MidnightAdapter.sol:342–346, 436–452`; `lib/midnight/src/Midnight.sol:717–722`. Sources: `b03-ratifiers`, `b05-ikr-redeem`, `b02-register`. - **Zero-unit buy reprices the current position.** The accounting worker found no net-rate decrease or book-value increase from zero-unit fills at this commit. Carried value now rounds down; the prior Cantina 3.2.8 concerned earlier rounding behavior. This observation is distinct from one-unit buys with zero assets. `MidnightAdapter.sol:544–547`. Sources: `b03-accounting`, `b07-usdc-precision`, `b02-register`. ## Baseline build and coverage The baseline build worker reported `forge build` succeeding in **450 seconds** using Foundry **1.8.3**, followed by these completed runs. The matched runs overlap the full suite. The baseline needed additional compiler downloads on its initial build. Sources: `b01-build.buildCommand`, `buildSeconds`, `forgeVersion`, `runs`, `notes`. | Baseline command | Passed | Failed | Skipped | Reported wall seconds | | --- | ---: | ---: | ---: | ---: | | `forge test --match-path 'test/MidnightAdapter*.sol'` | 390 | 0 | 0 | 231 | | `forge test --match-path test/integration/MidnightAdapterIntegrationTest.sol` | 8 | 0 | 0 | 2 | | `forge test --match-path test/PackedDurationsLibTest.sol` | 2 | 0 | 0 | 2 | | `forge test` | 850 | 0 | 0 | 296 | | Angle and source | Coverage and limits | | --- | --- | | Accounting — `b03-accounting`, `b04-accounting` | Integration **8/8** in the review. Checked fee-adjusted net credit, carried value, trade-rate bounds, shortfall spread, pending-fee cancellation, allocation/accrual ordering, and live credit after loss. The worker used a targeted build after a full-build timeout. Independent pinned-clone ACC-1 rerun used Forge **1.7.1** and exact-version solc-js wrappers for unavailable native compilers. | | Loss — `b03-loss-bad-debt`, `b03-invariants`, `b05-ikr-redeem` | Directed real-stack write-down and sync, source review of full loss and removal, tested forced redemption with pending fees and unsynchronized loss. Full-loss IKR and force-removed IKR were source-only. Prior PDFs could not be extracted by the loss worker; the full build was killed. | | Maturity — `b03-maturity` | `test/poc/MaturityEdgeCases.t.sol`, **9 passed**. Constructor ordering, zero, max and oversize inputs, eight-slot packing, maturity boundary and removal, threshold caps, par and matured-market shortfall behavior. Pack round-trip reported **1,024** runs with two seeds. No broad real-stack campaign across eight live duration thresholds or six-decimal maturity campaign in this worker. | | Gates — `b03-gates`, `b03-fuzz`, `b04-fuzz` | Gate-filtered existing suites **526 passed across 14 suites**; focused gates file **3/3**. Reviewed admission lifetime and caller/account binding, first entry, cross-side/deployment/chain signatures and role separation. Nested vaults and custom shared-gate interactions received limited coverage. The prior Blackthorn gates audit was unavailable to the gates worker. | | Ratifiers — `b03-ratifiers`, `b03-fuzz` | Root status, role and delegated/signed authorization, offer-field binding, nonce/deadline behavior, settlement and rate boundaries. Component fuzz used single-leaf roots. Deep-proof gas and malformed/multilevel proof cases remain incomplete; the dedicated forgery lead did not execute. | | Roles and caps — `b03-vault-roles-caps`, `b07-vault-roles-caps` | First worker reviewed pinned web excerpts only after proxy clone failure, and could not extract either audit PDF. The second worker produced no executable review. Invariants and funding tests corroborate specific allocation checks. A dedicated end-to-end campaign across shared IDs, role removal, timelocks, cap boundaries and force removal remains incomplete. | | Callbacks — `b03-reentrancy`, `b06-forcesell-shortfall` | Three directed real-stack reentrancy probes plus a sale with nested IKR on a different market. Checked callback authentication, payer/receiver restrictions, committed funding data, lock scope and transfer ordering. Arbitrary nested sequences, custom gates, hook tokens and nested-vault interactions were outside executable coverage. | | Factories — `b03-factories`, `b03-fuzz` | CREATE2 derivation, predicted addresses, duplicate behavior, registration trust and size checks. Factory worker's prior-audit comparison remained incomplete. No cross-chain deployment campaign or successful rogue-adapter impact demonstration. | | Stateful invariants — `b03-invariants` | Five invariants held across **143,400** handler calls: **400 × 150** without fees and **300 × 150** plus **256 × 150** with fees. Three markets, two collateral families, two duration caps and 12 actions. Calls include attempted operations, with reverts caught by the handler; the separate **300-step** smoke test recorded successes in buy, sell, repay, withdraw, deposit, redeem, IKR, bad debt and touch paths. Fairness used one modeled passive holder and one attacker. No gate, rate-ratifier offer, force-remove or 250-market campaign; no multi-block fairness or nested-vault model. | | Component fuzz — `b03-fuzz` | **12 properties × 10,000 runs** passed after harness corrections. Real Midnight, gates, ratifiers and factories where applicable; a mock parent in factory/ratifier cases and mirrored pure formulas for buy/spread arithmetic. The worker's separate reduced integration run was **7/8** with an ambiguous-artifact error; suspected extra scratch compilation profile was UNVERIFIED. Baseline integration **8/8** is separately recorded. | | IKR — `b05-ikr-redeem` | **10 passed** in each decimal configuration, including a **256-run** fuzz test in the reported coverage. Checked payment and fee agreement, allocation and NAV, full and dust redemptions, authorization, group consumption, post-maturity and loss sync. Tests used the existing wrapper regression for gated IKR coverage; no dedicated restrictive-wrapper extension, full-loss IKR, penalty-withdraw gate, or nested callback campaign. | | Funding — `b05-funding` | `test/poc/FundingOnBuyPoc.t.sol` log **15 passed**. Idle, same-market, same-adapter other market, and second Midnight adapter funding exercised. Recorded NAV and share price stable across successful buys in the tested setup, funding allocations and token balances reconcile. Non-Midnight liquidity adapters, nonzero loss/fee funding cases and nested first-accrual sequences were untested. The worker reports inherited-test counts inconsistently with the 8-test baseline; use the logged aggregate for its custom run. | | Force sales and spread — `b06-forcesell-shortfall` | Five-market real-stack fixtures included matured, zero-interest and impaired markets. **256** fuzzed sales checked value preservation and credit bounds. Fee-inclusive force-price floor and dust boundary held. The sample multi-market spread charged **74.875041849148821231 tokens** and increased vault value by about **1.03 × 10^11 wei** within rounding. No continuous-fee spread campaign or 250-market gas measurement; allocator taker-sale variants were source-only. | | Six-decimal precision — `b07-usdc-precision` | Real stack with six-decimal token mock, buy-side measurements across durations from **1 second** to **365 days**, one tested tick, and partitioned and dust scenarios. The worker reported monotone maturity accrual and no taker profit from splitting. Maker/taker sell precision remained unmeasured in this lead, while IKR and ACC-1 each have separate six-decimal evidence. The precision harness reported **9 passed and 2 failed** in its initial group (documented first-fill division panic and an inaccessible tick), and **4 passed** in a separate group. Full build was memory-killed on this worker. | ### Blocked follow-up leads - **Maker offers — partial static review, UNVERIFIED.** Reviewed fill modes, callback order, offer binding and fill-time eligibility. Compiler installation failed for solc 0.8.34/0.8.37 with a read-only filesystem, leaving the lead without an executable proof or independent rerun. Source: `b05-maker-offers`. - **Rogue adapter — blocked.** No dedicated checkout/test due to disk exhaustion. Custom-parent admission was partly covered by gates and factories; nested, cross-adapter and admission-lifetime impact remained unproven. Sources: `b05-rogue-adapter`, `b03-gates`, `b03-factories`. - **Midnight assumptions — blocked.** Pinned checkout succeeded, but compiler installation failed for solc 0.8.34/0.8.37 on a read-only filesystem. Fee reconciliation, loss and locks have narrower executable evidence elsewhere. A combined campaign across fee changes, permissionless updates, market identity, liquidity and all credit paths is absent. Sources: `b06-midnight-assumptions`, `b05-ikr-redeem`, `b03-reentrancy`, `b03-loss-bad-debt`. - **Liveness — blocked.** Disk exhaustion prevented checkout. MAX_MARKETS gas, malformed or reverting view dependencies, and comprehensive liveness under removal, liquidation and third-party timing remain open coverage gaps. Source: `b06-liveness`. - **Ratifier forgery — blocked.** Shallow fetch confirmed the pinned commit, but disk exhaustion prevented checkout and tests. Multi-level proof edge cases, malformed encoded data, dynamic field binding and cross-ratifier isolation lack the dedicated test campaign. Source: `b06-ratifier-forgery`. - **Gates configuration — blocked.** Disk exhaustion prevented checkout. Gate and component results cover subsets of the role, signature and factory behavior; the dedicated configuration lead is UNVERIFIED. Sources: `b07-gates-config`, `b03-gates`, `b03-fuzz`, `b04-fuzz`. - **Vault roles/caps follow-up — blocked.** Disk exhaustion prevented checkout. Related integration coverage and the earlier static review are described above. Sources: `b07-vault-roles-caps`, `b03-vault-roles-caps`, `b03-invariants`, `b05-funding`. ## Prior audits and source reliability The register reports reading the adapter README/NatSpec, Vault V2 and Midnight documentation, and the linked **11-page May 2026 whitepaper** (external and unpinned), plus both October drafts. It records **47** entries, **19 Cantina** and **28 TrustSec**, and **106** team-document statements classified as accepted risks, documented limits, token assumptions or trusted roles. Those categories have different exclusion implications. Both drafts reviewed `6476e9d91245b0934377ef09edd201f6bf0e46ec`. The register uses one-based PDF page indices, with printed page numbers one lower. Source: `b02-register.referenceNotes`, `counts`, `priorFindings`, `acceptedRisks`. [Cantina draft](https://github.com/morpho-org/vault-v2/blob/bbeda7b27ae80abcf070e0158cb8a31e87bb2286/audits/2026-10-12-midnight-adapter-cantina-draft.pdf) · [TrustSec draft](https://github.com/morpho-org/vault-v2/blob/bbeda7b27ae80abcf070e0158cb8a31e87bb2286/audits/2026-10-12-midnight-adapter-trustsec-draft.pdf) The assignment flags **three sources** under `known/register` as unreadable on recheck or failing quoted-text validation. The supplied register's `unreadable` list is empty and it does not identify the three failed citations or quote checks. Their identities and exact passages could not be determined from the supplied inputs. Treat register-only assertions as leads for cross-checking and prior-audit exclusions as provisional where they rely on flagged material. ACC-1 and FUZZ-1 have independent execution evidence, and their specific draft comparisons also appear in the independent verification reports. This supports their technical dispositions without resolving the flagged provenance or conclusively deciding competition novelty. The whitepaper coverage is an upstream report only. Sources: assignment source-recheck notice, `b02-register`, `b04-accounting.checks[0].priorAuditRef`, `b04-fuzz.checks[0].priorAuditRef`. The register's “changed” status includes partial changes, so it cannot certify resolution. Particularly relevant exclusions and distinctions are the earlier loss-blending design (Cantina 3.1.1), stale allocation checks and zero-unit rounding (Cantina 3.2.5 and 3.2.8), pending force-sale configuration (Cantina 3.2.4), unverified parent vaults (Cantina 3.6.3 item 7), early-repayment withdrawals and buy rounding (Cantina 3.6.5 and 3.6.6), earlier IKR front-running/accrual (TrustSec L-1/R-3), rate casts and bounds (R-2/R-7), signature cancellation and handling (R-5/R-6), zero-asset cancellation semantics (R-11), callback/funding assumptions (R-13), rounding documentation (R-14), and controller trust (CR-1). The current pinned code and tested impact determine whether any related observation is carried above. Sources: `b02-register.priorFindings`, `b04-accounting`, `b04-fuzz`, `b03-gates`, `b03-reentrancy`, `b05-ikr-redeem`. ## Input reconciliation All **25** named inputs were present and parsed. Dispositions in document order by batch: - `b01-build` supplies baseline; `b02-register` supplies provisional scope/duplicate context with flagged provenance. - `b03-accounting` supplies ACC-1, buy rounding and the refuted IKR fee hypothesis; `b03-loss-bad-debt` supplies observed loss/sync and source-only liveness/timing notes; `b03-gates` supplies the Informational FUZZ-1 assessment and gate findings context. - `b03-ratifiers` supplies arithmetic and signature observations and the refutation of group-zero blocking; `b03-vault-roles-caps` supplies partial static review; `b03-maturity` supplies duration and maturity tests. - `b03-reentrancy` supplies negative probes and source-only boundary assumptions; `b03-factories` supplies deployment results and limited rogue-parent evidence; `b03-invariants` supplies stateful coverage; `b03-fuzz` supplies component coverage and FUZZ-1. - `b04-accounting` and `b04-fuzz` supply the independent surviving dispositions. - `b05-ikr-redeem` and `b05-funding` supply real-stack directed coverage; `b05-rogue-adapter` is blocked; `b05-maker-offers` is blocked after static review. - `b06-midnight-assumptions`, `b06-liveness`, and `b06-ratifier-forgery` are blocked; `b06-forcesell-shortfall` supplies scoped evidence and Informational items while explicitly excluding the two already-known candidates from its own lead. - `b07-vault-roles-caps` and `b07-gates-config` are blocked; `b07-usdc-precision` supplies six-decimal measurements and Informational items.