From b2e11a42ba2a367af77c9c66d86452e5860ba72c Mon Sep 17 00:00:00 2001 From: Ermyas Abebe Date: Wed, 20 Mar 2024 19:46:37 +1100 Subject: [PATCH 1/3] Update flow rate parameters --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4ab5e90a..5e06dcf6 100644 --- a/README.md +++ b/README.md @@ -177,13 +177,13 @@ Below are the [flow rate](https://github.com/immutable/zkevm-bridge-contracts/bl | Token | Units | Capacity | Refill Rate | Large Transfer Threshold | |-----------------------------------------------------------------------------------------------------|:------|------------|-------------|--------------------------| -| ETH | 10^18 | 10.08 | 0.0028 | 5.04 | -| [IMX](https://etherscan.io/token/0xf57e7e7c23978c3caec3c3548e3d615c346e79f) | 10^18 | 10,008 | 2.78 | 5,004 | -| [USDC](https://etherscan.io/token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) | 10^6 | 20,016 | 5.56 | 10,008 | -| [USDT](https://etherscan.io/token/0xdAC17F958D2ee523a2206206994597C13D831ec7) | 10^6 | 20,000 | 5.56 | 10,000 | -| [wBTC](https://etherscan.io/token/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599) | 10^8 | 0.470 | 0.000131 | 0.235 | -| [Gods Unchained (GODS)](https://etherscan.io/address/0xccC8cb5229B0ac8069C51fd58367Fd1e622aFD97) | 10^18 | 69,108.50 | 19.20 | 34,554.25 | -| [Guild of Guardians (GOG)](https://etherscan.io/address/0x9AB7bb7FdC60f4357ECFef43986818A2A3569c62) | 10^18 | 119,118.52 | 33.09 | 59,559.26 | +| ETH | 10^18 | 29.13 | 0.0081 | 23.18 | +| [USDC](https://etherscan.io/token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) | 10^6 | 93,000 | 25.83 | 74,000 | +| [USDT](https://etherscan.io/token/0xdAC17F958D2ee523a2206206994597C13D831ec7) | 10^6 | 93,027 | 25.84 | 74,022 | +| [IMX](https://etherscan.io/token/0xf57e7e7c23978c3caec3c3548e3d615c346e79f) | 10^18 | 35,755 | 9.93 | 28,450 | +| [wBTC](https://etherscan.io/token/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599) | 10^8 | 1.49 | 0.0004 | 1.18 | +| [Gods Unchained (GODS)](https://etherscan.io/address/0xccC8cb5229B0ac8069C51fd58367Fd1e622aFD97) | 10^18 | 296,556 | 82.37 | 235,969.39 | +| [Guild of Guardians (GOG)](https://etherscan.io/address/0x9AB7bb7FdC60f4357ECFef43986818A2A3569c62) | 10^18 | 670,995.67 | 186.38 | 533,910.53 | **Testnet** @@ -193,6 +193,5 @@ Below are the [flow rate](https://github.com/immutable/zkevm-bridge-contracts/bl | [IMX](https://sepolia.etherscan.io/address/0xe2629e08f4125d14e446660028bd98ee60ee69ff) | 10^18 | 68,976 | 19.16 | 34,488 | - ## Audits The Immutable token bridge has been audited by [Trail of Bits](https://www.trailofbits.com/). The audit report can be found [here](./audits/Trail-of-Bits-2023-12-14.pdf). From e4f2e1c558da45586b72bb2fc1544ff4ff6ab410 Mon Sep 17 00:00:00 2001 From: Ermyas Abebe Date: Wed, 20 Mar 2024 21:55:02 +1100 Subject: [PATCH 2/3] Fix failing fork test --- test/fork/root/RootERC20BridgeFlowRate.t.sol | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/fork/root/RootERC20BridgeFlowRate.t.sol b/test/fork/root/RootERC20BridgeFlowRate.t.sol index ca5b409e..6089d6f5 100644 --- a/test/fork/root/RootERC20BridgeFlowRate.t.sol +++ b/test/fork/root/RootERC20BridgeFlowRate.t.sol @@ -223,13 +223,16 @@ contract RootERC20BridgeFlowRateForkTest is Test, Utils { uint256 largeTransferThreshold = bridge.largeTransferThresholds(token); uint256 totalWithdrawals; uint256 amount; - while (depth > 0) { + // There could be scenarios where depth is already 0 but the withdrawal queue is not activated. + // For instance, when the global queue was activated in the past and then manually deactivated. + // Hence, a do-while loop is used to ensure that at least one withdrawal transaction is sent before checking the depth. + do { amount = depth > largeTransferThreshold ? largeTransferThreshold - 1 : depth + 1; _giveBridgeFunds(address(bridge), token, amount); _sendWithdrawalMessage(bridge, token, withdrawer, amount); (, depth,,) = bridge.flowRateBuckets(token); totalWithdrawals += amount; - } + } while (depth > 0); assertTrue(bridge.withdrawalQueueActivated()); _verifyWithdrawalWasQueued(bridge, token, withdrawer, amount); From c53740d3b3baf7aa2a14866e5a271b82c14b9c5b Mon Sep 17 00:00:00 2001 From: Ermyas Abebe Date: Wed, 20 Mar 2024 22:13:21 +1100 Subject: [PATCH 3/3] Fix broken IMX token link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e06dcf6..c650a66d 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ Below are the [flow rate](https://github.com/immutable/zkevm-bridge-contracts/bl | ETH | 10^18 | 29.13 | 0.0081 | 23.18 | | [USDC](https://etherscan.io/token/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) | 10^6 | 93,000 | 25.83 | 74,000 | | [USDT](https://etherscan.io/token/0xdAC17F958D2ee523a2206206994597C13D831ec7) | 10^6 | 93,027 | 25.84 | 74,022 | -| [IMX](https://etherscan.io/token/0xf57e7e7c23978c3caec3c3548e3d615c346e79f) | 10^18 | 35,755 | 9.93 | 28,450 | +| [IMX](https://etherscan.io/token/0xf57e7e7c23978c3caec3c3548e3d615c346e79ff) | 10^18 | 35,755 | 9.93 | 28,450 | | [wBTC](https://etherscan.io/token/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599) | 10^8 | 1.49 | 0.0004 | 1.18 | | [Gods Unchained (GODS)](https://etherscan.io/address/0xccC8cb5229B0ac8069C51fd58367Fd1e622aFD97) | 10^18 | 296,556 | 82.37 | 235,969.39 | | [Guild of Guardians (GOG)](https://etherscan.io/address/0x9AB7bb7FdC60f4357ECFef43986818A2A3569c62) | 10^18 | 670,995.67 | 186.38 | 533,910.53 |