Let's walk through how the protocol works end-to-end when Alice wants to transfer 1 ETH from Starknet to Optimism.

// steps
  1. Alice opens the Bridge dApp, connects her wallet, and selects the route from Starknet to Optimism.
  2. The dApp queries the Solver Discovery contract and retrieves addresses of all Solvers that support that route.
  3. Alice creates a commit transaction with 1 ETH in Starknet and passes the Solver addresses.
Alice's commit transaction on Starknet
  1. A Dutch Auction starts — Bob and John (Solvers) compete on price until one of them wins.
  2. Bob wins the auction and locks 1 ETH on Optimism.
Bob's lock transaction on Optimism
  1. The dApp begins local verification of the Optimism network by tracking Bob’s transaction. If a Light Client is available, it is used; otherwise, the dApp retrieves data from multiple RPC endpoints or uses the node provider specified by the user. Once detected, it retrieves the Hashlock.
Alice verify and confirms the Hashlock

At this point, there are two locks (on Starknet and Optimism) tied to the same Hashlock. The funds can be unlocked by providing a secret S that satisfies HASH(S) = Hashlock.

Unlocking funds in both chains
  1. Bob monitors the source Starknet network. Once he confirms that the commitment is locked for him and secured with his Hashlock, he reveals the secret S on both networks, claiming his funds and releasing Alice's funds.
// summary
  • process takes <30 seconds
  • users' and solvers' funds are never taken into custody
  • any network can be added, anyone can become a solver
Read the full documentation

FAQ