# Unverified collateral and skipped custody checks

Borrow paths that accept collateral without proving the protocol holds it and it is unencumbered

_Area: DeFi accounting and math bugs. Seen in 3 disclosed reports; latest 2024-09-16. Updated 2026-10-29._

## How it works
A borrow path assumes that when a caller names an asset as collateral, the protocol now holds that asset and it carries no prior claim. The code never confirms the transfer happened or that the asset is not already locked elsewhere. Naming an asset and delivering it are separate events: an identifier can be referenced without moving, or already be staked in another pool. The protocol then lends against value it does not control [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md). The invariant that must hold is custody plus freedom from prior encumbrance at the moment funds are released.

## Where it shows up
- Borrow/loan functions that accept an NFT or token identifier but never check ownership or receipt after the collateral step [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md).
- Collateral that can also be staked or deposited elsewhere, so one asset backs two claims [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md).
- Re-staking of protocol-held funds where the stake call credits the caller rather than the protocol [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md).
- Transfer results trusted without verifying balance movement.

## How to review
For every borrow path, confirm the invariant: at the moment funds are released, the protocol's recorded collateral equals assets it actually custodies and that are not pledged elsewhere. Verify the transfer by balance delta or ownership check, not just the call's return value [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md). Trace who is credited when protocol-held funds are re-staked; if re-invoking the stake function attributes deposits to the caller, that is a separate bug from the missing custody check [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md).

## Variants seen
- NFT reused as collateral while already staked in a staking pool [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md).
- Re-staking misattributing protocol-held APE to the attacker, a distinct bug layered on the same path [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md).

## Impact and severity
High: direct loss of protocol funds (~$820K [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md)). Severity rises when collateral is reusable across pools and when borrowed funds are re-staked under caller control, since both let one asset support multiple withdrawals [E1](https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md).

## Evidence
- E1: https://bugbountylibrary.com/r/dhl%3A20230617-pawnfi.md
- E2: https://bugbountylibrary.com/r/c4%3A2024-06-size%3AM-10.md
- E3: https://bugbountylibrary.com/r/dhl%3A20230627-strac.md
