Core Concepts

Counterparty Risk

In DeFi transactions, counterparties are either 1) Smart Contracts, or 2) Wallets

Counterparties in DeFi

While every financial transaction has a counterparty, not all transactions have the same "types" of counterparties. This is especially true for DeFi, where a smart contract typically acts as a counterparty in a transaction (i.e. trading against a liquidity pool).

  • Wallets
  • Smart Contracts (i.e., liquidity pools)

Liquidity Pool Counterparty

The most common use case for smart contract counterparties are liquidity pools. Let's take Automated Market Makers ("AMM") as an example. AMMs store tokens in smart contracts to guarantee liquidity for traders at certain prices. This means traders will literally trade against a smart contract’s automated code. This is considered a strong use case for blockchains as all functionality is open source and verifiable, creating trustlesss “counterparties” that can perform transactions.


Let's say there is a liquidity pool on Curve. Trader X wants to buy 5,000 for 5,000 (assuming no slippage & a price of 1.00) Trader X would initialize the trade against the liquidity pool, selling 5,000 into the smart contract and receiving 5,000 in return. During this transaction, Trader X assumes the counterparty risk of the smart contract liquidity pool that received the and returned the


As described in Safe Pools, smart contracts that act as counterparties need to be whitelisted before Safe Tokens can trade in them. This ensures that Safe Tokens are always trading in the safest environment possible, ideally against smart contracts that have been battle-tested, have undergone several audits, and pride themselves on robust security practices.