[BIP-216] Add permissions for Batch Relayer V5 (second attempt)

Payload PR

Background on repeat governance

BIP-214 was approved by governance, but upon review, which occurred after the snapshot, was found to specify the old V4 version of the relayer in both the BIP text and the payloads.
The problem resulted the fact that there are many batch relayers with the same contract name. The script used found the most recent address of a given contract by looking through a reverse lookup table in the monorepo that was not up-to-date. The BIP-214 text specified the BalancerRelayer as the target to receive permissions, but did not include details about which deployment was listed.

The script that generates these BIPs has been updated to allow for targets to be specified as task/deployment (specified a specific version) and to print that information back out in the tables. The revised script was used to regenerate the BIP output and payloads defined below.

Background on the change

A new version of the primary relayer, BatchRelayer 5.0 deployed by task 20230314-batch-relayer-v5.
Deployment of the fifth BalancerRelayer using BatchRelayerLibrary, for combining multiple operations (swaps, joins, etc.) in a single transaction.

This new version provides full support for all versions of Stable Pools: in particular, V2 and higher, which support proportional joins and exits. It also adds support for many new protocol wrappers: CompoundV2 (Midas), Euler, Gearbox, Silo, Tetu, and Yearn as well as other new protocols that use a similar wrapper wrapper.

English Specification

The transaction details were generated by this script with inputs and outputs in this directory

The following files can be found both linked below and in the payload PR linked above:

Filename Description of Contents
inputs.json The inputs to the script mapping functions and deployments to target addresses that can execute them.
results_address_sorted.md The resulting changes printed in a table sorted by target chain and target address. (to easily understand permisisons granted)
results_deployment_sorted.md The resulting changes printed in a table sorted by target chain and target deployment. (for verification against action ids)
function_descriptions.md A table that describes what each function that is being granted privileged access to allows.
chainname.json For each change with changes, a transaction builder json named after said chain exists to apply the changes described in the tables.

In the tables above:

The “emergency” caller group:

  • maps to the Balancer Emergency DAO Multisig as defined in this vote.

The “feeManager” caller group:

  • maps to the feeManager multisig controlled by the Balancer Maxis on all chains except mainnet.
  • On mainnet a special feeSetter multisig exists to manage a-factors and a gautletFeeSetter contract that allows bulk changing of fees.
  • The maxi’s functionally control all contracts that make up the feeManager target group.

More information about the various Balancer multisigs and their functions can be found in the multisig-ops repo

Specification

As described in the payload json, the authorizer will be called to grant the roles as described.

The change can be reviewed by the below by comparing the results_deployment_sorted.md file to the source of truth, which should match the order found in the source of truth for actionIds on the balancer-v2-monorepo.

Target addresses can be verified by checking the outputs of the v5 Vault deployments here

For record, the contents of results_address_sorted.md are printed here:

deployment chain function role target target_address
20210418-vault arbitrum batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes),address,(address,bool,address,bool),int256,uint256) 0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30 20230314-batch-relayer-v5/BalancerRelayer 0x598ce0f1ab64B27256759ef99d883EE51138b9bd
20210418-vault arbitrum exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 20230314-batch-relayer-v5/BalancerRelayer 0x598ce0f1ab64B27256759ef99d883EE51138b9bd
20210418-vault arbitrum joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 20230314-batch-relayer-v5/BalancerRelayer 0x598ce0f1ab64B27256759ef99d883EE51138b9bd
20210418-vault arbitrum manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 20230314-batch-relayer-v5/BalancerRelayer 0x598ce0f1ab64B27256759ef99d883EE51138b9bd
20210418-vault arbitrum setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 20230314-batch-relayer-v5/BalancerRelayer 0x598ce0f1ab64B27256759ef99d883EE51138b9bd
20210418-vault arbitrum swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff 20230314-batch-relayer-v5/BalancerRelayer 0x598ce0f1ab64B27256759ef99d883EE51138b9bd
20210418-vault gnosis batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes),address,(address,bool,address,bool),int256,uint256) 0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30 20230314-batch-relayer-v5/BalancerRelayer 0x3536fD480CA495Ac91E698A703248A8915c137a3
20210418-vault gnosis exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 20230314-batch-relayer-v5/BalancerRelayer 0x3536fD480CA495Ac91E698A703248A8915c137a3
20210418-vault gnosis joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 20230314-batch-relayer-v5/BalancerRelayer 0x3536fD480CA495Ac91E698A703248A8915c137a3
20210418-vault gnosis manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 20230314-batch-relayer-v5/BalancerRelayer 0x3536fD480CA495Ac91E698A703248A8915c137a3
20210418-vault gnosis setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 20230314-batch-relayer-v5/BalancerRelayer 0x3536fD480CA495Ac91E698A703248A8915c137a3
20210418-vault gnosis swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff 20230314-batch-relayer-v5/BalancerRelayer 0x3536fD480CA495Ac91E698A703248A8915c137a3
20210418-vault mainnet batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes),address,(address,bool,address,bool),int256,uint256) 0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30 20230314-batch-relayer-v5/BalancerRelayer 0xfeA793Aa415061C483D2390414275AD314B3F621
20210418-vault mainnet exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 20230314-batch-relayer-v5/BalancerRelayer 0xfeA793Aa415061C483D2390414275AD314B3F621
20210418-vault mainnet joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 20230314-batch-relayer-v5/BalancerRelayer 0xfeA793Aa415061C483D2390414275AD314B3F621
20210418-vault mainnet manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 20230314-batch-relayer-v5/BalancerRelayer 0xfeA793Aa415061C483D2390414275AD314B3F621
20210418-vault mainnet setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 20230314-batch-relayer-v5/BalancerRelayer 0xfeA793Aa415061C483D2390414275AD314B3F621
20210418-vault mainnet swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff 20230314-batch-relayer-v5/BalancerRelayer 0xfeA793Aa415061C483D2390414275AD314B3F621
20210418-vault optimism batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes),address,(address,bool,address,bool),int256,uint256) 0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30 20230314-batch-relayer-v5/BalancerRelayer 0x03F1ab8b19bcE21EB06C364aEc9e40322572a1e9
20210418-vault optimism exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 20230314-batch-relayer-v5/BalancerRelayer 0x03F1ab8b19bcE21EB06C364aEc9e40322572a1e9
20210418-vault optimism joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 20230314-batch-relayer-v5/BalancerRelayer 0x03F1ab8b19bcE21EB06C364aEc9e40322572a1e9
20210418-vault optimism manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 20230314-batch-relayer-v5/BalancerRelayer 0x03F1ab8b19bcE21EB06C364aEc9e40322572a1e9
20210418-vault optimism setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 20230314-batch-relayer-v5/BalancerRelayer 0x03F1ab8b19bcE21EB06C364aEc9e40322572a1e9
20210418-vault optimism swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff 20230314-batch-relayer-v5/BalancerRelayer 0x03F1ab8b19bcE21EB06C364aEc9e40322572a1e9
20210418-vault polygon batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes),address,(address,bool,address,bool),int256,uint256) 0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30 20230314-batch-relayer-v5/BalancerRelayer 0xd18d5D377eb23362e54Fa496597d7E962d56C554
20210418-vault polygon exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 20230314-batch-relayer-v5/BalancerRelayer 0xd18d5D377eb23362e54Fa496597d7E962d56C554
20210418-vault polygon joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 20230314-batch-relayer-v5/BalancerRelayer 0xd18d5D377eb23362e54Fa496597d7E962d56C554
20210418-vault polygon manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 20230314-batch-relayer-v5/BalancerRelayer 0xd18d5D377eb23362e54Fa496597d7E962d56C554
20210418-vault polygon setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 20230314-batch-relayer-v5/BalancerRelayer 0xd18d5D377eb23362e54Fa496597d7E962d56C554
20210418-vault polygon swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff 20230314-batch-relayer-v5/BalancerRelayer 0xd18d5D377eb23362e54Fa496597d7E962d56C554

Risk Assessment

This BIP is routine operation for provisioning a contract deployment/Batch Relayer. Users must also approve BatchRelayers before they have access. More details can be found in the Special Vault Permissions Context doc.

References

Directory of Addresses used by script which generated the table and multsig payloads

3 Likes

https://snapshot.org/#/balancer.eth/proposal/0xae3eacf68b14c20d535d629db537223528c539d706f901f1cbaa58fe13f06f21