Skip to content
Request an audit

‹ All findings

A deallocateAll() function could be useful to successfully guarantee market removal in the Morpho market adapter

Low/InfoMorpho Vault V2·Blackthorn · Curated yield vaults · 13th August, 2025CodebaseL-4

Summary

MorphoMarketV1Adapter::deallocate() withdraws the given assets, removing a market in case the allocation is null, but it may be hard to achieve this without using the exact shares amount.

Vulnerability Detail

MorphoMarketV1Adapter::updateList() is called after every deallocation to remove the market from the list if the assets are null there. However, due to interest accrual, leftover dust may be left after deallocation, which may make it annoying to fully remove a market.

Impact

Removing a market from the list can be delayed, which should just slightly affect gas costs.

Code Snippet

https://github.com/sherlock-audit/2025-08-morpho-vault-v2-aug-13th/pull/6/files#diff-29a9f0002168ac012f2dbea176776275c39c841f56d6e756b80f663e491f236fR87

Tool Used

Manual Review

Recommendation

Add a deallocateAll() function to forcefully remove all funds from the market.