Lifecycle of bridging session

The role Socket's off-chain and on-chain components play in a bridging transaction
  • User fetches quote for moving Token A on Chain X to Token B on Chain Y. After receiving a few routes as options, the user chooses the option that suits them and proceeds to bridge.
  • Next, the user requests transaction data for the first step of route. If an approval transaction for Socket contracts is needed before this first step, it will be highlighted in the response.
  • Then the user makes the transaction and UI needs to check for its status. The first transaction in the route (discounting approval tx) is the Swap + Bridge transaction. In Single Transaction Bridging, there’s only one step involved while bridging. But in Multi Transaction Bridging, multiple steps are involved.
  • In the case of multi-transaction bridging, after initiating a bridging transaction, the user fetches the transaction data for the next transaction (generally, swap on destination or claim on destination) and calls status API. When the status API returns “READY” status, the next transaction can be performed.
  • After performing the last tx, the status API returns “COMPLETED” for route. This implies recipient has received funds on destination chain.