Payoff & Positions
Last updated
Last updated
When a market is initialized, the Market Operator selects a specific payoff function. This function defines the precise logic the smart contracts use to distribute funds between the long and short sides of the market upon settlement.
Perennial offers developers the flexibility to define virtually any payoff function they wish. This can range from simple long [asset] or 3x short [asset] markets to more complex structures like options and other exotic payoffs.
The payoff function for a given market can be any mathematical function operating on an available oracle price feed. This function also defines the nature and magnitude of exposure that one unit (1e18) of a Taker's position represents within that market.
Example Payoff Functions
3x Leveraged Ether
3 * ETH
Stork ETH Feed
Squeeth
ETH * ETH
Stork ETH Feed
ETH-USDC UniV2 LP
sqrt( ETH )
Stork ETH Feed
The payoff function for a given market can be any mathematical function operating on an available oracle price feed. This function also defines the nature and magnitude of exposure that one unit (1e18) of a Taker's position represents within that market.
In Perennial, positions are denominated in units of a payoff function, not directly in USD. This means a user's exposure is directly tied to the behavior of the chosen payoff function.
For instance, if a user wishes to open a 1 ETH long position where the market's payoff function is 1 * ETH, they would open a Taker position equivalent to 1 * market_payoff. This position would then maintain an exposure equivalent to 1 ETH until it is closed or liquidated.
Conversely, if a user aims to open a position corresponding to a specific USD amount, they must first estimate that USD value in terms of the market's underlying payoff units and then open their position accordingly. For example, if ETH is approximately $1000, and a user wants to establish a $2500 long-ETH position, they might call openTake(2.5). This action would open a position that tracks 2.5 * ETH, which would be approximately equivalent to $2500.
and (such as interest rate fees, price impact fees, and trade fees) are directly debited from or credited to a user's collateral account associated with their position.