# Cannot permissionless settle the vault account if the user use a blacklisted account

Permissionless vault settlement reverts when a refund transfer hits a blacklisted ERC20 account, blocking settlement and dependent actions like liquidation.

- Payout: Contest reward
- Severity: medium
- Program: Notional
- Credited: ShadowForce
- Disclosed: 2023-03-09
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2023-03-notional-judging/issues/155
- Library page: https://bugbountylibrary.com/r/sherlock%3A2023-03-notional%3AM-5
- Tags: domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic vuln:dos

**Target:** VaultAccountAction.settleVaultAccount / TokenHandler.withdrawPrimeCash
**Root cause:** Settlement refunds excess prime cash via a direct ERC20 transfer to the account; if the token (e.g. USDC) blacklists the account, safeTransferOut reverts, so settlement cannot complete.
**Steps:**
1. User has a matured vault account with tempCashBalance exceeding prime debt in a blacklistable token (USDC).
2. Account gets blacklisted by the token issuer.
3. Anyone calls `settleVaultAccount(account, vault)`; settleVaultAccount -> repayAccountPrimeDebtAtSettlement computes primeCashRefund > 0.
4. TokenHandler.withdrawPrimeCash -> GenericToken.safeTransferOut(underlying.tokenAddress, account, withdrawAmount) reverts for blacklisted account.
5. Settlement fails, blocking liquidation and other actions that require prior settlement.
**How found:** Code reading of the settlement flow: noticed the permissionless-settlement comment, traced settleVaultAccount into repayAccountPrimeDebtAtSettlement, and observed a direct ERC20 transfer to the account that can revert on blacklist.
**Escalation:** Blocked settlement cascades to liquidation paths (VaultLiquidationAction) and forced migration settlement, leaving account stuck.
**Insight:** When a function is documented as permissionless, audit every external token transfer inside it for revert conditions (blacklists, paused tokens, hooks) that a third party can trigger to grief the call.
