👷♀
Contract Architecture
Brydge's goal is to create a seamless experience for a user to transact between protocols. In this case, we look specifically at a mechanism to allow users to purchase assets on one chain from another.
User has TokenA on ChainA and wishes to purchase an asset on ChainB from a contract that expects TokenB.
- 1.User confirms a transaction to BrydgeMultichainRouter on ChainA including a payload of desired transactions and an amount of TokenA
- 2.BrydgeMultichainRouter forwards TokenA and payload to BrydgeMultichainPortal
- 3.BrydgeMultichainPortal executes a swap via a DEX from TokenA --> USDC
- 4.BrydgeMultichainPortal sends USDC and remaining payload --> Stargate on ChainA
- 5.Stargate routes USDC and payload --> BrydgeMultichainPortal on ChainB
- 6.BrydgeMultichainPortal executes a swap via a DEX from USDC --> TokenB
- 7.BrydgeMultichainPortal executes asset purchase
- 8.BrydgeMultichainPortal forwards asset --> User on ChainB
