Nami

Transactions on Cardano are normally validated in phase 1, which means before they even get onto the network they are completely verified. If something is off, such as inadequate fees or an insufficient balance, the transaction is directly rejected without incurring costs.

Smart contracts (Plutus validators), on the other hand, are validated in phase 2. Only the node that produces the block verifies the contract fully. In the event of a contract failure, a collateral is taken to cover the resources (cpu and memory) used by the node to verify the contract. When a script runs successfully, the collateral is not taken.

The chances of losing the collateral are very low; however, Nami seeks to minimize the risk by only allowing a determined amount (5₳) of collateral to be used. In a worst case scenario, malicious, or poorly built dApps, would only be able to take this amount.
Finally, collateral aims to prevent bad actor from spamming the network with failing contracts.