Binding Facet
The Binding Facet manages two related opt-in mechanisms that allow PartyA to enter trust relationships that unlock faster trading flows.
When PartyA trades exclusively with a single PartyB, there is no cross-counterparty risk. PartyA can bind to that PartyB, removing the Muon signature checks for trading operations. PartyB can then pass values directly to contract methods without waiting for Muon signatures. PartyA can activate instant action mode to enable interaction with the Instant Layer, which allows batched, signature-based execution of operations (e.g., sendQuote → lockQuote → openPosition in a single transaction).
Overview
The Binding Facet provides the following key functionalities:
Binding to PartyB: PartyA locks itself into an exclusive relationship with a single PartyB, enabling oracle-less trading with no Muon signature overhead.
Unbinding from PartyB: A multi-step process (request → cooldown → complete) allows PartyA to exit the binding. PartyB can complete the unbinding immediately; anyone else must wait for the cooldown period.
Activating Instant Action Mode: PartyA opts in to the Instant Layer, allowing batched execution of signed operations through operators.
Deactivating Instant Action Mode: A two-step, time-delayed process (propose → wait → deactivate) ensures that deactivation cannot be used to front-run pending Instant Layer operations.
bindToPartyB()
Allows PartyA to bind to a specific PartyB, enabling oracle-less trading. Before binding, PartyA must meet the following conditions:
No pending quotes (zero pending locked balance — no quotes in PENDING, LOCKED, or CANCEL_PENDING status)
No open positions with any other PartyB (all existing positions must be with the target PartyB)
Not already bound to a PartyB
Once bound, Muon signature checks are removed for trading operations between the two parties.
Function Signature:
Parameters:
partyB: The address of the PartyB to bind to. Cannot be the zero address.
Example:
Events Emitted:
BindToPartyB(address partyB, address partyA)
requestToUnbindFromPartyB()
Initiates the unbinding process. This does not immediately break the binding — instead, it moves the binding status to PENDING_UNBIND and records the timestamp of the request.
Function Signature:
Example:
Events Emitted:
RequestToUnbindFromPartyB(address partyA)
cancelUnbindRequest()
Cancels a pending unbind request, restoring the binding status back to BOUND.
Function Signature:
Example:
Events Emitted:
CancelUnbindRequest(address partyA)
completeUnbindRequest()
Finalizes the unbinding process, severing the link between PartyA and PartyB. Access rules differ by caller: PartyB can complete the unbinding immediately (no cooldown), but everyone else including PartyA must wait until the cooldown period has passed since the unbind request.
Once complete, the binding status is reset to NOT_BOUND.
Function Signature:
Parameters:
partyA: The address of the PartyA whose unbinding should be completed.
Example:
Events Emitted:
CompleteUnbindRequest(address partyA, address caller)
activateInstantActionMode()
Enables instant action mode for PartyA, allowing their operations to be executed through the Instant Layer. Once active, PartyA can sign individual operations or delegate specific function selectors to ephemeral signers (e.g., browser-generated session keys), and operators can batch-execute these signed operations in single transactions.
Function Signature:
Modifiers:
Caller must not be a PartyB.
Instant action mode must not already be active for the caller.
PartyA actions must not be paused.
Example:
Events Emitted:
ActivateInstantActionMode(address partyA, uint256 timestamp)
proposeToDeactivateInstantActionMode()
Initiates the process to deactivate instant action mode. Deactivation cannot happen immediately to prevent PartyA from front-running pending Instant Layer operations that have already been signed.
Function Signature:
Example:
Events Emitted:
ProposeToDeactivateInstantActionMode(address partyA, uint256 timestamp)
deactivateInstantActionMode()
Completes the deactivation of instant action mode after the waiting period from the proposal has elapsed. Once deactivated, PartyA's operations can no longer be executed through the Instant Layer.
Function Signature:
Example:
Events Emitted:
DeactivateInstantActionMode(address partyA, uint256 timestamp)
Last updated

