MasterWombatV2
contracts/wombat-governance/MasterWombatV2.sol
Title: MasterWombatV2
Notice: MasterWombat is a boss. He is not afraid of any snakes. In fact, he drinks their venoms. So, veWom holders boost their (boosted) emissions. This contract rewards users in function of their amount of lp staked (base pool) factor (boosted pool) Factor and sumOfFactors are updated by contract VeWom.sol after any veWom minting/burning (veERC20Upgradeable hook). Note that it's ownable and the owner wields tremendous power. The ownership will be transferred to a governance smart contract once Wombat is sufficiently distributed and the community can show to govern itself.
Details: Updates: - pack struct - move pendingWom into UserInfo - use MultiRewarderPerSec
event Add
***MasterWombatV2.Add(pid, allocPoint, lpToken, rewarder) ***
Arguments
event Deposit
***MasterWombatV2.Deposit(user, pid, amount) ***
Arguments
event DepositFor
***MasterWombatV2.DepositFor(user, pid, amount) ***
Arguments
event EmergencyWithdraw
***MasterWombatV2.EmergencyWithdraw(user, pid, amount) ***
Arguments
event EmergencyWomWithdraw
***MasterWombatV2.EmergencyWomWithdraw(owner, balance) ***
Arguments
event Harvest
***MasterWombatV2.Harvest(user, pid, amount) ***
Arguments
event OwnershipTransferred
***MasterWombatV2.OwnershipTransferred(previousOwner, newOwner) ***
Arguments
event Paused
***MasterWombatV2.Paused(account) ***
Arguments
event Set
***MasterWombatV2.Set(pid, allocPoint, rewarder, overwrite) ***
Arguments
event Unpaused
***MasterWombatV2.Unpaused(account) ***
Arguments
event UpdateEmissionPartition
***MasterWombatV2.UpdateEmissionPartition(user, basePartition, boostedPartition) ***
Arguments
event UpdateEmissionRate
***MasterWombatV2.UpdateEmissionRate(user, womPerSec) ***
Arguments
event UpdatePool
***MasterWombatV2.UpdatePool(pid, lastRewardTimestamp, lpSupply, accWomPerShare) ***
Arguments
event UpdateVeWOM
***MasterWombatV2.UpdateVeWOM(user, oldVeWOM, newVeWOM) ***
Arguments
event Withdraw
***MasterWombatV2.Withdraw(user, pid, amount) ***
Arguments
function add
***MasterWombatV2.add(_allocPoint, _lpToken, _rewarder) ***
Notice: Add a new lp to the pool. Can only be called by the owner.
Details: Reverts if the same LP token is added more than once.
Arguments
function basePartition
MasterWombatV2.basePartition() view
Outputs
function boostedPartition
MasterWombatV2.boostedPartition() view
Outputs
function deposit
***MasterWombatV2.deposit(_pid, _amount) ***
Notice: Deposit LP tokens to MasterChef for WOM allocation.
Details: it is possible to call this function with _amount == 0 to claim current rewards
Arguments
Outputs
function depositFor
***MasterWombatV2.depositFor(_pid, _amount, _user) ***
Notice: Deposit LP tokens to MasterChef for WOM allocation on behalf of user
Details: user must initiate transaction from masterchef
Arguments
function emergencyWithdraw
***MasterWombatV2.emergencyWithdraw(_pid) ***
Notice: Withdraw without caring about rewards. EMERGENCY ONLY.
Arguments
function emergencyWomWithdraw
***MasterWombatV2.emergencyWomWithdraw() ***
Notice: In case we need to manually migrate WOM funds from MasterChef Sends all remaining wom from the contract to the owner
function getAssetPid
MasterWombatV2.getAssetPid(asset) view
Arguments
Outputs
function initialize
***MasterWombatV2.initialize(_wom, _veWom, _womPerSec, _basePartition, _startTimestamp) ***
Arguments
function massUpdatePools
***MasterWombatV2.massUpdatePools() ***
Notice: Update reward variables for all pools.
Details: Be careful of gas spending!
function migrate
***MasterWombatV2.migrate(_pids) ***
Notice: Helper function to migrate fund from multiple pools to the new MasterWombat.user must initiate transaction from masterchef
Details: Assume the orginal MasterWombat has stopped emisions hence we can skip updatePool() to save gas cost
Arguments
function multiClaim
***MasterWombatV2.multiClaim(_pids) ***
Notice: claims rewards for multiple pids
Arguments
Outputs
function owner
MasterWombatV2.owner() view
Details: Returns the address of the current owner.
Outputs
function pause
***MasterWombatV2.pause() ***
Details: pause pool, restricting certain operations
function paused
MasterWombatV2.paused() view
Details: Returns true if the contract is paused, and false otherwise.
Outputs
function pendingTokens
MasterWombatV2.pendingTokens(_pid, _user) view
Notice: View function to see pending WOMs on frontend.
Arguments
Outputs
function poolInfo
MasterWombatV2.poolInfo() view
Arguments
Outputs
function poolLength
MasterWombatV2.poolLength() view
Notice: returns pool length
Outputs
function renounceOwnership
***MasterWombatV2.renounceOwnership() ***
Details: Leaves the contract without owner. It will not be possible to call
onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
function rewarderBonusTokenInfo
MasterWombatV2.rewarderBonusTokenInfo(_pid) view
Notice: Get bonus token info from the rewarder contract for a given pool, if it is a double reward farm
Arguments
Outputs
function set
***MasterWombatV2.set(_pid, _allocPoint, _rewarder, overwrite) ***
Notice: Update the given pool's WOM allocation point. Can only be called by the owner.
Arguments
function setNewMasterWombat
***MasterWombatV2.setNewMasterWombat(_newMasterWombat) ***
Arguments
function setVeWom
***MasterWombatV2.setVeWom(_newVeWom) ***
Notice: updates veWom address
Arguments
function startTimestamp
MasterWombatV2.startTimestamp() view
Outputs
function totalAllocPoint
MasterWombatV2.totalAllocPoint() view
Outputs
function transferOwnership
***MasterWombatV2.transferOwnership(newOwner) ***
Details: Transfers ownership of the contract to a new account (
newOwner
). Can only be called by the current owner.
Arguments
function unpause
***MasterWombatV2.unpause() ***
Details: unpause pool, enabling certain operations
function updateEmissionPartition
***MasterWombatV2.updateEmissionPartition(_basePartition) ***
Notice: updates emission partition
Arguments
function updateEmissionRate
***MasterWombatV2.updateEmissionRate(_womPerSec) ***
Notice: updates emission rate
Details: Pancake has to add hidden dummy pools inorder to alter the emission,here we make it simple and transparent to all.
Arguments
function updateFactor
***MasterWombatV2.updateFactor(_user, _newVeWomBalance) ***
Notice: updates factor after any veWom token operation (minting/burning)
Details: can only be called by veWom
Arguments
function updatePool
***MasterWombatV2.updatePool(_pid) ***
Notice: Update reward variables of the given pool to be up-to-date.
Arguments
function userInfo
MasterWombatV2.userInfo(, ) view
Arguments
Outputs
function veWom
MasterWombatV2.veWom() view
Outputs
function withdraw
***MasterWombatV2.withdraw(_pid, _amount) ***
Notice: Withdraw LP tokens from MasterWombat.Automatically harvest pending rewards and sends to user
Arguments
Outputs
function wom
MasterWombatV2.wom() view
Outputs
function womPerSec
MasterWombatV2.womPerSec() view
Outputs
Last updated