Vaults
Vaults are used to earn rewards. Tokens such as imUSD or Feeder Pool tokens can be deposited to earn additional MTA rewards. On Polygon the contract HeadlessRewardToken is used. This allows for accrual of 2 Rewards and does not contain the Boost functionality that is present on Ethereum Mainnet.
The Feeder Pool Vault for mUSD/FRAX has been developed by frax.finance and is not part of these docs.
The following table lays out the currently deployed vaults and what contract is used.
Polygon
Vault
Address
mUSD/FRAX Feeder Pool Vault

imUSD Vault

stake()

function stake (uint256 _amount) external
Stakes a given amount of the StakingToken for the sender
Parameter
Type
Description
_amount
uint256
Units of StakingToken

stake()

function stake (address _beneficiary, uint256 _amount) external
Stakes a given amount of the StakingToken for a given beneficiary
Parameter
Type
Description
_beneficiary
address
Staked tokens are credited to this address
_amount
uint256
Units of StakingToken

exit()

function exit () external
Withdraws stake from pool and claims any rewards

withdraw()

function withdraw (uint256 _amount) public
Withdraws given stake amount from the pool
Parameter
Type
Description
_amount
uint256
Units of the staked token to withdraw

claimReward()

function claimReward () public
Claims outstanding rewards (both platform and native) for the sender. First updates outstanding reward allocation and then transfers.

claimRewardOnly()

function claimRewardOnly () public
Claims outstanding rewards for the sender. Only the native rewards token, and not the platform rewards

getRewardToken()

function getRewardToken () external returns (contract IERC20)
Gets the RewardsToken

getPlatformToken()

function getPlatformToken () external returns (contract IERC20)
Gets the PlatformToken

lastTimeRewardApplicable()

function lastTimeRewardApplicable () public returns (uint256)
Gets the last applicable timestamp for this reward period

rewardPerToken()

function rewardPerToken () public returns (uint256, uint256)
Calculates the amount of unclaimed rewards a user has earned

earned()

function earned (address _account) public returns (uint256, uint256)
Calculates the amount of unclaimed rewards a user has earned
Parameter
Type
Description
_account
address
User address

totalSupply()

function totalSupply () public returns (uint256)
Get the total amount of the staked token

balanceOf()

function balanceOf (address _account) public returns (uint256)
Get the balance of a given account
Parameter
Type
Description
_account
address
User for which to retrieve balance
Last modified 2mo ago