<!-- canonical: https://0xsimao.com/findings/nftperp-ii-liquidate-array-safely-storage -->

# In AmmRouter:liquidateMaker(), the pools array can safely be deleted from storage

Low/Info · Three Sigma · NFT perpetuals · 29th January, 2024

Finding 3S-NFTPerp-N05 of the Nftperp Matching Engine security review.

- Report: /reports/nftperp-ii
- Source: https://cdn.sanity.io/files/qoqld077/production/87f617e82d5468500e950a669f30607376b37c32.pdf

---

### Description

AmmRouter:liquidateMaker() calls [_unregisterPoolsFromMaker()](https://github.com/nftperp/NFTPerp-V2-Contracts/blob/8ea05fc0ecf299ca8374b571486846652c8725f8/src/AMMRouter.sol#L411) with all the pools, which
means that it could simply delete the pools from storage.

### Status

Addressed in [#0ea5723](https://github.com/nftperp/NFTPerp-V2-Contracts/commit/0ea5723a69c108cba560acd4abd16d6bbc112857)

---

Related findings:

- [In fillPair(), when the taker is the maker, the reduceOnly order mapping is not being deleted](https://0xsimao.com/findings/nftperp-i-fill-taker-maker-deleted): Nftperp Exchange
