-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L2 direct bridging #792
L2 direct bridging #792
Commits on Feb 28, 2024
-
Draft implementation of the
L2BitcoinDepositor
contractHere we present a draft implementation of the `L2BitcoinDepositor` contract that acts as an entrypoint of the tBTC direct bridging feature on the given L2 chain. This contract exposes the `initializeDeposit` function that takes the deposit data (funding tx, reveal info, original depositor) and relays it to the `L1BitcoinDepositor` contract using the Wormhole Relayer infrastructure.
Configuration menu - View commit details
-
Copy full SHA for 970fed2 - Browse repository at this point
Copy the full SHA 970fed2View commit details -
Draft implementation of the
L1BitcoinDepositor
contractHere we present a draft implementation of the `L1BitcoinDepositor` contract that acts as the central point of the tBTC direct bridging feature on the L1 Ethereum chain where TBTC minting occurs. This contract exposes the `receiveWormholeMessages` function that receives a message from `L2BitcoinDepositor` contract (using the Wormhole Relayer infrastructure), extracts deposit data from it, and initiates the deposit on the tBTC `Bridge` side. Moreover, the contract also exposes the `initializeDeposit` function directly. The goal here is to satisfy future use cases that don't rely on Wormhole Relayer for cross-chain messaging.
Configuration menu - View commit details
-
Copy full SHA for 9241003 - Browse repository at this point
Copy the full SHA 9241003View commit details -
Change
calldata
tomemory
inAbstractTBTCDepositor
contractSo far, the `_initializeDeposit` accepted `calldata` parameters. This does not work for integrator contracts that obtain deposit parameters as `memory` objects (the conversion `memory -> calldata` is not possible). To overcome this problem, we are changing parameters of `_initializeDeposit` to be `memory` as well. This is not breaking integrators that receive deposit parameters as `calldata` because the `calldata -> memory` conversion is fine.
Configuration menu - View commit details
-
Copy full SHA for df436e1 - Browse repository at this point
Copy the full SHA df436e1View commit details
Commits on Feb 29, 2024
-
Expose
tbtcToken
from theITBTCVault
interfaceThis will be useful to get TBTC token address directly from the vault contract.
Configuration menu - View commit details
-
Copy full SHA for 34971b0 - Browse repository at this point
Copy the full SHA 34971b0View commit details -
Here we implement the finalization of the deposit flow. This process is started on the `L1BitcoinDepositor` side once the tBTC `Bridge` completes minting of the TBTC token. The process consists of multiple steps: 1. The `L1BitcoinDepositor` marks the given deposit as finalized and determines the amount of TBTC minted. 2. The `L1BitcoinDepositor` initiates a Wormhole token transfer. This transfer locks minted TBTC on L1 within the Wormhole Token Bridge and unlocks Wormhole-wrapped L2 TBTC for the `L2WormholeGateway` contract. 3. The `L2BitcoinDepositor` sends the transfer VAA to `L2BitcoinDepositor`. 4. The `L2BitcoinDepositor` finalizes the transfer by calling the `L2WormholeGateway` that redeems Wormhole-wrapped L2 TBTC from the Wormhole Token Bridge and uses it to mint canonical L2 TBTC for the L2 deposit owner.
Configuration menu - View commit details
-
Copy full SHA for 5a179fd - Browse repository at this point
Copy the full SHA 5a179fdView commit details
Commits on Mar 1, 2024
-
Here we adjust the new contracts for deployment: - We are introducing the `attach*BitcoinDepositor` functions to solve the chicken & egg problem that occurs upon deployment - We are adjusting gas limits for Wormhole to real-world values - We are getting rid of cross-chain Wormhole refunds that don't work for small amounts
Configuration menu - View commit details
-
Copy full SHA for 7f81fbe - Browse repository at this point
Copy the full SHA 7f81fbeView commit details -
Here we add deployment scripts for both `L*BitcoinDepositor` contracts. We use Base as the reference chain.
Configuration menu - View commit details
-
Copy full SHA for 533e889 - Browse repository at this point
Copy the full SHA 533e889View commit details -
Deployment artifacts for Base Sepolia
We are testing the implementation by deploying it on Base Sepolia chain. Here are the relevant deployment artifacts.
Configuration menu - View commit details
-
Copy full SHA for e927830 - Browse repository at this point
Copy the full SHA e927830View commit details
Commits on Mar 4, 2024
-
Do not use Wormhole Relayer for L2 -> L1 deposit reveal
Such a deposit reveal was tested for Base -> Ethereum and turned out to be super expensive. It takes ~0,045 ETH so ~150 USD to transfer deposit data to Ethereum. This is an unacceptable cost. To overcome that problem, we are abandoning the idea of using Wormhole Relay for that in favor of our own relay bot implementation. This also makes sense as eventually, we are aiming towards using gas-less reveals on Base.
Configuration menu - View commit details
-
Copy full SHA for 4adf553 - Browse repository at this point
Copy the full SHA 4adf553View commit details -
Configuration menu - View commit details
-
Copy full SHA for 59a337f - Browse repository at this point
Copy the full SHA 59a337fView commit details
Commits on Mar 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4aa0886 - Browse repository at this point
Copy the full SHA 4aa0886View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49d2bb9 - Browse repository at this point
Copy the full SHA 49d2bb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ea028b - Browse repository at this point
Copy the full SHA 2ea028bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a3555c - Browse repository at this point
Copy the full SHA 9a3555cView commit details -
Configuration menu - View commit details
-
Copy full SHA for fa89a62 - Browse repository at this point
Copy the full SHA fa89a62View commit details -
Configuration menu - View commit details
-
Copy full SHA for fac595d - Browse repository at this point
Copy the full SHA fac595dView commit details
Commits on Mar 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 105a52d - Browse repository at this point
Copy the full SHA 105a52dView commit details
Commits on Mar 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 3fc19ad - Browse repository at this point
Copy the full SHA 3fc19adView commit details -
The OZ upgrade plugin complains about unsafe upgrade if standard versions of `IERC20` and `SafeERC20` are used.
Configuration menu - View commit details
-
Copy full SHA for ce5f849 - Browse repository at this point
Copy the full SHA ce5f849View commit details -
Add missing test scenario for
attachL1BitcoinDepositor
functionWe need to make sure only owner can call this function.
Configuration menu - View commit details
-
Copy full SHA for e902f81 - Browse repository at this point
Copy the full SHA e902f81View commit details -
Configuration menu - View commit details
-
Copy full SHA for d7c0955 - Browse repository at this point
Copy the full SHA d7c0955View commit details
Commits on Mar 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4616e6d - Browse repository at this point
Copy the full SHA 4616e6dView commit details -
Optimize the
GasReimbursement
structureIt's enough to store the `gasSpent` as `uint96` which allows us to save one storage slot. Moreover, we are increasing the default value of `initializeDepositGasOffset` to adhere to real-world gas consumption.
Configuration menu - View commit details
-
Copy full SHA for d6cabdb - Browse repository at this point
Copy the full SHA d6cabdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for f754ebc - Browse repository at this point
Copy the full SHA f754ebcView commit details -
Configuration menu - View commit details
-
Copy full SHA for a438e1a - Browse repository at this point
Copy the full SHA a438e1aView commit details
Commits on Mar 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b2d57ce - Browse repository at this point
Copy the full SHA b2d57ceView commit details