GP 20: Migrate BOB pool to USDC on Optimism
Last updated
Last updated
The proposal was confirmed and executed.
Optimism Safe Transactions and
Optimism txs:
16:
17:
Following the successful transition from BOB to USDC on Polygon, this proposal replaces the underlying token from BOB to for the zkBob pool on Optimism.
The migration replaces the zkBob pool implementation to the new contract and the Direct Deposit Queue implementation to . To allow further swaps of USDC to ETH as part of withdrawals, the Token Seller contract is replaced by .
During proposal execution all BOB owned by the zkBob pool contract is swapped to USDC using UniswapV3. The amount of BOB tokens paid as fees on Uniswap will be reimbursed with the corresponding amount of USDC from the Governance Safe account. The logic of the tokens swap is defined in the pool method.
To avoid undesirable interactions with the zkBob pool prior to the migration the proposal consists of two steps:
Step 1: Disable direct deposits
Transaction in the Safe on Optimism contains two setLimits
calls to disallow users to transfer tokens directly to the pool by setting limits for tier 0 and 1 to zero for direct deposits. New interim limits are:
Default, id 0
10,000 BOB
10,000 BOB
300,000 BOB
300,000 BOB
10,000,000 BOB
0 BOB
0 BOB
Partners, id 1
100,000 BOB
100,000 BOB
300,000 BOB
300,000 BOB
10,000,000 BOB
0 BOB
0 BOB
This step is executed 20 minutes prior to step 2.
Step 2: Migrate the pool from BOB to USDC
Upgrade the pool implementation with the upgradeToAndCall
method. The method migrationToUSDC()
(selector c4a688b8
) is invoked after the upgrade.
Configure new Token Seller contract on the pool by setTokenSeller
.
The remaining two calls invoke setLimits
for tier 0 and 1 users. The reinstated limits are:
Default, id 0
10,000 USDC
10,000 USDC
300,000 USDC
300,000 USDC
10,000,000 USDC
1,000 USDC
10,000 USDC
Partners, id 1
100,000 USDC
100,000 USDC
300,000 USDC
300,000 USDC
10,000,000 USDC
1,000 USDC
10,000 USDC
forge test --match-path ./script/scripts/VerifySafeTx_Gov44.t.sol --ffi -vvvv
Make sure jq
CLI is installed
Transaction in the Safe executes the following calls:
Increase allowance of the pool contract to transfer USDC from Governance Safe by approve
made to the USDC token contract .
Remove allowance of the pool contract to transfer USDC from the Governance Safe by approve
made to the USDC token contract .
Upgrade the implementation of the direct deposit queue by upgradeTo
.
The migration procedure has been verified by using .
To check the safe contract execution run the following script: