GP 6: Upgrade zkBob to support direct deposits
Last updated
Last updated
Direct deposits are subject to the newly introduced limits at the time of submission
dailyUserDirectDepositCap - limit on the amount for daily direct deposits submitted by a single user
directDepositCap - limit on the amount of a single direct deposit
Each direct deposit is subject to a submission fee at the time of its submission:
directDepositFee - direct deposit fee
Each direct deposit left unprocessed by the relayer for a certain amount of time can be refunded in full by the user:
directDepositTimeout - configured direct deposit refund timeout
Upgrade existing zkBob pool with the support for direct deposits using the following configuration:
dailyUserDirectDepositCap - 10,000 BOB (18 decimals)
directDepositCap - 1,000 BOB (18 decimals)
directDepositFee - 0.1 BOB (18 decimals)
directDepositTimeout - 24 hours β 86,400 seconds
The module for direct deposits is deployed in a separate contract . It owner is configured to the governance multisig (). See for verification. The direct deposits module address is hardcoded into the new zkBob pool implementation contract proposed for upgrade.
The upgrade also adds a new snark verifier for direct deposit batch verification -
The snark verifier for transfers is redeployed to reflect changes in the transfer verification snark -
The event is emitted with the same value.
The event is emitted with the same value.
Configuration of proposed contracts can be checked using the following commands:
The snark verifier for tree updates is left unchanged and is reused from the previous deployment -
The corresponding transaction in the governance safe is . The transaction contains 3 actions:
zkBobPool contract upgrade . The new implementation is applied through the upgradeTo
call (the selector is 0x3659cfe6
).
setLimits
call (the selector is 0xe8fd02e4
) from the zkBobPool contract . The method is called to update limits related to direct deposits in tier 0
. The current limits for the tier 0
set in the pool contract are:
setLimits
call (the selector is 0xe8fd02e4
) from the zkBobPool contract . The method is called to update limits related to direct deposits in tier 1
. The current limits for the tier 1
set in the pool contract are:
Diff between previous and new implementations of ZkBobPool
- (auto-generated by )