Skip to content

pol staking contracts

PolygonStrategy: POL Liquid Staking Strategy

PolygonStrategy is a staking strategy that manages multiple PolygonVault contracts by tracking the balance of each and moving tokens in and out of them.

Returns the address of the staking token (POL).

function token() public view returns (address)
Name Type Description
token address POL token address

Returns the address of the staking pool that controls this strategy.

function stakingPool() public view returns (address)
Name Type Description
stakingPool address Staking pool address

Returns the address of the Polygon stake manager contract.

function stakeManager() public view returns (address)
Name Type Description
stakeManager address Stake manager address

Returns the address of the fund flow controller contract.

function fundFlowController() public view returns (address)
Name Type Description
fundFlowController address Fund flow controller address

Returns the address of the MEV rewards pool contract.

function validatorMEVRewardsPool() public view returns (address)
Name Type Description
validatorMEVRewardsPool address MEV rewards pool address

Returns the percentage of MEV rewards validators will receive (basis points).

function validatorMEVRewardsPercentage() public view returns (uint256)
Name Type Description
validatorMEVRewardsPercentage uint256 Validator MEV rewards %

Returns the address of the vault implementation contract.

function vaultImplementation() public view returns (address)
Name Type Description
vaultImplementation address Vault implementation address

Returns the current validator removal state.

function validatorRemoval() public view returns (bool isActive, uint64 validatorId, uint128 queuedWithdrawals)
Name Type Description
isActive bool If removal is active
validatorId uint64 Validator ID
queuedWithdrawals uint128 Queued withdrawals

Returns the total number of tokens queued for deposit into vaults.

function totalQueued() public view returns (uint256)
Name Type Description
totalQueued uint256 Total queued tokens

Returns the total number of vaults currently unbonding.

function numVaultsUnbonding() public view returns (uint256)
Name Type Description
numVaultsUnbonding uint256 Number of vaults unbonding

Returns the index of validator to withdraw from on next withdrawal.

function validatorWithdrawalIndex() public view returns (uint256)
Name Type Description
validatorWithdrawalIndex uint256 Validator withdrawal index

Returns the available deposit room for this strategy.

function canDeposit() public view returns (uint256)
Name Type Description
canDeposit uint256 Available deposit room

Returns the available withdrawal room for this strategy.

function canWithdraw() public view returns (uint256)
Name Type Description
canWithdraw uint256 Available withdrawal room

Returns the total amount of deposits in this strategy.

function getTotalDeposits() public view returns (uint256)
Name Type Description
totalDeposits uint256 Total deposits

Returns the maximum that can be deposited into this strategy.

function getMaxDeposits() public view returns (uint256)
Name Type Description
maxDeposits uint256 Maximum deposits

Returns the minimum that must remain in this strategy.

function getMinDeposits() public view returns (uint256)
Name Type Description
minDeposits uint256 Minimum deposits

Returns a list of all validators.

function getValidators() external view returns (Validator[] memory)
Name Type Description
validators Validator[] List of validators

Returns a list of all vaults controlled by this contract.

function getVaults() external view returns (IPolygonVault[] memory)
Name Type Description
vaults IPolygonVault[] List of vaults

Returns the deposit change since deposits were last updated.

function getDepositChange() public view returns (int)
Name Type Description
depositChange int Change in total deposits

Returns a list of all fees and fee receivers.

function getFees() external view returns (Fee[] memory)
Name Type Description
fees Fee[] List of fees

Returns whether an account should receive validator rewards (used by the validator MEV rewards pool).

function staked(address _account) public view returns (uint256)
Name Type Description
_account address Account address
Name Type Description
staked uint256 1 if eligible, 0 otherwise

Returns the total number of active validators (used by the validator MEV rewards pool).

function totalStaked() public view returns (uint256)
Name Type Description
totalStaked uint256 Number of validators

Deposits tokens from the staking pool into this strategy.

function deposit(uint256 _amount, bytes calldata) external
Name Type Description
_amount uint256 Amount to deposit

Withdraws tokens from this strategy and sends them to staking pool.

function withdraw(uint256 _amount, bytes calldata) external
Name Type Description
_amount uint256 Amount to withdraw

Deposits queued tokens into vaults.

function depositQueuedTokens(uint256[] calldata _vaultIds, uint256[] calldata _amounts) external
Name Type Description
_vaultIds uint256[] List of vault IDs
_amounts uint256[] Amounts to deposit per vault

Unbonds token deposits in vaults.

function unbond(uint256 _toUnbond) external
Name Type Description
_toUnbond uint256 Amount to unbond

Unbonds token deposits in vaults (used to rebalance between vaults).

function forceUnbond(uint256[] calldata _vaultIds, uint256[] calldata _amounts) external
Name Type Description
_vaultIds uint256[] List of vault IDs
_amounts uint256[] Amounts to unbond per vault

Claims and withdraws tokens from vaults that are unbonded.

function unstakeClaim(uint256[] calldata _vaultIds) external
Name Type Description
_vaultIds uint256[] List of vault IDs

Updates deposit accounting and calculates fees on newly earned rewards.

function updateDeposits(bytes calldata) external returns (int256 depositChange, address[] memory receivers, uint256[] memory amounts)
Name Type Description
depositChange int256 Change in deposits since last update
receivers address[] List of fee receivers
amounts uint256[] List of fee amounts

Restakes rewards in the polygon staking contract for given vaults.

function restakeRewards(uint256[] calldata _vaultIds) external
Name Type Description
_vaultIds uint256[] List of vault IDs

Adds a new validator.

function addValidator(address _pool, address _rewardsReceiver) external
Name Type Description
_pool address Validator shares pool address
_rewardsReceiver address Validator MEV rewards receiver

Queues a validator for removal.

function queueValidatorRemoval(uint256 _validatorId) external
Name Type Description
_validatorId uint256 Validator ID

Finalizes a queued validator removal.

function finalizeValidatorRemoval() external

Upgrades vaults to a new implementation contract.

function upgradeVaults(address[] calldata _vaults, bytes[] memory _data) external
Name Type Description
_vaults address[] List of vault addresses
_data bytes[] Encoded function calls per vault

Adds a new fee.

function addFee(address _receiver, uint256 _feeBasisPoints) external
Name Type Description
_receiver address Fee receiver address
_feeBasisPoints uint256 Fee in basis points

Updates an existing fee.

function updateFee(uint256 _index, address _receiver, uint256 _feeBasisPoints) external
Name Type Description
_index uint256 Fee index
_receiver address Fee receiver address
_feeBasisPoints uint256 Fee in basis points

Sets the validator MEV rewards pool.

function setValidatorMEVRewardsPool(address _validatorMEVRewardsPool) external
Name Type Description
_validatorMEVRewardsPool address MEV rewards pool address

Sets the percentage of MEV rewards that validators receive.

function setValidatorMEVRewardsPercentage(uint256 _validatorMEVRewardsPercentage) external
Name Type Description
_validatorMEVRewardsPercentage uint256 Validator MEV rewards %

Sets a new vault implementation contract to be used when deploying/upgrading vaults.

function setVaultImplementation(address _vaultImplementation) external
Name Type Description
_vaultImplementation address Vault implementation address

Sets the fund flow controller.

function setFundFlowController(address _fundFlowController) external
Name Type Description
_fundFlowController address Fund flow controller address