Settlement
Trade conclusion and settlement or payoff.
Settlement Process Overview:
The settlement process ensures fair resolution for all hedging options, including call options, put options, and swaps. It encompasses several key steps:
Value Calculation: The value of the underlying asset is calculated using the
getUnderlyingValue
function, providing the asset's value in quote currency.Strike Value: The writer sets the strike value at the hedge initiation, determining the exercise price. The start value is recorded when the hedge begins.
Premium: For call and put options, the premium is the cost paid in the quote currency. In swaps, the entire start value acts as collateral instead of a premium.
Payoff Calculation: The payoff is the difference between the market value and the strike value, paid out in base tokens or quote currency.
Immediate Impact: Losses are immediately debited from withdrawn funds, while profits are credited directly to the deposited balance.
Collateral Restoration: Initial funds for both parties are restored by moving funds from locked-in use to deposit, reversing the creation or buying process.
Fee Collection: Fees are collected in quote tokens if option and swap payoffs were done in quote tokens. Fees are collected in base tokens if option and swap payoffs were done in base tokens.
Miner Settlement: Miners can settle deals after expiry by staking tokens, choosing deals and amounts to mine, avoiding unwanted tokens as rewards.
Wallet Logging: Each wallet logs each token interacted with to allow for comprehensive balance valuations during settlement.
Protocol Revenues: Protocol revenues are stored under userBalanceMap[address(this)], manually withdrawn, and sent to the staking wallet for financial sustainability.
Option Handling: Takers can settle or exercise open call and put options before expiry. After expiry, options are deleted and taxed. Both parties can settle equity swaps, but only after expiry.
Conditions and Rules:
Settlement Authority: Call and put options can only be settled by miners or the taker.
Expiry Handling: Only the taker can settle before expiry; after expiry, the option is deleted.
Swap Settlement: Swaps require fast settlement after expiry and can be settled by the miner or any involved party.
Expedited Settlement: If a hedge has Zap request consensus on expedited settlement, the expiry date is updated to now.
Collateral Shortfall: If the loser lacks collateral to pay the winner, all the loser's collateral is used for the payoff.
Put Option Caution: Takers must exercise put options while the owner's collateral still covers the payoff.
Remaining Value: After deducting the payoff from the loser's collateral, any remaining value is restored to the loser.
Market Over Strike: For call options, if the market value is above the strike value plus cost, the taker profits.
Below Strike: For put options, if the market value is below the strike value minus cost, the taker profits.
Swap Gains: For swaps, if the market value exceeds the start value, the taker profits in base tokens.
Swap Losses: If the market value is below the start value, the writer profits in quote tokens.
Profit Logging: Profits are logged to track performance and ensure transparent reporting.
Mining Flexibility: Miners select deals and tokens for rewards, optimizing their gains and avoiding unwanted tokens.
Fee Distribution: Fees collected are distributed to staking contracts, rewarding protocol participants.
Protocol Sustainability: Revenue management ensures long-term protocol sustainability and participant rewards.
This detailed yet concise overview provides a clear understanding of the settlement process, ensuring fairness and transparency for all parties involved.
Last updated