Zap

Instant settlement, skip the wait.

Once a trade is running it can't be cancelled. Traders have to wait for expiry date or settlement date. Traders additionally have the option to expedite settlement provided both parties agree to it.

This is called zapping, and sending a request to the other party is a zapRequest.

Rules:

  • One party has to send a zapRequest to the other party

  • Either party in the trade can initiate request

  • The other party, recipient of the request will see this appear on the deal page, and has option to accept or reject the request.

  • Once rejected that request is archived, but the requester is not limited from sending more requests.

  • If parties agree on settling as things stand, then the trade is marked as zap-consented making it available for settlement immediately.

  • Settlement is still executed under the same rules as it would have if parties waited for expiration date (equity swaps) or chosen to exercise the option. It is just now settled based on current underlying values.

Implications of Zap Requests:

Once a Zap Request is accepted, it has full consent status, and the expiry date on the deal or hedge is updated to now. This applies for all hedges, with different consequences on each.

Zap Effect on Options

  • Expiry date on the hedge is updated to now, meaning that Taker loses right to exercise the trade.

  • Writer gains the right to delete or cancel the un-exercised option.

  • Writer will incur a fee for deleting a hedge after, paid in underlying token.

Zap Effect on Equity Swaps

  • Expiry date on the hedge is updated to now, meaning that both parties can now settle the trade now.

  • A miner can also now settle it once expiry is passed, as speed of settlement matters in swaps.

zapRequest function

Shared by both parties, flags intent only.

This function checks is the requesting address matches either the hedge.owner or hedge.taker address. If its either party then they can update the request storage in the hedge struct.

hedge.zapWriter bool is set to true for the writer.

hedge.zapTaker bool is set to true for the taker.

Once flagged they cannot be unflagged. This is a once off event for every trade.

hedge.expiry is then updated to block.timestamp

If all conditions are met then zapRequested event is fired.

Last updated

Logo

Xeon Protocol © 2024