I must say, this is quite inconvenient.
Unlike the balance lock, there's no "reserve ID" available for this.
Ideally, a good pallet should keep a record of such transactions. For instance, when setting a proxy on the blockchain, the proxy pallet should store how many tokens were allocated for reservation in storage.
Previously, removing a pallet without releasing the reserved funds could permanently lock those tokens. Worse still, some problematic pallets failed to keep records; they relied solely on a runtime-configured dynamic formula (e.g. T::DepositAmount::get()
), which could change with any runtime upgrade. If they forget to provide a migration, the funds will also be locked forever.
All these factors need to be taken into account.
If everything work as expected, the most accurate method is to check all pallets and determine their reservation storage.