How to end a trade
Settlement can only be done under the following conditions:
Taker exercising their right
Upon expiry of the trade
Upon both parties in the trade accepting Zap Requests
By a miner
Check settler wallet address
Check if current timestamp > expiry timestamp
Check hedge type and execute appropriate settlement calculations
Execute settlement, crediting and debiting the parties
Tax settlement value to profiteer only as settlement fee
Credit the protocol wallet and miner wallet with fees collected
Unlock collateral balances to both parties if any
Both parties will now have their collateral they used on the trade restored back into their withdraw-able balances.
They can proceed to withdraw or enter more trades with it.
Last updated 1 year ago
Was this helpful?