{"commit":"bbeda7b27ae80abcf070e0158cb8a31e87bb2286","sources":[{"path":"audits/2026-07-08-gates-blackthorn.pdf","read":"full","pages":"1-6 (6/6)","covers":"Read all six pages, including scope, the only finding and its resolution. Audited Vault V2 WhitelistSendAssetsGate/WhitelistReceiveSharesGate, not Midnight gates. Final commit in report: 549b113106e505b83952c7b296622534338d5f92."},{"path":"audits/2025-05-19-spearbit.pdf","read":"partial","pages":"68 total; contents 2-3; relevant findings/discussion 6-8,12,16,21-22,26,31-35,38-45,49-50,56-66","covers":"Screened all finding titles; read adapter/accounting/cap, force-deallocation, donation and interface portions. VIC-only, fee formula and vault-only recommendations are not re-registered. Some mathematical PDF glyphs extract poorly; prose is readable."},{"path":"audits/2025-07-15-zellic.pdf","read":"partial","pages":"37 total; contents 2-3; findings 12-21; discussion 22-25; adapter threat model 26-31","covers":"Screened five findings and discussion. Relevant adapter-pattern analogues: penalty rounding, signature malleability, approval semantics. First-deposit/VIC/fee findings target parent vault rather than scoped Midnight contracts."},{"path":"audits/2025-07-15-competition.pdf","read":"full","pages":"1-8 (8/8)","covers":"Read full report. Only three Medium findings are published: expired ManualVic deadline, stale-cap-based realizeLoss calculation, and SingleMorphoVaultV1Vic double-counted losses. No gates, factories, whitelist or shortfallAllowance finding. Relevant loss-accounting analogue registered below."},{"path":"audits/2025-08-11-spearbit.pdf","read":"partial","pages":"16 total; contents 2; findings 5-16","covers":"Screened every finding. Substantively repeated in 2025-09-15-spearbit (pages there are one higher for corresponding sections). Register keeps separate source IDs for relevant common mechanisms, not new vulnerabilities. Detailed rows are deduplicated into September source: 5.1.2 (pp5-6), 5.1.3/5.1.4 (pp6-8), 5.1.6 (pp8-13), 5.1.7 (p13), 5.2.2 (p14), 5.2.4 (p15), 5.2.5/5.2.6 (pp15-16). Same mechanisms/current-code assessments as September rows; no independent new mechanism."},{"path":"audits/2025-09-15-spearbit.pdf","read":"partial","pages":"17 total; contents 2; findings 6-17","covers":"Read relevant complete adapter/cap sections 6-9,14-17 and firstTotalAssets discussion 9-14. Same finding set as August fix-review; this is a second publication of those mechanisms."},{"path":"audits/2025-09-15-blackthorn.pdf","read":"partial","pages":"62 total; finding index/scope 2-5; findings 6-61 (adapter/gate/permit sections emphasized)","covers":"Screened every finding. Read H-1, M-1..M-5 and Low gate, permit, cap, timelock and adapter sections. Pure vault fee arithmetic and sharePrice wording are contextual only. No WhitelistEnterSubGate-specific revocation finding."},{"path":"audits/2025-12-04-fee-wrapper-spearbit.pdf","read":"full","pages":"1-6 (6/6)","covers":"Read full report. Two acknowledged informational notes concern parent/child Vault V2 composition: illiquid child exits require child forceDeallocate; allocators can move freed funds back. No Midnight gate/signature or sale-budget finding; composition analogue registered."},{"path":"audits/2025-12-04-market-v1-adapter-v2-blackthorn.pdf","read":"partial","pages":"22 total; scope/summary 1-4; complete finding bodies 5-21","covers":"Read all eight findings and team responses, focusing on write-off timelocks, front-running and list/cap synchronization. Last page is disclaimer. Original Blue-share dust attack and faulty-oracle growth are distinguished from fixed-face Midnight credit."},{"path":"audits/2025-12-04-market-v1-adapter-v2-certora.pdf","read":"full","pages":"1-16 (16/16)","covers":"Read full report, including all six findings, sub-suggestions and responses. Text was whitespace-normalized to read unusually fragmented PDF extraction. Source IDs/severities are the report own labels, not new severity assessments."},{"path":"audits/2025-12-04-market-v1-adapter-v2-spearbit.pdf","read":"full","pages":"1-5 (5/5)","covers":"Read full PDF. Despite filename it is branded Cantina Managed, not Spearbit. Two informational findings: list consistency after burn and inability to recover burned positions. Preserve source filename for traceability."},{"path":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","read":"partial","pages":"12 total; full finding bodies 5-12; scope/summary 2-4","covers":"Read all eleven finding bodies and team responses. Generic ERC4626 source warnings only apply by analogy: Midnight is not an ERC4626 share source. Include exact approval, balance-delta, unsafe-cast, reward, callback, liveness and donation distinctions."},{"path":"audits/2026-08-13-blue-public-allocator-blackthorn.pdf","read":"partial","pages":"44 total; scope/index 1-4; all issue bodies 5-43 screened/read for applicability","covers":"Screened all twelve findings. Public Blue allocation, native-penalty and oracle-manipulation exploits are not in Midnight. Relevant general mechanisms: aggregate caps, zero caps, permissionless market listing, trusted roles and public route timing; registered with that distinction."},{"path":"audits/2026-08-13-blue-public-allocator-spearbit.pdf","read":"partial","pages":"26 total; contents 2; findings 5-26 (economic long-form comparison 14-23 screened)","covers":"Screened all seventeen findings. Many duplicate Blackthorn public-allocation mechanisms; only additional factory/configuration/replay and generic timing analogues are registered below. Blue-only utilisation/native-currency findings do not apply to fixed-rate credit trading."},{"path":"audits/2025-09-15-chainsecurity.pdf","read":"partial","pages":"30 total; scope/trust model 5-11; all findings 14-26; adapter notes 27-30","covers":"Screened all findings and read adapter-relevant bodies and notes. Parent VIC/fee-only issues excluded. IDs are report section plus printed CS ID where given. Notes are identified as notes, not vulnerabilities."},{"path":"src/adapters/midnight/README.md","read":"full","pages":null,"covers":"Read full specifically to compare A/B; no general README findings re-registered."},{"path":"src/adapters/midnight/MidnightAdapter.sol","read":"full","pages":null,"covers":"Read full current adapter code/NatSpec; onSell shortfall basis, rate redistribution and callback/cap flow checked statically. No build/PoC requested for this bounded register task."},{"path":"src/adapters/midnight/gates/WhitelistEnterSubGate.sol","read":"full","pages":null,"covers":"Read full whitelist implementation; direct setter and equal/stale-nonce paths checked statically for B."},{"path":"src/adapters/midnight/gates/IKRCompatibleEnterGate.sol","read":"full","pages":null,"covers":"Read full gate, trust assumptions, ordinary checks and temporary admission."},{"path":"src/adapters/midnight/MidnightAdapterFactory.sol","read":"full","pages":null,"covers":"Read full CREATE2 factory and membership mapping."},{"path":"src/adapters/midnight/gates/IKRCompatibleEnterGateFactory.sol","read":"full","pages":null,"covers":"Read full CREATE2 salt/membership logic."},{"path":"src/adapters/midnight/gates/WhitelistEnterSubGateFactory.sol","read":"full","pages":null,"covers":"Read full constructor forwarding and CREATE2 salt/membership."},{"path":"src/adapters/midnight/interfaces/IMidnightAdapter.sol","read":"partial","pages":null,"covers":"Relevant NatSpec on rate/forceSellable behavior and public interface."},{"path":"src/adapters/midnight/gates/interfaces/IWhitelistEnterSubGate.sol","read":"full","pages":null,"covers":"Read full signed type hash, nonce getter and public signatures."},{"path":"src/adapters/midnight/ratifiers/MidnightAdapterPriceRatifierV1.sol","read":"partial","pages":null,"covers":"Read role/authorization and persistent-root NatSpec; not a new prior-audit register."},{"path":"src/adapters/midnight/ratifiers/MidnightAdapterRateRatifierV1.sol","read":"partial","pages":null,"covers":"Read role/authorization and persistent-root NatSpec; not a new prior-audit register."},{"path":"src/VaultV2.sol","read":"partial","pages":null,"covers":"Read current allocate/deallocate/accrueInterest/forceDeallocate code to distinguish historical adapter assumptions."},{"path":"src/libraries/SafeERC20Lib.sol","read":"partial","pages":null,"covers":"Read forceApproveMax reset-to-zero logic to distinguish historical approval issue."},{"url":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","read":"full","pages":null,"covers":"Entire public Instructions text retrieved without login, including Scope, Mandatory POC Rule and Out of Scope. No private submissions/clarifications accessed."},{"url":"https://docs.cantina.security/standards/severity/competition","read":"full","pages":null,"covers":"Public severity matrix, mandatory PoC conditions, admin/user-error restrictions, protocol-behavior reference and tips."}],"findings":[{"source":"audits/2026-07-08-gates-blackthorn.pdf","id":"L-1","title":"Documentation inconsistent","severity":"Low/Info","page":4,"contract":"WhitelistSendAssetsGate / VaultV2; analogous Midnight IKRCompatibleEnterGate","summary":"Report: gates-must-never-revert documentation contradicted canSendAssets calling intermediary.initiator(), which may revert; resolved by documentation (PR 933). Midnight has no intermediary/initiator path, but ordinary gate checks call an arbitrary subGate without try/catch and can propagate its revert. Related liveness/documentation precedent only; it says nothing about signature nonce revocation or sale shortfall partitioning.","codeNow":"changed","codeRef":"src/adapters/midnight/gates/IKRCompatibleEnterGate.sol:27-29"},{"source":"audits/2025-05-19-spearbit.pdf","id":"5.1.1","title":"Side effects of underlying directly donated to the VaultV2 or adapters positions","severity":"High","page":"6-7","contract":"VaultV2 and adapters","summary":"Historical donation/checkpoint accounting could distort cap allocations or overstate losses; report describes PR 347 ignoring adapter donations, with remaining vault-donation behaviors acknowledged. Midnight realAssets values tracked market credit, not the adapter ERC20 balance; skim can collect donated tokens. The old VIC/loss-subtraction exploit is not the current mechanism.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:385-396"},{"source":"audits/2025-05-19-spearbit.pdf","id":"5.2.5; 5.2.6","title":"Users escape losses; losses across all adapters not accounted before share conversions","severity":"Medium","page":"16-26","contract":"VaultV2 and adapter loss reporting","summary":"Historical loss reporting was selective, allowing exit via healthy routes before a loss was recognized. Initial remedy incentivized realizeLoss. Current Midnight realAssets reads live credit when lossFactor is nonzero; current vault sums realAssets before the first share conversion of a transaction. Predicting future bad debt and transaction-level caching remain related accepted risks, not a duplicate of A or B.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:837-860"},{"source":"audits/2025-05-19-spearbit.pdf","id":"5.3.4","title":"MetaMorphoAdapter and MorphoBlueAdapter do not check asset comparability with the parent vault","severity":"Low","page":"31-35","contract":"Adapter asset compatibility","summary":"Fixed historically with loan-asset checks (PRs 392/445). Midnight constructor obtains the parent asset; take, isRatified, forced deallocation and withdrawToVault reject loan-token mismatches.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:152-156"},{"source":"audits/2025-05-19-spearbit.pdf","id":"5.3.8","title":"Arbitrary data can be passed to forceDeallocate","severity":"Low","page":40,"contract":"IAdapter / forceDeallocate","summary":"Report says fixes PR 347/484 were partial: permissionless forceDeallocate data cannot be treated as trusted allocator input. This input surface remains, but Midnight decodes (Market,taker), authenticates taker/sender, requires shares, correct asset, unlocked/nonremoved market, and performs a funded face-value sale. Generic arbitrary-data warning is already known; a new bypass would need separate proof.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:421-439"},{"source":"audits/2025-05-19-spearbit.pdf","id":"5.3.9","title":"Incorrect allocation calculation for ids corresponding to coarser set of routes","severity":"Low","page":"40-43","contract":"VaultV2 / adapter ids and change","summary":"Old zeroFloorSub applied independently to each coarse ID and could erase too much of a shared allocation. Fixed by using one signed position delta for all IDs (PR 347). Midnight stores per-market oldNetCredit and returns newNetCredit-oldNetCredit for all family/collateral/adapter IDs.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:605-610"},{"source":"audits/2025-05-19-spearbit.pdf","id":"5.3.12","title":"forceDeallocate allows the caller to deallocate more than it owns","severity":"Low","page":"45-49","contract":"VaultV2 / MidnightAdapter.deallocate","summary":"Acknowledged: the amount forced out is not limited to the caller full share-equivalent assets. Midnight expressly checks only taker balance > 0, then allows the funded sale amount; NatSpec says at least one share and as much as penalty allows. Re-reporting missing proportional ownership bound is known/expected behavior.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:48-51"},{"source":"audits/2025-07-15-zellic.pdf","id":"3.3","title":"Signature malleability in permit function","severity":"Informational","page":"14-15","contract":"VaultV2.permit; analogous WhitelistEnterSubGate signatures","summary":"Acknowledged with response: nonce protection is sufficient against signature malleability. Midnight also uses ecrecover without low-s restriction and comments that nonce protection makes this acceptable. This is not B: B uses a valid unused signature at the current nonce after a direct state change, not a second malleated use of a consumed signature.","codeNow":"present","codeRef":"src/adapters/midnight/gates/WhitelistEnterSubGate.sol:69-82"},{"source":"audits/2025-07-15-zellic.pdf","id":"3.4","title":"Force Deallocate penalty evasion","severity":"Low","page":"16-17","contract":"VaultV2.forceDeallocate","summary":"Same round-down penalty mechanism as May Spearbit 5.2.1; fixed by rounding upward (51ebe7fd). Current Midnight settlementFeeAssets also uses mulDivUp. No evidence this historic fee evasion covers A.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:457-459"},{"source":"audits/2025-07-15-competition.pdf","id":"3.1.2","title":"Incorrect loss calculation","severity":"Medium","page":"5-6","contract":"VaultV2.realizeLoss / MorphoVaultV1Adapter","summary":"Historical loss computed as stale allocation minus live previewRedeem missed losses already offset by accrued-but-uncheckpointed interest. Midnight no longer exposes that realizeLoss formula: realAssets values net credit directly, with live updates after bad debt, independently of cap deltas. Absorbing sale shortfall into future interest is different and explicitly documented.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:633-685"},{"source":"audits/2025-09-15-spearbit.pdf","id":"5.1.2","title":"Allocation role","severity":"Low","page":"6-7","contract":"VaultV2 roles / Midnight adapter permissions","summary":"Acknowledged request to segregate allocation/deallocation roles and change role-removal timing. Current Midnight intentionally uses parent-vault allocator for take and sub-ratifier administration; sentinel has narrower disable/unratify permissions. Trusted role design is not itself an authorization bypass.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:348-357"},{"source":"audits/2025-09-15-spearbit.pdf","id":"5.1.3; 5.1.4","title":"Nonzero shares dropped from market list; zero shares minted on deposit","severity":"Low","page":"7-9","contract":"Market adapter list / ERC4626 share accounting","summary":"Acknowledged ERC4626/Blue share-to-asset rounding can make newAllocation zero while shares remain, or mint no shares for positive assets. Midnight market-list transitions use integer net credit itself, not a rounded asset equivalent; only discounted realAssets is rounded. The original share-residue mechanism is absent.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:539-556"},{"source":"audits/2025-09-15-spearbit.pdf","id":"5.1.6","title":"firstTotalAssets analysis","severity":"Low","page":"9-14","contract":"VaultV2 relative caps","summary":"Known relative-cap limitations and false positives from transaction-initial total assets; firstTotalAssets is not a time-weighted reserve. Midnight duration caps use the same firstTotalAssets baseline and bypass only at relativeCap == WAD. Ordinary liquidity-adapter deposit example does not directly apply because Midnight is not a liquidity adapter.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:31"},{"source":"audits/2025-09-15-spearbit.pdf","id":"5.1.7","title":"A malicious adapter could break the allocation flow","severity":"Low","page":14,"contract":"VaultV2 shared allocation IDs","summary":"Acknowledged: another buggy or malicious registered adapter can inflate a shared coarse-ID allocation and deny new allocations. Midnight returns global collateralToken and market-family IDs; another registered adapter could affect those IDs. This relies on curator-selected adapter correctness; it is not an unprivileged Midnight-only exploit.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:790-808"},{"source":"audits/2025-09-15-spearbit.pdf","id":"5.2.2","title":"Token donations to adapters","severity":"Informational","page":15,"contract":"Adapter.skim / realAssets","summary":"Acknowledged: donated ERC20s need not be deployed or accrue for vault shareholders and can be skimmed. Midnight skim transfers its full token balance to skimRecipient; realAssets sums credit, not ERC20 balance. Donation semantics alone are not a new finding.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:385-396"},{"source":"audits/2025-09-15-spearbit.pdf","id":"5.2.4","title":"Adapter Approvals","severity":"Informational","page":16,"contract":"Adapter approvals to vault and yield source","summary":"Historical recommendation for atomic/exact approvals instead of maximum persistent ones. Midnight still grants max approvals to parentVault and Midnight, via forceApproveMax. Trusted immutable parent/protocol assumptions differ from an arbitrary malicious ERC4626; no standalone drain is proved here.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:426"},{"source":"audits/2025-09-15-spearbit.pdf","id":"5.2.5; 5.2.6","title":"Underestimated allocation values and stale aggregate coarse-ID cap checks","severity":"Informational","page":"16-17","contract":"Adapter valuation / shared caps","summary":"Known: coarse cap sums update only one route per interaction, leaving other contributions stale; rounded valuations can underestimate exposure. Midnight stored face-value netCredit does not grow with interest, and bad debt only decreases live credit, so stale duration entries are conservative. Family/collateral caps deliberately use stored face value rather than discounted assets. Original interest-growth underestimation is changed, not proven here.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:59-70"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"H-1","title":"Fixed total assets within a transaction allow for avoiding underlying market bad debt loss","severity":"High","page":"6-8","contract":"VaultV2 transaction caching / adapter losses","summary":"Acknowledged: touch vault to cache assets, liquidate bad debt, then withdraw against the pre-loss share price; remaining users absorb loss. Midnight realAssets is loss-aware but current vault still has firstTotalAssets transaction caching. Thus the parent-level cached-loss timing mechanism is relevant and known; current exploitability in a particular Midnight market is UNVERIFIED here.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:837-860"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"M-2","title":"Assets could be allocated to an adaptor that is about to be disabled","severity":"Medium","page":"11-13","contract":"VaultV2 adapter removal / analogous Midnight forceRemove","summary":"Documented resolution: zero a relevant cap before removing an investment to prevent last-minute allocations. Midnight forceRemove and setForceSellable NatSpec explicitly repeat this operational precaution. Pending removal alone does not block a buy, whereas forceRemoved blocks it permanently.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:272-275"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"M-5","title":"Delayed yield can be stolen","severity":"Medium","page":"20-23","contract":"VaultV2 maxRate / forceDeallocate penalties","summary":"Acknowledged: deposits before maxRate-delayed recognition of donations or force-deallocation penalties can capture yield intended for existing holders. Midnight IKR payments and vault penalty flow still interact with parent book/live value separation. This is an existing yield-recognition risk, not evidence of an exact A allowance-budget duplicate.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:48-51"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"L-1","title":"submit() could be more verbose when a selector has been abdicated","severity":"Low","page":"24-25","contract":"Adapter/VaultV2 timelocks","summary":"Historical poor error message from timestamp+maxUint timelock overflow. Midnight submit still uses checked block.timestamp + timelock and explicitly documents overflow; actual selector abdication separately uses an abdicated mapping checked by timelocked. Only overflow UX is shared.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:190-215"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"L-7","title":"Potential out-of-gas revert","severity":"Low (body calls it informational)","page":"36-37","contract":"Adapter.realAssets","summary":"Known: unbounded market enumeration can make all vault accrual operations run out of gas. Midnight bounds active markets at 250 and duration buckets at 8; loops remain proportional to active markets. Dust takes can fill the limit (NatSpec says so). A claim of unbounded enumeration is changed; gas burden/limit exhaustion is related prior art and needs a distinct proof.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:96-98"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"L-8","title":"updateList fails if different adapters return duplicate position IDs","severity":"Low","page":"38-39","contract":"Market list bookkeeping / IDs","summary":"Historical list tracking read the vault allocation for a supposed unique ID; a malicious registered adapter returning it could break membership. Midnight membership uses its own marketData.netCredit, not external cap allocation, so shared family/collateral IDs no longer drive list transitions. Shared cap poisoning remains the separate Spearbit 5.1.7 issue.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:539-556"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"L-9","title":"safeApprove does not handle USDT-style reset-to-zero tokens","severity":"Low","page":"40-41","contract":"SafeERC20Lib / adapter approvals","summary":"Acknowledged historical library limitation. Midnight calls forceApproveMax, which resets approval to zero before setting maximum; it does not call safeApprove directly for its protocol/vault approvals. Mechanism fixed for the scoped call sites.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:426"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"L-12","title":"Gate malfunction can block vault withdrawals for a substantial period","severity":"Low","page":"46-48","contract":"VaultV2 sharesGate/receiveAssetsGate; analogous market enter gates","summary":"Acknowledged as a non-issue by team: timelocked gate replacement cannot quickly repair malicious/reverting vault exit gates. Midnight enter gates are a different interface. Configured compatible enter gates allow IKR via temporary admission; arbitrary/no enterGateFactory configurations may block it and NatSpec warns explicitly. Vault-level share/asset gates remain outside this adapter mechanism.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:73-77"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"L-13","title":"There is no quick way to cancel a permit","severity":"Low","page":"49-50","contract":"VaultV2.permit; analogous WhitelistEnterSubGate","summary":"Acknowledged as non-issue by team: no nonce-invalidation endpoint; cancellation requires using permit then resetting allowance. Whitelist direct setter similarly leaves nonce untouched and there is no dedicated invalidation function. Closest older conceptual prior art for B, but report does not mention whitelist re-admission, its multidimensional nonces or setIsWhitelistedWithSig. Do not declare an exact duplicate solely from this analogy.","codeNow":"present","codeRef":"src/adapters/midnight/gates/WhitelistEnterSubGate.sol:25-26"},{"source":"audits/2025-09-15-blackthorn.pdf","id":"L-16","title":"maxRate set too low can steal yield from depositors","severity":"Low","page":"55-56","contract":"VaultV2 yield trust model","summary":"Acknowledged as non-issue: vault promises principal non-custodiality, not trustless future yield. Relevant to attempts to promote A into a depositor-guarantee violation: Midnight guardrails are explicitly operational and not a hard guarantee on future interest. This does not specifically acknowledge adversarial fill-partition budget inflation.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:53-57"},{"source":"audits/2025-12-04-market-v1-adapter-v2-blackthorn.pdf","id":"L-1","title":"Burning shares cannot be abdicated","severity":"Low","page":"5-6","contract":"MorphoMarketV1Adapter; analogous Midnight forceRemove","summary":"Resolved: old adapter burn used parent removeAdapter timelock but not its abdication. Midnight has its own complete timelock/abdicated machinery; forceRemove calls timelocked, which rejects an abdicated selector. No inherited parent-abdication expectation is promised.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:208-215"},{"source":"audits/2025-12-04-market-v1-adapter-v2-blackthorn.pdf","id":"L-2","title":"submitBurnShares can be executed against markets not yet added","severity":"Low","page":"7-9","contract":"Market-removal timelocks","summary":"Acknowledged: curators can pre-submit write-offs for markets not yet active; all past submissions must be monitored. Midnight submit accepts forceRemove(marketId) without membership validation, and forceRemove irreversibly marks even an empty market removed. Same pre-submission monitoring risk persists under the renamed operation.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:190-205"},{"source":"audits/2025-12-04-market-v1-adapter-v2-blackthorn.pdf","id":"L-3","title":"Front-running of share burn","severity":"Low","page":"10-12","contract":"Write-off / vault loss distribution","summary":"Resolved through documentation, not a ban on exits: users can exit before a timelocked write-off, shifting loss to holders who remain. Midnight forceRemove similarly reduces valued credit when executed; force-deallocation remains allowed until execution. This is known withdrawal-before-write-off behavior, conditional on liquidity/funding.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:371-382"},{"source":"audits/2025-12-04-market-v1-adapter-v2-blackthorn.pdf","id":"L-4","title":"Shares can be directly burned from vault liquidity market","severity":"Low","page":13,"contract":"Market removal / liquidity-adapter integration","summary":"Resolved through guidance to zero the affected cap/change liquidity route before burn. Midnight is explicitly prohibited as liquidity adapter, so this exact route is inapplicable; force removal still disables ordinary withdrawals/IKR for the removed market.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:31"},{"source":"audits/2025-12-04-market-v1-adapter-v2-blackthorn.pdf","id":"L-5","title":"Allocation to a market with share burn pending","severity":"Low","page":"14-15","contract":"Pending forceRemove / setForceSellable","summary":"Resolved by documenting zero-cap mitigation. Midnight buys remain possible while a removal is merely pending, unless caps are lowered, and the same mitigation is explicit in forceRemove/setForceSellable NatSpec. Once removal executes all subsequent buys are rejected.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:272-275"},{"source":"audits/2025-12-04-market-v1-adapter-v2-blackthorn.pdf","id":"L-6","title":"Dust-sized withdrawals lose value to underlying market depositors","severity":"Low","page":"16-18","contract":"Blue supply-share conversion","summary":"Acknowledged: different relative share values and repeated upward-rounded share burns can transfer rounding value to underlying Blue suppliers. Midnight withdraws integer net credit and its IKR sells units at face value, not Blue supply shares; this exact two-share-price dust attack is absent. It is not A, which is path dependence of changing amortization rates rather than share-burn rounding.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:457-482"},{"source":"audits/2025-12-04-market-v1-adapter-v2-blackthorn.pdf","id":"L-7","title":"forceDeallocate can prevent allocation to other markets","severity":"Low","page":"19-20","contract":"Faulty-oracle/interest growth and shared caps","summary":"Acknowledged: repeated zero-amount deallocation can refresh an inflated market valuation into shared caps and block healthy routes. Midnight credit does not grow with interest and no faulty oracle is consulted by withdrawToVault/currentNetCredit; bad debt decreases net credit. A shared-cap griefing analogy exists, but the original inflated-valuation mechanism is changed.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:716-753"},{"source":"audits/2025-12-04-market-v1-adapter-v2-certora.pdf","id":"L-01","title":"Owner can no longer update skimRecipient","severity":"Low","page":"8-9","contract":"Adapter.setSkimRecipient","summary":"Acknowledged intended authority change: curator-controlled timelock replaces direct owner change. Midnight has exactly the timelocked curator-submission pattern. This is expected trusted-role behavior.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:191-192"},{"source":"audits/2025-12-04-market-v1-adapter-v2-certora.pdf","id":"L-02","title":"Users can sandwich scheduled burnShares to shift losses to others","severity":"Low","page":"10-11","contract":"Midnight forceRemove analogue","summary":"Acknowledged and documented: same write-off front-running mechanism as Blackthorn L-3. Midnight forceRemove changes realAssets and cap contributions on execution, leaving an observable timelock interval during which holders may exit.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:368-382"},{"source":"audits/2025-12-04-market-v1-adapter-v2-certora.pdf","id":"I-01","title":"Stale allocation values block legitimate allocation after burnShares","severity":"Informational","page":"12-13","contract":"Adapter forceRemove / parent cap synchronization","summary":"Acknowledged old two-step burn then deallocate(0) left stale cap entries temporarily. Midnight forceRemove removes local netCredit/list entry and immediately calls parentVault.deallocate with the negative old credit when nonzero. Cap updates happen atomically or the transaction reverts; no analogous post-success two-step gap.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:371-382"},{"source":"audits/2025-12-04-market-v1-adapter-v2-certora.pdf","id":"I-02","title":"Abdicating burnShares can permanently block market removal","severity":"Informational","page":13,"contract":"Adapter abdicate / forceRemove","summary":"Acknowledged intended irreversibility. Midnight forceRemove can also be abdicated; timelocked enforces it. Losing this administrative write-off ability after voluntary abdication is known configuration behavior.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:208-215"},{"source":"audits/2025-12-04-market-v1-adapter-v2-certora.pdf","id":"I-03","title":"Missing event emission in updateList when modifying marketIds","severity":"Informational","page":"13-14","contract":"Adapter market-list events","summary":"Acknowledged: infer membership from allocation events instead of dedicated list events. Midnight removeMarket itself emits no list event, but Buy/Sell/WithdrawToVault/ForceRemove/ForceDeallocate events expose credit transitions. Same indexer convention, not a fresh missing-event vulnerability.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:559"},{"source":"audits/2025-12-04-market-v1-adapter-v2-certora.pdf","id":"I-04.1","title":"CREATE2 duplicate adapter deployment has an opaque revert","severity":"Informational","page":14,"contract":"MidnightAdapterFactory / gate factories","summary":"Acknowledged old constant-salt per-vault duplicate CREATE2 UX. Midnight factories use keccak256(preSalt,msg.sender), so another caller cannot front-run the exact address; a caller repeating its own identical salt and constructor arguments still gets a CREATE2 collision without a custom duplicate error. Bundlers must incorporate initiator as documented. Duplicate UX persists; cross-caller fixed-salt denial is changed.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapterFactory.sol:28-40"},{"source":"audits/2025-12-04-market-v1-adapter-v2-certora.pdf","id":"I-04.2; I-04.3","title":"Authorization error naming; zero-position burn events","severity":"Informational","page":"14-15","contract":"Adapter interface/errors and forceRemove","summary":"Acknowledged stylistic error-name inconsistency and zero-share burn events; team says emitting zero difference is valid indexing. Midnight has NotAuthorized errors in adapter and Unauthorized in gate; forceRemove can emit oldNetCredit=0. Neither is a new security finding.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:192"},{"source":"audits/2025-12-04-market-v1-adapter-v2-spearbit.pdf","id":"3.1.1","title":"Inconsistency in marketIds array when burnShares is called","severity":"Informational","page":5,"contract":"Adapter forceRemove / list","summary":"Acknowledged old burn set supplyShares=0 without list removal. Midnight forceRemove immediately removes a market with nonzero stored net credit using removeMarket, so list inconsistency after successful forceRemove is changed.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:371-382"},{"source":"audits/2025-12-04-market-v1-adapter-v2-spearbit.pdf","id":"3.1.2","title":"Burned shares cannot be recovered if market becomes healthy","severity":"Informational","page":5,"contract":"Midnight forceRemove analogue","summary":"Report labels old issue fixed in PR 841 through documentation. Midnight likewise permanently marks removed markets, leaves Midnight credit in place, and rejects buys/sells/withdrawals/IKR. There is no restoration/rescue-credit endpoint; this exact irreversibility is prominently documented and must not be rediscovered as accidental loss.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:368-382"},{"source":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","id":"5.1.1; 5.1.2","title":"Zero allocation on deposit and missing share slippage checks","severity":"Medium","page":"5-6","contract":"Generic ERC4626 adapter vs Midnight trade callbacks","summary":"Acknowledged ERC4626 integration assumptions. Midnight buys integer credit, checks boughtNetCredit >= buyerAssets and minNetBuyRate; ordinary sales enforce maxNetSellRate and shortfallAllowance, force-sellable sales minForceSellPrice. No ERC4626 minted/burned-share slippage variable exists. A uses a different operational-budget path.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:535-547"},{"source":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","id":"5.1.3; 5.1.4","title":"Missing withdrawn-asset balance delta checks; persistent source approvals","severity":"Medium","page":6,"contract":"Adapter external protocol integration","summary":"Acknowledged: a noncompliant ERC4626 may underpay a withdrawal covered by prior donations or misuse unlimited approvals. Midnight also relies on its immutable protocol to transfer correctly, does not compare before/after ERC20 balance in withdrawToVault and uses persistent maximum approvals. This is an integration trust assumption; no evidence pinned Midnight itself underpays.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:426"},{"source":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","id":"5.2.1","title":"Unsafe casts for arbitrary ERC4626 values","severity":"Low","page":"6-7","contract":"Adapter signed allocation delta","summary":"Acknowledged unsafe uint256 previewRedeem to int256 casts in generic source. Midnight old/new credit are uint128, so widening each to int256 before subtraction cannot wrap as in that report; bounded numeric invariant is documented next to each cast.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:605-610"},{"source":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","id":"5.2.2; 5.3.1.G","title":"Temporary DoS through reverting or gas-heavy valuation views","severity":"Low / Informational","page":"7,11","contract":"Adapter.realAssets","summary":"Acknowledged: any adapter realAssets failure blocks parent accrual and hence core entry/exit. Midnight calls lossFactor and, for loss markets, updatePositionView, and explicitly reverts when a loss market is liquidationLocked. Generic dependency liveness is known; the correctness of a specific Midnight callback lock remains a separate question, not proven here.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:749-758"},{"source":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","id":"5.2.3","title":"Faulty yield source can drain liquidity by reporting inflated assets","severity":"Low","page":"7-8","contract":"Adapter valuation trust","summary":"Acknowledged external-source trust requirement. Midnight values tracked credit through a fixed immutable protocol rather than arbitrary previewRedeem. A forged external source could still lie, but factories deploying arbitrary Midnight instances do not make that source endorsed or trusted. Original ERC4626 manipulation construction is not in scoped adapter.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapterFactory.sol:12-22"},{"source":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","id":"5.2.4","title":"Skim cannot withdraw authenticated rewards","severity":"Low","page":8,"contract":"Adapter.skim","summary":"Acknowledged: skim transfers tokens already held, but cannot make an authenticated claim to external rewards systems. Midnight skim similarly has no arbitrary call/claim endpoint. Whether any actually supported reward is inaccessible is UNVERIFIED; missing arbitrary claiming alone is known integration limitation.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:391-396"},{"source":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","id":"5.2.5","title":"Indirect share donations may drift accounting","severity":"Low","page":"8-9","contract":"Adapter donation accounting","summary":"Acknowledged ERC4626 share donations can alter reported live value outside caps. Midnight has no ERC4626 share balance; it tracks market credit and ignores adapter ERC20 balance in realAssets. Gifted Midnight credit behavior is not proved in this register and should not be equated automatically to transferable ERC4626 shares.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:134-136"},{"source":"audits/2025-12-04-vault-v1-adapter-arbitrary-erc4626-spearbit.pdf","id":"5.3.1.A-C,E-F,H; 5.3.2","title":"General source compatibility, callbacks, cycles and preview consistency","severity":"Informational","page":"9-12","contract":"Adapter integration / Midnight gates","summary":"Acknowledged integration constraints: synchronous settlement, exit guarantee, compatible tokens, no unsafe reentrancy, no uncontrolled cycles, accurate previews. Team clarifies liquidity gating is acceptable if IKR preserves non-custodial exit. Midnight implements funded credit IKR with compatible gate admission, forbids reentry by tokens/gates in NatSpec and warns on nested same-vault trading. Re-reporting those explicit assumptions is not a new vulnerability.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:73-88"},{"source":"audits/2026-08-13-blue-public-allocator-blackthorn.pdf","id":"H-1","title":"Real exposure to a compromised oracle may surpass vault caps by magnitudes","severity":"High","page":"5-12","contract":"BluePublicAllocator / live-vs-recorded caps","summary":"Acknowledged: permissionless refill after repeated oracle-induced bad debt restores live allocation without cumulative spend cap. Midnight has no BluePublicAllocator flow; buys require trusted allocator take or a ratified offer, and caps track remaining face netCredit, not cumulative historic spending. A rate/budget comparison is not a duplicate of this public refill exploit. Applying a comparable pre-ratified offer to repeated Midnight losses is UNVERIFIED.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:348-357"},{"source":"audits/2026-08-13-blue-public-allocator-blackthorn.pdf","id":"M-1; M-2; M-3; M-4","title":"Public allocation rate manipulation, bad-debt shifting, immediate risk settings and liquidity griefing","severity":"Medium","page":"13-24","contract":"BluePublicAllocator; analogous public offer fills","summary":"M-1 resolved by proportional loan-asset penalty; remaining issues acknowledged as public-allocation tradeoffs. Midnight has no public arbitrary allocation route: public action must fill an approved maker offer, with onBuy/onSell checks; allocator take is role-gated. Historical public choice of amount/timing is important prior art, but it does not describe changing amortization rates consuming shortfallAllowance per fill.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:348-357"},{"source":"audits/2026-08-13-blue-public-allocator-blackthorn.pdf","id":"L-2","title":"Per-market public caps can fill a shared vault cap and block deposits","severity":"Low","page":"28-30","contract":"Shared cap IDs","summary":"Acknowledged: separately enabled markets compete for shared adapter/collateral cap headroom; caps themselves hold. Midnight similarly has shared adapter/family/collateral and duration limits. Filling headroom through valid ratified buys may block later buys, but Midnight cannot serve as liquidity adapter, so the exact automatic deposit-failure example differs.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:31"},{"source":"audits/2026-08-13-blue-public-allocator-blackthorn.pdf","id":"L-3","title":"One-wei allocation bypasses zero absolute cap through reported-value rounding","severity":"Low","page":"31-33","contract":"Zero caps / rounded allocation","summary":"Resolved by explicit nonzero public-cap check. Midnight duration-cap checks require absoluteCap > 0 even if the computed allocation is zero; parent allocate also explicitly rejects zero absolute cap. No analogous zero-cap route has been established.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:594-597"},{"source":"audits/2026-08-13-blue-public-allocator-blackthorn.pdf","id":"L-6","title":"Public allocator can list enabled but unused markets","severity":"Low","page":"38-40","contract":"Adapter active market list","summary":"Acknowledged: dust permissionless public allocations can grow active list and permanent gas cost; amount-proportional penalties do not remove it. Midnight maker buy fills can likewise add a market with positive credit, and NatSpec explicitly says MAX_MARKETS is fillable with dust takes. Now bounded at 250; the generic dust-list/gas mechanism is known prior art. Saturation impact for a particular ratified offer set is UNVERIFIED here.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:96-98"},{"source":"audits/2026-08-13-blue-public-allocator-spearbit.pdf","id":"5.1.5","title":"Public allocator accepts vaults/adapters not deployed by factories","severity":"Low","page":"10-11","contract":"Factory membership checks / IKRCompatibleEnterGate","summary":"Partial fix in old allocator: vault membership added; adapter restriction deliberately omitted for future compatibility. Midnight adapter checks configured enterGateFactory membership and immutable admission compatibility on first buy; enter gate admits only callers whose registered adapter factory reports isCreated. Gate/factory configuration is trusted and may be arbitrary; factory membership is origin evidence, not a guarantee of every parameter.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:564-570"},{"source":"audits/2026-08-13-blue-public-allocator-spearbit.pdf","id":"5.2.3","title":"Fixed factory salt prevents per-vault adapter policy segmentation","severity":"Informational","page":"12-13","contract":"Adapter factories","summary":"Acknowledged limitation of old salt=0 per-vault factory. Midnight adapter/gate/subgate factories accept preSalt and derive salt with msg.sender, allowing multiple instances with same constructor parameters and different caller salts. Thus fixed-salt single-policy limitation is absent; identical repeat deployments still collide by CREATE2 design.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapterFactory.sol:28-42"},{"source":"audits/2026-08-13-blue-public-allocator-spearbit.pdf","id":"5.2.10","title":"Additional configuration risks: removing/readding roles does not reset periphery state","severity":"Informational","page":25,"contract":"Ratifier root persistence analogue","summary":"Acknowledged: removing then reauthorizing a public allocator/adapter leaves old configuration live. Midnight ratifier NatSpec expressly says approved roots remain ratified after allocator removal until explicitly unratified. This is a known state-persistence pattern, not B: B changes an account whitelist using an unused signed instruction after a direct deny.","codeNow":"present","codeRef":"src/adapters/midnight/ratifiers/MidnightAdapterRateRatifierV1.sol:20-23"},{"source":"audits/2026-08-13-blue-public-allocator-spearbit.pdf","id":"5.2.11","title":"Public calls can front-run deallocation and re-enter a written-off market","severity":"Informational","page":"25-26","contract":"Adapter operational timing / removed markets","summary":"Acknowledged: public reallocations can consume an expected withdrawal amount or re-enter after old burnShares, requiring another timelock. Midnight exact-amount operations can also become stale after a permitted maker fill, but forceRemoved is permanent and onBuy rejects re-entry. First operational front-run analogue remains; the post-removal repopulation mechanism is changed.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:371-382"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"5.1 / CS-MORPHO-VLT2-001","title":"Users can escape losses","severity":"Medium","page":"14-15","contract":"VaultV2 / adapter loss realization","summary":"Risk accepted. Final report version realizes visible losses on accrual; users may still exit before predictable underlying bad debt. Midnight reads live lossFactor/current credit, but cannot account for a default not yet realized by Midnight. Predictable-loss exits are known risk, not evidence of A/B.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:837-860"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"6.1 / CS-MORPHO-VLT2-016","title":"totalAssets can be manipulated","severity":"Critical","page":"16-17","contract":"MorphoBlueAdapter / donation and fabricated losses","summary":"Code corrected: gift a fake-market position, synchronize, then induce bad debt to manufacture a vault loss. Midnight values only listed credit markets and requires funded/authenticated trading plus cap checks; arbitrary ERC20 gifts do not enter realAssets. Exact old donated-Blue-position mechanism changed.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:837-860"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"6.2 / CS-MORPHO-VLT2-019","title":"Assets can be double counted","severity":"Medium","page":17,"contract":"Adapter active market list","summary":"Code corrected: zero allocation after total loss on allocate left a list entry; later allocation appended duplicate, inflating assets. Midnight tests old/new stored netCredit and removes on zero during buy, sale and withdrawal. Original duplicate-list transition is changed.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:539-556"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"6.3 / CS-MORPHO-VLT2-020","title":"Unallocated vault adapter can report assets","severity":"Medium","page":18,"contract":"Adapter realAssets / donated positions","summary":"Code corrected: ERC4626 donated shares reported assets despite zero allocation and no deallocation route. Midnight sums only its tracked marketIds and has no ERC4626 share balance; current netCredit transitions manage membership. Exact ERC4626 donation mechanism changed.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:837-860"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"6.6 / CS-MORPHO-VLT2-022","title":"Abdicated functions can be called again","severity":"Low","page":19,"contract":"Adapter/VaultV2 timelocks","summary":"Code corrected: pending decreaseTimelock could undo maxUint-based abdication. Midnight has a separate abdicated mapping checked on execution, so shortening a timelock cannot restore an abdicated selector.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:208-215"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"7.2 / CS-MORPHO-VLT2-008","title":"Malicious IRM can reenter and multiply reported interest/loss","severity":"Informational","page":"25-26","contract":"Adapter external callbacks / checkpoint order","summary":"Risk accepted for malicious/permitted IRMs, with later market-adapter ordering mitigations. Midnight has no external Blue IRM; snapshot handling and sell locks address callbacks, while token/gate non-reentry is assumed. No specific repeated-delta exploit proven; original IRM callback path changed.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:561-576"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"8.1","title":"Adapters deployed by factory","severity":"Note / no severity","page":27,"contract":"Adapter/gate/subgate factories","summary":"Permissionless factory deployment is not evidence of safe configuration. Midnight factories likewise permit arbitrary parent vault, gate/subgate configuration and deployment caller; isCreated records origin, not curator endorsement. Factory misconfiguration as such is known trust/setup risk.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapterFactory.sol:28-42"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"8.3","title":"Future adapters: ID, exit and untrusted-data assumptions","severity":"Note / no severity","page":28,"contract":"Adapter specification","summary":"Known checklist: consistent IDs, vault-only allocate/deallocate, sufficient approval, feasible IKR, untrusted forceDeallocate data and safe callbacks. Midnight self-reported allocation and shared-family IDs materially differ from old fine-grained-ID recommendations; list accounting is local. Generic checklist is not proof of a defect.","codeNow":"changed","codeRef":"src/adapters/midnight/MidnightAdapter.sol:404-482"},{"source":"audits/2025-09-15-chainsecurity.pdf","id":"8.5; 8.7; 8.8","title":"Blocked normal exits, underlying solvency and shorting before predictable losses","severity":"Note / no severity","page":"29-30","contract":"VaultV2 / adapter integration","summary":"Known limitations: allocator can force users onto penalized IKR; underlying insolvency affects vault solvency; predicted loss may be shorted across transactions. Midnight expressly requires compatible gates for IKR and does not guarantee future yield or underlying solvency. These are context, not fresh findings.","codeNow":"present","codeRef":"src/adapters/midnight/MidnightAdapter.sol:48-57"}],"competition":{"url":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","readable":true,"knownIssues":[{"source":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","text":"No separate enumerated known-issues list on the public page. It refers to previous security reports/audits under Out of Scope: the Cantina and TrustSec Midnight Adapter drafts dated 2026-10-12."}],"acceptedRisks":[{"source":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","quote":"Accepted risks","text":"Listed as an out-of-scope category, without an itemized risk list or extra risk descriptions on the public page. Do not infer that any newly alleged effect has been explicitly accepted."}],"outOfScope":[{"source":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","quote":"Previous security reports / audits","items":["Cantina - Midnight Adapter (draft, 2026-10-12)","TrustSec - Midnight Adapter (draft, 2026-10-12)"]},{"source":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","quote":"Expected behaviors such as trusted / untrusted roles"},{"source":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","quote":"Accepted risks"}],"severityRules":[{"source":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","quote":"This competition uses Cantina's standard severity definitions.","text":"The page links the competition finding severity criteria, not bug-bounty categories. Public metadata allows high, medium, low, informational."},{"source":"https://docs.cantina.security/standards/severity/competition","text":"Baseline impact x likelihood matrix: rows likelihood High/Medium/Low, columns impact High/Medium/Low; rows are [High,High,Medium], [High,Medium,Low], [Medium,Low,Informational]. High impact example: funds can be lost; high likelihood example: any participant can trigger. Mitigation that contradicts protocol design philosophy is likely at most informational."},{"source":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","quote":"All High and Medium findings require a valid coded POC before the end of the competition."},{"source":"https://docs.cantina.security/standards/severity/competition","text":"General linked rule: coded PoC must compile and demonstrate impact. It describes exemptions for reputation >=80, missing functions and dedicated researchers; the competition page itself states all High/Medium require PoC, without those exemptions."},{"source":"https://docs.cantina.security/standards/severity/competition","quote":"Issues that require admin access (or equivalent) to perform should at most be low severity, unless the protocol was designed to be resilient against such actions in the first place."},{"source":"https://docs.cantina.security/standards/severity/competition","text":"User errors easily handled by frontend are at most informational. ERC20 approval race conditions invalid; default standard ERC20 assumption, weird-token-dependent findings at most Low; dust rounding losses at most Low."},{"source":"https://docs.cantina.security/standards/severity/competition","quote":"Any finding that has been acknowledged in a previous report will be considered invalid."},{"source":"https://docs.cantina.security/standards/severity/competition","quote":"The competition README must be used as the main reference for protocol behavior and not other sources."},{"source":"https://cantina.xyz/competitions/78a6e652-de09-435f-918d-471243508009","text":"Review/verify every finding; unchecked AI-generated/spam/unverified submissions are considered abuse. Reward thresholds: valid Medium gives $150,000 pot; valid High gives $400,000; $40,000 reserved for quality-ranked Low/Informational reports. These are reward rules, not additional severity definitions."}],"note":"Incremental duplicate register; historical severities, not new findings. codeNow=present records a remaining mechanism/design pattern, not a certified exploit; changed records material differences. UNVERIFIED means no behavioral proof. Pages are physical PDF pages. October drafts and the general README/NatSpec register are not reproduced. Public read-only research; pinned clone/recursive submodules completed; no build or PoC required for this item. First-register artifact not supplied: exact cross-register identity is not certified."},"checks":[{"finding":"A","verdict":"new","duplicateOf":null,"where":"No exact matching fill-partition/shortfallAllowance finding found in the additional audit sources or public competition Instructions. Closest historical mechanisms are 2025-09-15-blackthorn M-5/L-16 (yield recognition/trusted yield controls), 2025-12-04-market-v1-adapter-v2-blackthorn L-6 (dust share rounding), and 2026-08-13-blue-public-allocator-blackthorn M-1..M-4 (public caller timing/amount). Those differ in root cause. IMPORTANT: new here means no exact documentary duplicate found in this incremental register, not proved valid or eligible. README:81-88,114-124 and MidnightAdapter.sol:145-148 expressly document per-sale consumption, current-rate valuation and global rate reduction; this substantially weakens any claim that merely consuming allowance per sale is unexpected. The specific claim that taker-selected partitioning inflates total consumption and blocks later offers is not explicitly disclosed or accepted in those passages. Static code agrees each callback reads the current stored rate at 643-648 and rewrites rates at 673-680, so successive fills have a new basis. The asserted up-to-38% number, admissible offer/fill conditions, and actual later-sale revert impact are UNVERIFIED here (no coded PoC). No guarantee of fill-size invariance is stated. Do not drop or promote it solely on thematic overlap; needs the main reviewer PoC and first-register comparison.","quote":[{"source":"src/adapters/midnight/README.md:81-83","text":"On sales, the amortized value sold is the difference between the market's amortized values before and after the sale, at the same rate.\nIf proceeds are above that value, the adapter realizes any gain immediately.\nOtherwise, the difference with the proceeds is a shortfall."},{"source":"src/adapters/midnight/README.md:85-87","text":"Unless the sold market is [force-sellable](#force-sellable-markets), the adapter absorbs the shortfall using proportional shares of unearned interest from active markets.\nThe adapter lowers `netRate` until the shortfall is covered, instead of realizing an immediate loss.\nThe sale reverts if the shortfall exceeds total unearned interest or the curator-set `shortfallAllowance`."},{"source":"src/adapters/midnight/README.md:117","text":"- **`shortfallAllowance`**: Total shortfall allowed from sales, in asset units. It is consumed at every sale below amortized value, unless the market is [force-sellable](#force-sellable-markets)."},{"source":"src/adapters/midnight/MidnightAdapter.sol:145-146","text":"/// @dev Total shortfall that sales can still incur. Each sale with a shortfall consumes it.\n    /// @dev Rounding target amortized values up and rates down can reduce interest by slightly more than the shortfall consumed."},{"source":"src/adapters/midnight/README.md:124","text":"These timelocks are not hard guarantees on depositors' future interest, and the adapter does not need them to be noncustodial."}]},{"finding":"B","verdict":"new","duplicateOf":null,"where":"No exact whitelist direct-deny/unused-signature re-admission disclosure found in these additional reports, public Instructions, README or whitelist NatSpec. Closest prior art: audits/2025-09-15-blackthorn.pdf L-13 pp49-50, acknowledged inability to quickly cancel VaultV2 ERC20 permits; audits/2025-07-15-zellic.pdf 3.3 pp14-15, accepted nonce-based signature-malleability protection. These concern permits/malleated reuse and do not explicitly address WhitelistEnterSubGate. README describes stale nonce acceptance only when status already equals signed status, which is a different branch from B: B needs nonce == previousNonce, with a still-current signer and unexpired unused signature. WhitelistEnterSubGate.sol:52-56 assigns status without changing nonces; 69-79 checks signer/deadline and equality then increments nonce and assigns signed status, with no caller restriction. Static mechanism present. If signature has already been consumed and status is then directly denied, replay at nonce < previousNonce fails WhitelistedStatusChanged (81-82); B must not be described as unlimited replay of used signatures. Denying one account does not revoke the whitelister role or invalidate that account nonce across all whitelisters. No actual execution PoC/security impact or severity assessed: UNVERIFIED as a competition finding. new is a narrow documentary verdict; explicit protocol acceptance of this exact revocation interaction was not found, and the first register artifact was not supplied.","quote":[{"source":"src/adapters/midnight/README.md:174","text":"Whitelisters edit the lists directly with `setIsWhitelisted` or allow to edit the list by EIP-712 signatures used by `setIsWhitelistedWithSig`."},{"source":"src/adapters/midnight/README.md:175","text":"`setIsWhitelistedWithSig` accepts a stale nonce when the account is already set to the signed value. The signature must still be unexpired and from a current whitelister."},{"source":"src/adapters/midnight/gates/WhitelistEnterSubGate.sol:58","text":"/// @dev Allows to batch setIsWhitelisted with the take, without requiring a transaction from the whitelister."},{"source":"src/adapters/midnight/gates/WhitelistEnterSubGate.sol:52-56","text":"function setIsWhitelisted(bool creditSide, address account, bool newIsWhitelisted) external {\n        require(isWhitelister[creditSide][msg.sender], NotWhitelister());\n        isWhitelisted[creditSide][account] = newIsWhitelisted;\n        emit SetIsWhitelisted(msg.sender, creditSide, account, newIsWhitelisted);\n    }"},{"source":"audits/2025-09-15-blackthorn.pdf:49","text":"Thereisnowayforpermitcancellationotherthanusingitandresettingtheallowance\natomically."}]}],"unreadable":[]}
