Comment on page
GP 14: Migrate BOB pool to USDC on Polygon
The proposal was confirmed and executed.
The migration will replace the zkBob pool implementation to the new contract
0x5e93FA8819Bc074C717a92240a1689D1B81aAFcdand the Direct Deposit Queue implementation to
0x22299414E9e0E7663f8977a7EA6c1908F2167181. To allow further swaps of USDC to MATIC as part of the withdrawal process the Token Seller contract will be replaced by
All BOB owned by the zkBob pool contract will be swapped to USDC using BobSwap. The amount of BOB tokens paid as fees on BobSwap will be reimbursed with the corresponding amount of USDC from the Governance Safe account. The logic of the tokens swap is defined in the migrationToUSDC() method of the pool.
To avoid undesirable interactions with the zkBob pool before the migration the proposal consists of two steps:
Step 1: Disable direct deposits
Transaction #32 in the Safe on Polygon contains two three
setLimitscalls to disallow users from transfering tokens directly to the pool by setting limits for tier 0, 1 and 254 to zero for direct deposits. Interim limits are set to the following values:
Step 1 is executed 15 minutes prior to step 2.
Step 2: Migrate the pool from BOB to USDC
- upgrade the pool implementation with
upgradeToAndCall. The method
c4a688b8) is invoked after the upgrade.
- configure new Token Seller contract on the pool using
- the remaining three calls invoke
setLimitscorresponding to tiers 0, 1 and 254. The recovered limits are:
Another script verifies the correctness of the Safe transactions execution. The script could be placed to
script/scriptsdirectory of the zkBob contracts repo. The command to run the script is
forge script -vvv -rpc-url <https://rpc.ankr.com/polygon> script/scripts/BOBPoolMigrationVerification.s.sol