Skip to main content

BalancerPCVDepositBase

Functions

constructor

function constructor(
address _core,
address _vault,
address _rewards,
bytes32 _poolId,
uint256 _maximumSlippageBasisPoints
) internal

Balancer PCV Deposit constructor

Parameters

NameTypeDescription
_coreaddressFei Core for reference
_vaultaddressBalancer vault
_rewardsaddressBalancer rewards (the MerkleOrchard)
_poolIdbytes32Balancer poolId to deposit in
_maximumSlippageBasisPointsuint256Maximum slippage basis points when depositing

receive

function receive() external

wrapETH

function wrapETH() external

Wraps all ETH held by the contract to WETH Anyone can call it. Balancer uses WETH in its pools, and not ETH.

unwrapETH

function unwrapETH() external

unwrap WETH on the contract, for instance before sending to another PCVDeposit that needs pure ETH. Balancer uses WETH in its pools, and not ETH.

setMaximumSlippage

function setMaximumSlippage(
uint256 _maximumSlippageBasisPoints
) external

Sets the maximum slippage vs 1:1 price accepted during withdraw.

Parameters

NameTypeDescription
_maximumSlippageBasisPointsuint256the maximum slippage expressed in basis points (1/10_000)

exitPool

function exitPool(
address _to
) external

redeeem all assets from LP pool

Parameters

NameTypeDescription
_toaddressaddress to send underlying tokens to

claimRewards

function claimRewards(
uint256 distributionId,
uint256 amount,
bytes32[] merkleProof
) external

claim BAL rewards associated to this PCV Deposit. Note that if dual incentives are active, this will only claim BAL rewards. For more context, see the following links :

Parameters

NameTypeDescription
distributionIduint256
amountuint256
merkleProofbytes32[]

Events

UpdateMaximumSlippage

event UpdateMaximumSlippage(
uint256 maximumSlippageBasisPoints
)

Parameters

NameTypeDescription
maximumSlippageBasisPointsuint256

ClaimRewards

event ClaimRewards(
address _caller,
address _token,
address _to,
uint256 _amount
)

event generated when rewards are claimed

Parameters

NameTypeDescription
_calleraddress
_tokenaddress
_toaddress
_amountuint256

ExitPool

event ExitPool(
bytes32 _poodId,
address _to,
uint256 _bptAmount
)

Parameters

NameTypeDescription
_poodIdbytes32
_toaddress
_bptAmountuint256