sarvad.base.eth pfp
sarvad.base.eth
@sarvadshetty.eth
Introducing Permissionless Swap What if the sequencer was down, or was blocking you from interacting with a token via a swap etc (take the soneium example for instance), over the weekend @chomu and I worked on a public good that lets you swap ETH with a L2 token directly from mainnet in a permission less manner.
2 replies
1 recast
3 reactions

sarvad.base.eth pfp
sarvad.base.eth
@sarvadshetty.eth
How does this work? Every standard L2 which is built on top of OP stack chain has the ability to force a transaction via the “depositTransaction” function in the OptimismPortal contract, this essentially lets you force a txn from L1 to bypass sequencer censorship
1 reply
0 recast
1 reaction

sarvad.base.eth pfp
sarvad.base.eth
@sarvadshetty.eth
We first start by receiving a quote using Uniswap’s QuoterV2 contract to displaying the amountOut value during a swap and parallely construct the calldata via Uniswap’s SwapRouter contract needed to be executed on the L2 after the deposit has been successfully done After that you craft the “depositTransaction” txn to be executed in L1 and execute it calling the L1 contract (OptimismPortal) for the particular L2 rollup
1 reply
0 recast
1 reaction