[BIP-214] Enable Permissions for BatchRelayer v5

Payload PR - BIP-214

Background

A new version of the primary relayer, BatchRelayer 5.0.
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.

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.

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 BalancerRelayer 0x5bf3B7c14b10f16939d63Bd679264A1Aa951B4D5
20210418-vault arbitrum exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 BalancerRelayer 0x5bf3B7c14b10f16939d63Bd679264A1Aa951B4D5
20210418-vault arbitrum joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 BalancerRelayer 0x5bf3B7c14b10f16939d63Bd679264A1Aa951B4D5
20210418-vault arbitrum manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 BalancerRelayer 0x5bf3B7c14b10f16939d63Bd679264A1Aa951B4D5
20210418-vault arbitrum setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 BalancerRelayer 0x5bf3B7c14b10f16939d63Bd679264A1Aa951B4D5
20210418-vault arbitrum swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff BalancerRelayer 0x5bf3B7c14b10f16939d63Bd679264A1Aa951B4D5
20210418-vault mainnet batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes),address,(address,bool,address,bool),int256,uint256) 0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30 BalancerRelayer 0x2536dfeeCB7A0397CF98eDaDA8486254533b1aFA
20210418-vault mainnet exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 BalancerRelayer 0x2536dfeeCB7A0397CF98eDaDA8486254533b1aFA
20210418-vault mainnet joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 BalancerRelayer 0x2536dfeeCB7A0397CF98eDaDA8486254533b1aFA
20210418-vault mainnet manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 BalancerRelayer 0x2536dfeeCB7A0397CF98eDaDA8486254533b1aFA
20210418-vault mainnet setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 BalancerRelayer 0x2536dfeeCB7A0397CF98eDaDA8486254533b1aFA
20210418-vault mainnet swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff BalancerRelayer 0x2536dfeeCB7A0397CF98eDaDA8486254533b1aFA
20210418-vault optimism batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes),address,(address,bool,address,bool),int256,uint256) 0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30 BalancerRelayer 0x1a58897Ab366082028ced3740900ecBD765Af738
20210418-vault optimism exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 BalancerRelayer 0x1a58897Ab366082028ced3740900ecBD765Af738
20210418-vault optimism joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 BalancerRelayer 0x1a58897Ab366082028ced3740900ecBD765Af738
20210418-vault optimism manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 BalancerRelayer 0x1a58897Ab366082028ced3740900ecBD765Af738
20210418-vault optimism setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 BalancerRelayer 0x1a58897Ab366082028ced3740900ecBD765Af738
20210418-vault optimism swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff BalancerRelayer 0x1a58897Ab366082028ced3740900ecBD765Af738
20210418-vault polygon batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes),address,(address,bool,address,bool),int256,uint256) 0x1282ab709b2b70070f829c46bc36f76b32ad4989fecb2fcb09a1b3ce00bbfc30 BalancerRelayer 0x28A224d9d398a1eBB7BA69BCA515898966Bb1B6b
20210418-vault polygon exitPool(bytes32,address,address,(address,uint256,bytes,bool)) 0xc149e88b59429ded7f601ab52ecd62331cac006ae07c16543439ed138dcb8d34 BalancerRelayer 0x28A224d9d398a1eBB7BA69BCA515898966Bb1B6b
20210418-vault polygon joinPool(bytes32,address,address,(address,uint256,bytes,bool)) 0x78ad1b68d148c070372f8643c4648efbb63c6a8a338f3c24714868e791367653 BalancerRelayer 0x28A224d9d398a1eBB7BA69BCA515898966Bb1B6b
20210418-vault polygon manageUserBalance((uint8,address,uint256,address,address)) 0xeba777d811cd36c06d540d7ff2ed18ed042fd67bbf7c9afcf88c818c7ee6b498 BalancerRelayer 0x28A224d9d398a1eBB7BA69BCA515898966Bb1B6b
20210418-vault polygon setRelayerApproval(address,address,bool) 0x0014a06d322ff07fcc02b12f93eb77bb76e28cdee4fc0670b9dec98d24bbfec8 BalancerRelayer 0x28A224d9d398a1eBB7BA69BCA515898966Bb1B6b
20210418-vault polygon swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256) 0x7b8a1d293670124924a0f532213753b89db10bde737249d4540e9a03657d1aff BalancerRelayer 0x28A224d9d398a1eBB7BA69BCA515898966Bb1B6b

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/0xbfbc6796f9b9321b1340103718e494d469fa8aae4b6525eeaaa4c0cdf3c8b78b

While this proposal says enable permissions for BatchRelayer v5, the specification in fact grants redundant (already granted) permissions to BatchRelayer v4. For some reason the monorepo addresses.py wasn’t properly updated after v5 was deployed, but it is also fair that I did not review Tritium’s work on this before the vote started. If I had the mistake would have been quickly identified.

Given the specification for this proposal does not match the title or intention we will not be executing it.

1 Like

I’ll figure out what happened and resubmit the BIP this week if possible.

1 Like

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