# \[BIP-509\] Wire Up Batch Relayer V6

**URL:** <https://forum.balancer.fi/t/bip-509-wire-up-batch-relayer-v6/5358>\
**Category:** General Proposal\
**Created:** [November 22, 2023, 8:53am UTC](https://forum.balancer.fi/t/bip-509-wire-up-batch-relayer-v6/5358 "2023-11-22T08:53:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gosuto](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.balancer.fi/gosuto/32/2014_2.png) [@gosuto](https://forum.balancer.fi/u/gosuto)\
**Post date:** [November 22, 2023, 8:53am UTC](https://forum.balancer.fi/t/bip-509-wire-up-batch-relayer-v6/5358/1 "2023-11-22T08:53:16Z")

</div>

# BIP-509: Wire Up Batch Relayer V6

### PR with Payload

> <https://github.com/BalancerMaxis/multisig-ops/pull/637>
>
> \- https://forum.balancer.fi/t/rfc-wire-up-batch-relayer-v6/5358
> \- used \[action-…scripts/gen\_add\_permissions\_payload.py\](action-scripts/gen\_add\_permissions\_payload.py) to generate payloads for all chains
> \- script configuration can be found in \[BIPs/00proposed/BIP-XXX/2023-11-21.json\](BIPs/00proposed/BIP-XXX/2023-11-21.json):
> - allow the new batch relayer to call the necessary functions on the vault (\`exitPool\`, \`joinPool\`, \`batchSwap\`, \`manageUserBalance\`, \`setRelayerApproval\`, \`swap\`)

## TL;DR

More than six months after [BIP-216](https://forum.balancer.fi/t/bip-216-add-permissions-for-batch-relayer-v5-second-attempt/4534) (batch relayer v5), the last day of October saw the deployment of the newest batch relayer: v6 ([changelog](https://forum.balancer.fi/t/bip-216-add-permissions-for-batch-relayer-v5-second-attempt/4534)).

This BIP proposes to give it the necessary permissions on all chains it was deployed on, except for BSC and the testnets.

## Specification

Payloads were generated by passing [this config](https://github.com/BalancerMaxis/multisig-ops/blob/df1a2cf41d75aa9fd11c33ae673b222ce42c651c/BIPs/00batched/2023-W47/BIP-XXX/2023-11-21.json) to [the same script](https://github.com/BalancerMaxis/multisig-ops/blob/df1a2cf41d75aa9fd11c33ae673b222ce42c651c/action-scripts/gen_add_permissions_payload.py) as for BIP-216.

Here is a detailed overview of the permissions that are being granted to the relayer:

| function | description |
| --- | --- |
| `exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))` | Allow a relayer to remove liquidity from a pool on the user’s behalf. [Relayer permissions notes](https://github.com/BalancerMaxis/multisig-ops/blob/main/docs/Authorizer/vault_permissions.md) |
| `joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))` | Allow a relayer to add liquidity to a pool on the user’s behalf. [Relayer permissions notes](https://github.com/BalancerMaxis/multisig-ops/blob/main/docs/Authorizer/vault_permissions.md) |
| `batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)` | Allow a relayer to make a multihop trade or source liquidity from multiple pools on a users behalf. [Relayer permissions notes](https://github.com/BalancerMaxis/multisig-ops/blob/main/docs/Authorizer/vault_permissions.md) |
| `manageUserBalance((uint8,address,uint256,address,address)[])` | Utilize existing Vault allowances and internal balances so that a user does not have to re-approve the new relayer for each token. [Relayer permissions notes](https://github.com/BalancerMaxis/multisig-ops/blob/main/docs/Authorizer/vault_permissions.md) |
| `setRelayerApproval(address,address,bool)` | Approve the relayer on the user’s behalf (user must still provide a signed message). [Relayer permissions notes](https://github.com/BalancerMaxis/multisig-ops/blob/main/docs/Authorizer/vault_permissions.md) |
| `swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)` | Allow a relayer to trade within a single pool on the user’s behalf. [Relayer permissions notes](https://github.com/BalancerMaxis/multisig-ops/blob/main/docs/Authorizer/vault_permissions.md) |

More output files can be found in this dir: [BIPS/00batched/2023-W47/BIP-XXX/](https://github.com/BalancerMaxis/multisig-ops/tree/df1a2cf41d75aa9fd11c33ae673b222ce42c651c/BIPs/00batched/2023-W47/BIP-XXX)

---

<div class="post-metadata">

**Author:** ![Xeonus](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.balancer.fi/xeonus/32/3621_2.png) [@Xeonus](https://forum.balancer.fi/u/Xeonus)\
**Post date:** [December 14, 2023, 8:18pm UTC](https://forum.balancer.fi/t/bip-509-wire-up-batch-relayer-v6/5358/2 "2023-12-14T20:18:39Z")

</div>

The batch relayer has been reviewed by certora and we got the green light from the SC team to go to governance: [https://snapshot.org/#/balancer.eth/proposal/0xd69a1a1096d234c91df484276a2230e3629a0725d5e5fc59785bd2f0fb8b152f](https://snapshot.org/#/balancer.eth/proposal/0xd69a1a1096d234c91df484276a2230e3629a0725d5e5fc59785bd2f0fb8b152f)
