CCTP Express Architecture
Last updated
Last updated
CCTP Express adopts a Hub-and-Spoke architecture, it can be broken down into a 3-layered system: a request for quote mechanism to obtain users' bridging intent, enabling a filler network to claim and fill those orders, and lastly a settlement layer periodically repay fillers through CCTP and utilizing attestation service from Iris.
CCTP Express aligns with the industry standards, the CrossChainOrder
struct follows ERC-7683 standard.
Below is a diagram of the architecture of CCTP Express:
Order initiation
User signs an off-chain message defining the parameters of an order.
The order is disseminated to Fillers. The Filler calls initiate
on the source chain SpokePool. A CrossChainOrder
will be created and the user's funds are transferred to the SpokePool
for escrow.
The SpokePool
on source chain submits a Deposit
message to Circle's off-chain attestation service, Iris, for attestation and subsequently a DepositAttestation
will be generated.
Filler Network Fills Order
Fillers calls fillOrder
on the destination SpokePool
with their own assets which are then transferred to the user from the SpokePool
.
The SpokePool
on destination chain submits a Fill
message to Iris and a FillAttestation
will be generated.
Settlement
A permissionless Datadaemon retrieves the DepositAttestation
and FillAttestation
from Iris and relay to the Hub Pool
on the Settlement Chain.
Periodically, a permissionless Datadaemon calls repayFunds
and rebalanceFunds
at the Hub Pool
, which would collect all the attestations and perform the following steps:
Iterate through a list of attestations, a valid filled order is supported by both Deposit and Fill attestation.
Determine the aggregate settlement sum from all valid fills for each filler.
If there is sufficient fund on SpokePool
to repay filler, a repayFunds
message in the form of merkle root hash is sent to Iris.
For the remaining outstanding payment, the Hub Pool
will send a rebalanceFunds
message in the form of merkle root hash to Iris, which indicates how much a SpokePool with surplus funds would send to another pool in deficit to fulfill the need for repayment.
Once the repayFunds
and rebalanceFunds
messages got attested by Iris, they are sent to respective SpokePools. Datamaemon will call repayFunds
and rebalanceFunds
on SpokePools with merkle root hash and their respective transaction details. Accordingly, funds would be repaid to fillers and sent to other SpokePools to ensure sufficient funds for handling repayments.
Repay funds to fillers from the SpokePool on destination chain, and rebalance funds across SpokePools
on difference chains via CCTP.
Cctp Fill Settlement
In case of order initiated by Fillers not being filled, the Datadaemon can call cctpFill
and mark the order status on destination chain SpokePool
to RequestCctpFill
and block any filler from filling it. At the same time, the SpokePool
will emit a CctpFill
message to Iris for attestation.
The CctpFillAttestation
will be used to replace the FillAttestation
mentioned in 5. and allow the user fund to be transferred via the CCTP route.