# Derivative contracts

Understanding the essence of DIVA Protocol
To understand DIVA Protocol, it is essential to first understand what a derivative contract is. A derivative contract is an agreement between two parties that specifies under which conditions payments shall occur. To participate, each party must deposit a specific amount of money. The payout is derived (hence the term "derivative") from the outcome of a pre-agreed future event based on a pre-defined payoff function.
The key elements of a derivative contract are illustrated below: Key elements of a derivative contract
Derivatives are widely used for speculation and hedging purposes.

### Examples

• Bet/prediction: The most basic example of a derivative contract is a bet/prediction. Alice and Bob each contribute \$100 to a pool and agree that the total amount of \$200 will be distributed based on the outcome of a tennis match between player A and player B. If player A wins, Alice will claim the entire pool while Bob receives nothing. Conversely, if player B wins, Bob will claim the entire pool, while Alice receives nothing.
• Insurance: Another example of a derivative contract is an insurance agreement. Bob pays \$100 in order to receive a payout of \$1000 in the event that his house burns down. That is, the insurance company is effectively contributing \$900 to the pool. If no fire occurs, the insurance company keeps the full \$1000, and Bob does not receive any payout.
Many other financial instruments, including options, swaps, and futures, operate based on the same fundamental principle.

### Derivative positions

Each party's position in a derivative contract is referred to as a derivative position or simply derivative. Each derivative position is associated with a payoff function which assigns a specific value to each possible outcome of the future event. The two payoff functions associated with a derivative contract follow a zero-sum principle, meaning that one party's gain is the other party's loss.
The position that is benefiting from an increase in the underlying is referred to as the long position. The position that is benefiting from a decrease in the underlying is referred to as the short position.

### Payoff functions

The payoff function can take any form or shape. In our previous example, the payoffs for Alice and Bob can be depicted as two directionally reversed binary functions, where a reported outcome of 1 or higher corresponds to a win for player A and a value less than 1 indicates a win for player B: Payoff profiles associated with Alice's and Bob's derivative positions
Another example could include using a linear function within a predefined range for non-binary underlyings such as the price of Bitcoin, as depicted below: Linear payoff example
Note that the two payoff functions are typically capped as the amount deposited into the derivative contract is capped.
One of the DIVA Protocol's distinctive features is its ability to tailor a derivative contract's underlying payoff profile, accommodating various slopes, barriers, and ranges.