Learn
Ethereum

Balancer on Ethereum

Deployments

NameAddress
Vault0xBA12222222228d8Ba445958a75a0704d566BF2C8 (opens in a new tab)
Relayer0x35Cea9e57A393ac66Aaa7E25C391D52C74B5648f (opens in a new tab)
BalancerMinter0x239e55F427D44C3cc793f49bFB507ebe76638a2b (opens in a new tab)
BAL0xba100000625a3754423978a60c9317c58a424e3D (opens in a new tab)
B-80BAL-20WETH0x5c6Ee304399DBdB9C8Ef030aB642B10820DB8F56 (opens in a new tab)
veBAL0xC128a9954e6c874eA3d62ce62B468bA073093F25 (opens in a new tab)
FeeDistributor0xD3cf852898b21fc233251427c2DC93d3d604F3BB (opens in a new tab)

Action: deposit

Parameters

NameTypeDescription
targetsstring[] (required)Pool name | Pool bpt | Pool id
tokensstring[] (optional)Token symbol | Token address

For each Balancer pool we allow specifying the deposit targets using any of the following identifiers:

  • BPT symbol (Pool name).
  • BPT address (Pool bpt).
  • Balancer pool ID (Pool id).

TARGET_BPT below refers to the address of BPT (Balancer Pool Token).

TARGET_ID below refers to the Balancer pool ID.

TARGET_GAUGE below refers to the BalancerGaugeDeposit contract address for the target Balancer pool.

TOKEN below refers to the ERC-20 token address of each element given in tokens. If tokens is not specified then the pool tokens of each TARGET are considered.

TOKEN · approve

Approve Vault to spend TOKEN tokens on behalf of the avatar.

  • Contract: TOKEN

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal to Vault
    amount-

Vault · joinPool

Deposit TOKEN tokens to the corresponding Balancer pool and receive TARGET_BPT tokens in exchange.

  • Contract: Vault

  • Function: joinPool(bytes32,address,address,(address[],uint256[],bytes,bool)) Ξ allow sending ETH

    ParameterConstraint
    poolIdequal to TARGET_ID
    senderequal to AVATAR
    recipientequal to AVATAR
    request.assets-
    request.maxAmountsIn-
    request.userData-
    request.fromInternalBalance-

Vault · exitPool

Redeem TARGET_BPT tokens to the corresponding Balancer pool and receive TOKEN tokens in exchange.

  • Contract: Vault

  • Function: exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))

    ParameterConstraint
    poolIdequal to TARGET_ID
    senderequal to AVATAR
    recipientequal to AVATAR
    request.assets-
    request.minAmountsOut-
    request.userData-
    request.toInternalBalance-

Action: stake

Parameters:

NameTypeConstraint
targetsstring[] (required)Pool name | Pool bpt | Pool id

For each Balancer pool we allow specifying the stake targets using any of the following identifiers:

  • BPT symbol (Pool name).
  • BPT address (Pool bpt).
  • Balancer pool ID (Pool id).

TARGET_BPT below refers to the address of BPT (Balancer Pool Token).

TARGET_ID below refers to the Balancer pool ID.

TARGET_GAUGE below refers to the BalancerGaugeDeposit contract address for the target Balancer pool.

TARGET_GAUGE · deposit

Stake TARGET_BPT tokens and receive TARGET_GAUGE tokens in exchange.

  • Contract: TARGET_GAUGE

  • Function: deposit(uint256)

    ParameterConstraint
    value-

TARGET_GAUGE · withdraw

Redeem TARGET_GAUGE tokens and receive TARGET_BPT tokens in exchange.

  • Contract: TARGET_GAUGE

  • Function: withdraw(uint256)

    ParameterConstraint
    value-

TARGET_GAUGE · claim_rewards

Claim Pool rewards.

  • Contract: TARGET_GAUGE

  • Function: claim_rewards()

    ParameterConstraint
    N/AN/A

BalancerMinter · mint

Mint BAL rewards for Pool.

  • Contract: BalancerMinter

  • Function: mint(address)

    ParameterConstraint
    gaugeequal to TARGET_GAUGE

Vault · setRelayerApproval

One-time (and persistent) approval of the Relayer as single-point of entry.

  • Contract: Vault

  • Function: setRelayerApproval(address,address,bool)

    ParameterConstraint
    senderequal to AVATAR
    relayerequal to Relayer
    approved-

Relayer · gaugeWithdraw

Redeem TARGET_GAUGE tokens and receive TARGET_BPT tokens in exchange.

  • Contract: Relayer

  • Function: gaugeWithdraw(address,address,address,uint256)

    ParameterConstraint
    gaugeequal to TARGET_GAUGE
    senderequal to AVATAR
    recipientequal to AVATAR
    amount-

Minter · setMinterApproval

One-time (and persistent) approval of the Relayer as single-point of entry.

  • Contract: Minter

  • Function: setMinterApproval(address,bool)

    ParameterConstraint
    minterequal to Relayer
    approval-

Relayer · gaugeClaimRewards

Claim Pool rewards.

  • Contract: Relayer

  • Function: gaugeClaimRewards(address[])

    ParameterConstraint
    gaugesequal to [TARGET_GAUGE]

Relayer · gaugeMint

Mint BAL rewards for Pool.

  • Contract: Relayer

  • Function: gaugeMint(address[],uint256)

    ParameterConstraint
    gaugesequal to [TARGET_GAUGE]
    outputReference-

Action: lock

Parameters:

N/A.

B_80BAL_20WETH_PID below refers to the Balancer 80BAL-20WETH pool ID ("0x5c6ee304399dbdb9c8ef030ab642b10820db8f56000200000000000000000014").

TOKEN below refers to the Balancer 80BAL-20WETH pool underlying token addresses (BAL and WETH).

BAL · approve

Approve Vault to spend BAL tokens on behalf of the avatar.

  • Contract: BAL

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal to Vault
    amount-

WETH · approve

Approve Vault to spend WETH tokens on behalf of the avatar.

  • Contract: WETH

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal to Vault
    amount-

B-80BAL-20WETH · approve

Approve veBAL to spend B-80BAL-20WETH tokens on behalf of the avatar.

  • Contract: B-80BAL-20WETH

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal to veBAL
    amount-

Vault · joinPool

Deposit TOKEN tokens to the corresponding Balancer pool and receive B-80BAL-20WETH tokens in exchange.

  • Contract: Vault

  • Function: joinPool(bytes32,address,address,(address[],uint256[],bytes,bool)) Ξ allow sending ETH

    ParameterConstraint
    poolIdequal to B_80BAL_20WETH_PID
    senderequal to AVATAR
    recipientequal to AVATAR
    request.assets-
    request.maxAmountsIn-
    request.userData-
    request.fromInternalBalance-

Vault · exitPool

Redeem B-80BAL-20WETH tokens to the corresponding Balancer pool and receive TOKEN tokens in exchange.

  • Contract: Vault

  • Function: exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))

    ParameterConstraint
    poolIdequal to B_80BAL_20WETH_PID
    senderequal to AVATAR
    recipientequal to AVATAR
    request.assets-
    request.minAmountsOut-
    request.userData-
    request.toInternalBalance-

veBAL · create_lock

Lock B-80BAL-20WETH tokens for a given period of time and receive veBAL tokens in exchange.

  • Contract: veBAL

  • Function: create_lock(uint256,uint256)

    ParameterConstraint
    value-
    unlock_time-

veBAL · increase_amount

Increase the amount of B-80BAL-20WETH tokens locked and receive veBAL tokens in exchange.

  • Contract: veBAL

  • Function: increase_amount(uint256)

    ParameterConstraint
    value-

veBAL · increase_unlock_time

Increase the time to unlock the B-80BAL-20WETH tokens.

  • Contract: veBAL

  • Function: increase_unlock_time(uint256)

    ParameterConstraint
    unlock_time-

FeeDistributor · claimToken

Claim a specific reward token from veBAL incentives.

  • Contract: FeeDistributor

  • Function: claimToken(address,address)

    ParameterConstraint
    userequal to AVATAR
    token-

FeeDistributor · claimTokens

Claim all reward tokens from veBAL incentives.

  • Contract: FeeDistributor

  • Function: claimTokens(address,address[])

    ParameterConstraint
    userequal to AVATAR
    token-