# How it works

DIVA Protocol acts as a **programmatic escrow** that receives and securely holds funds from users participating in a derivative contract and releases them based on the outcome of a pre-agreed future event, reported by an [oracle ](https://docs.divaprotocol.io/introduction/what-is-diva-protocol/how-it-works/oracles)following expiration.

Upon depositing funds, participants receive ERC20 tokens, referred to as **long and short positions**. These tokens represent **contingent claims** against the funds held in the programmatic escrow, also referred to as the "contingent pool" or simply "pool". Through these positions, each party is exposed to either the <mark style="color:green;">upside</mark> (via the <mark style="color:green;">long</mark> position) or the <mark style="color:red;">downside</mark> (via the <mark style="color:red;">short</mark> position) of the underlying metric.&#x20;

The **payoffs of long and short positions are zero-sum** meaning that for every unit of collateral that the long position may gain, the short position will lose and vice versa. By holding both the short and long position tokens, users are fully hedged, representing a claim against the deposited funds.
