Intents
Everclear supports the direct integration of solver networks and makes no assumptions about signaling, discovery, matching, or execution of the intent.
Lifecycle
Creation
Intents are created by calling newIntent
on the Spoke
contracts:
This method will debit funds from the caller, emit an IntentAdded
event, and insert an Intent
message into the queue.
Intent Queue Dispatch
Periodically, messages within this queue are dispatched to the clearing chain by offchain agents.
Offchain agents respect configured thresholds for queue size and age of oldest item when evaluating whether or not to dispatch messages.
Once the message arrives on the clearing chain, the intent is marked as Added
.
Intent Fulfillment
At any point after intent creation, solvers can fill the intent by calling fillIntent
on the destination Spoke
contract if they have sufficient balance stored on-chain:
Everclear makes no assumptions about solver selection or intent execution. Adding liquidity can be done at the time of intent fulfillment.
This method will debit funds from the stored balance of the caller, emit an IntentFilled
event, and insert a Fill
message into the queue.
Fill Queue Dispatch
Periodically, messages within this queue is dispatched to the clearing chain by offchain agents.
Offchain agents respect configured thresholds for queue size and age of oldest item when evaluating whether or not to dispatch messages.
Once the message arrives on the clearing chain, the intent is marked as Filled
if the Intent
message is not present. If both messages have arrived, the intent is marked as ADDED_AND_FILLED
and is enqueued for settlement.
When intents are marked for settlement, their solver has balance on the clearing chain that can be claimed on any of the supported spokes with sufficient liquidity.
Settlement Queue Dispatch
Periodically, offchain agents will dispatch the enqueued settlements. Offchain agents will by default settle to the intent's specified destination chain(s) if there is sufficient available liquidity, otherwise will settle to the solver-configured domain with the highest available liquidity.
Offchain agents respect configured thresholds for queue size and age of oldest item when evaluating whether or not to dispatch messages.
Once an intent is dispatched for settlement, it is marked as SETTLED
.
Settlement Processing
Once the dispatched settlements arrive on the spoke contracts, funds are either sent to the solver directly or their virtual balance is incremented depending on their preference.
This preference is set via the setUpdateVirtualBalance
function on the Hub
contract.
How can I reduce my settlement latency?
There is a tradeoff between batch latency and system base messaging costs. Offchain agents hosted by Everclear will be subject to configured thresholds, but solvers can always make their own cost vs. latency tradeoffs by dispatching the queues themselves and including the estimated Hyperlane fee in the msg.value
of the following functions:
Intent and Fill Queue Methods
Settlement Queue Methods
Last updated