# Payoff curves

Payoff curves are highly customizable

In DIVA Protocol, the shape of the payoff curves is parametrized by four parameters (floor, inflection, cap, and gradient) which allows users to construct a wide range of payoff patterns for their derivative assets including binary, linear, convex, and concave patterns. Combined with the flexibility in the reference asset, this will allow the creation of unique markets that do not exist in DeFi yet. Example long and short payoff patterns are illustrated below:

Example long payoff curves

Example short payoff curves

Note that the parameters are defining the shape of the long payoff curve. The short payoff curve is implied via the relationship p(L) + p(S) = 1, where p(L) is the long token payoff and p(S) the short token payoff. Visually, the short token payoff curve is just a horizontally mirrored version of the long token payoff curve.

The payoff per long token is calculated as follows (assuming 0 fees):

if (finalReferenceValue = inflection):

payoffLong = gradient

else if (finalReferenceValue ≤ floor):

payoffLong = 0

else if (finalReferenceValue ≥ cap):

payoffLong = 1

else if (finalReferenceValue < inflection):

payoffLong = gradient * (finalReferenceValue - floor)/(inflection - floor)

else if (finalReferenceValue > inflection):

payoffLong = gradient + (1 - gradient)*(finalReferenceValue - inflection)/(cap - inflection)

As

`payoffLong + payoffShort = 1`

(ignoring fees), the short token payoff is given by `payoffShort = 1 - payoffLong.`

Last modified 1yr ago