zkEVM: Balancer Gauges
scripts/zkevm/deployBalancerPlugin.js
This script will deploy a factory that can deploy plugins for Balancer gauges on Polygon zkEVM.
Plugin Factory: contracts\plugins\zkevm\BPTGaugePluginFactory.sol
IMPORTANT NOTICE
These plugins are not audited. It is recommended to get them audited if you plan to use them in production.
Plugin Description
This plugin is made for Balancer BPT tokens that have gauges. Use the Factory to create the plugins with the following parameters.
_bpt
Address of the Balancer BPT. Example. Address of the WETH-wstETH BPT:
_balGauge
The address of the Balancer Gauge for the BPT. Example: For the WETH-wstETH BPT the gauge address is:
_tokensInUnderlying
Array of addresses of the underlying tokens in the Balancer BPT. Example. The underlying tokens of the WETH-wstETH BPT are WETH and wstETH:
_bribeTokens
Array of addresses of the Balancer Gauge reward tokens. Example. The gauge reward tokens for the WETH-wstETH BPT Gauge are USDC and MATIC:
IMPORTANT NOTICE
A reward token should never be the same as underlying, things will break.
_symbol
The desired symbol for this plugin. Example. The symbol for the WETH-wstETH BPT Gauge could be:
Plugin Logic
depositFor
User deposits BPT in plugin
Plugin deposits BPT in Balancer gauge
withdrawTo
Plugin withdraws BPT from Balancer gauge
Plugin withdraws BPT to user
claimAndDistribute
BPT deposited in the Balancer gauge earn gauge rewards
If reward token is BAL, claim reward from Balancer minter
If reward token is not BAL, claim reward from Balancer gauge
Rewards sent to bribe contract for voters
Refer to the Test Plugins deployment instructions for deploying this plugin factory
Last updated