Developer Docs
  • Introduction
  • Meta Vaults
    • USDC 3Pool Convex Meta Vault
      • 3Pool Convex Meta Vault
      • Meta Vault of Convex 3Crv Vaults
      • Convex 3Crv Vaults
    • General ERC-4626 Vault Interface
    • Liquidator
  • Ethereum Mainnet
    • mAssets
    • imAssets (SAVE)
    • Feeder Pools
    • Vaults
      • BoostedSavingsVault
      • BoostedSavingsVault V2
      • BoostedDualVault
    • Shared Addresses
    • Governance
      • stkMTA
      • stkBPT
      • Quest Manager
    • Save Wrapper
  • Emissions Controller
    • EmissionsController
    • Polygon Integration
      • Bridge Forwarder
      • L2 Bridge Recipient
      • L2 Emissions Controller
      • Disperse Forwarder
    • RevenueSplitBuyBack
    • BasicRewardsForwarder
    • VotiumBribeForwarder
  • Polygon
    • mUSD
    • imUSD
    • Feeder Pool
    • Vaults
    • Save Wrapper
    • Shared Addresses
  • Security
    • Multisig Admin Rights
    • Security Audits
      • Hacken Vault Security Audit
    • Bug Bounty
Powered by GitBook
On this page
  • Process
  • Functions
  • notifyRedistributionAmount()
  • buyBackRewards()
  • donateRewards()
  • addStakingContract()

Was this helpful?

  1. Emissions Controller

RevenueSplitBuyBack

Uses 50% of protocol revenue to buy MTA rewards for stakers and 50% to mStable Treasury.

PreviousDisperse ForwarderNextBasicRewardsForwarder

Last updated 2 years ago

Was this helpful?

Process

Functions

notifyRedistributionAmount()

function notifyRedistributionAmount (address _mAsset, uint256 _amount) external

Simply transfers the mAsset from the sender to here

Parameter
Type
Description

_mAsset

address

Address of mAsset

_amount

uint256

Units of mAsset collected

buyBackRewards()

function buyBackRewards (address[] mAssets, uint256[] minBassetsAmount, uint256[] minRewardsAmounts, bytes[] uniswapPaths) external

Buys reward tokens, eg MTA, using mAssets like mUSD or mBTC from protocol governance fees.

Parameter
Type
Description

mAssets

address[]

Addresses of mAssets that are to be sold for rewards. eg mUSD and mBTC.

minBassetsAmount

uint256[]

Minimum amount of bAsset tokens to receive for each redeem of mAssets.

The amount uses the decimal places of the bAsset.

Example 1: Redeeming 10,000 mUSD with a min 2% slippage to USDC which has 6 decimal places.

minBassetsAmounts = 10,000 mAssets * slippage 0.98 * USDC decimals 1e6 = 1e4 * 0.98 * 1e6 = 1e10 * 0.98 = 98e8

Example 2: Redeeming 1 mBTC with a min 5% slippage to WBTC which has 8 decimal places. minBassetsAmounts = 1 mAsset * slippage 0.95 * WBTC decimals 1e8 = 0.95 * 1e8 = 95e6

minRewardsAmounts

uint256[]

Minimum amount of reward tokens received from the sale of bAssets. The amount uses the decimal places of the rewards token.

Example 1: Swapping 10,000 USDC with a min 1% slippage to MTA which has 18 decimal places. minRewardsAmounts = 10,000 USDC * slippage 0.99 * MTA decimals 1e18 * MTA/USD rate 1.2 = 1e4 * 0.99 * 1e18 * 1.2 = 1e22 * 0.99 = 99e20

Example 1: Swapping 1 WBTC with a min 3% slippage to MTA which has 18 decimal places. minRewardsAmounts = 1 WBTC * slippage 0.97 * MTA decimals 1e18 * MTA/BTC rate 0.00001 = 1 * 0.97 * 1e18 * 0.00001 = 0.97 * 1e13 = 97e11

uniswapPaths

bytes[]

The Uniswap V3 bytes encoded paths.

donateRewards()

function donateRewards () external

Donates purchased rewards, eg MTA, to staking contracts via the Emissions Controller.

addStakingContract()

function addStakingContract (uint16 _stakingDialId) external

Adds a new staking contract that will receive MTA rewards

Parameter
Type
Description

_stakingDialId

uint16

dial identifier from the Emissions Controller of the staking contract.