MasterWombatV2
Last updated
Last updated
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
***MasterWombatV2.Add(pid, allocPoint, lpToken, rewarder) ***
Arguments
***MasterWombatV2.Deposit(user, pid, amount) ***
Arguments
***MasterWombatV2.DepositFor(user, pid, amount) ***
Arguments
***MasterWombatV2.EmergencyWithdraw(user, pid, amount) ***
Arguments
***MasterWombatV2.EmergencyWomWithdraw(owner, balance) ***
Arguments
***MasterWombatV2.Harvest(user, pid, amount) ***
Arguments
***MasterWombatV2.OwnershipTransferred(previousOwner, newOwner) ***
Arguments
***MasterWombatV2.Paused(account) ***
Arguments
***MasterWombatV2.Set(pid, allocPoint, rewarder, overwrite) ***
Arguments
***MasterWombatV2.Unpaused(account) ***
Arguments
***MasterWombatV2.UpdateEmissionPartition(user, basePartition, boostedPartition) ***
Arguments
***MasterWombatV2.UpdateEmissionRate(user, womPerSec) ***
Arguments
***MasterWombatV2.UpdatePool(pid, lastRewardTimestamp, lpSupply, accWomPerShare) ***
Arguments
***MasterWombatV2.UpdateVeWOM(user, oldVeWOM, newVeWOM) ***
Arguments
***MasterWombatV2.Withdraw(user, pid, amount) ***
Arguments
***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
MasterWombatV2.basePartition() view
Outputs
MasterWombatV2.boostedPartition() view
Outputs
***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
***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
***MasterWombatV2.emergencyWithdraw(_pid) ***
Notice: Withdraw without caring about rewards. EMERGENCY ONLY.
Arguments
***MasterWombatV2.emergencyWomWithdraw() ***
Notice: In case we need to manually migrate WOM funds from MasterChef Sends all remaining wom from the contract to the owner
MasterWombatV2.getAssetPid(asset) view
Arguments
Outputs
***MasterWombatV2.initialize(_wom, _veWom, _womPerSec, _basePartition, _startTimestamp) ***
Arguments
***MasterWombatV2.massUpdatePools() ***
Notice: Update reward variables for all pools.
Details: Be careful of gas spending!
***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
***MasterWombatV2.multiClaim(_pids) ***
Notice: claims rewards for multiple pids
Arguments
Outputs
MasterWombatV2.owner() view
Details: Returns the address of the current owner.
Outputs
***MasterWombatV2.pause() ***
Details: pause pool, restricting certain operations
MasterWombatV2.paused() view
Details: Returns true if the contract is paused, and false otherwise.
Outputs
MasterWombatV2.pendingTokens(_pid, _user) view
Notice: View function to see pending WOMs on frontend.
Arguments
Outputs
MasterWombatV2.poolInfo() view
Arguments
Outputs
MasterWombatV2.poolLength() view
Notice: returns pool length
Outputs
***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.
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
***MasterWombatV2.set(_pid, _allocPoint, _rewarder, overwrite) ***
Notice: Update the given pool's WOM allocation point. Can only be called by the owner.
Arguments
***MasterWombatV2.setNewMasterWombat(_newMasterWombat) ***
Arguments
***MasterWombatV2.setVeWom(_newVeWom) ***
Notice: updates veWom address
Arguments
MasterWombatV2.startTimestamp() view
Outputs
MasterWombatV2.totalAllocPoint() view
Outputs
***MasterWombatV2.transferOwnership(newOwner) ***
Details: Transfers ownership of the contract to a new account (
newOwner
). Can only be called by the current owner.
Arguments
***MasterWombatV2.unpause() ***
Details: unpause pool, enabling certain operations
***MasterWombatV2.updateEmissionPartition(_basePartition) ***
Notice: updates emission partition
Arguments
***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
***MasterWombatV2.updateFactor(_user, _newVeWomBalance) ***
Notice: updates factor after any veWom token operation (minting/burning)
Details: can only be called by veWom
Arguments
***MasterWombatV2.updatePool(_pid) ***
Notice: Update reward variables of the given pool to be up-to-date.
Arguments
MasterWombatV2.userInfo(, ) view
Arguments
Outputs
MasterWombatV2.veWom() view
Outputs
***MasterWombatV2.withdraw(_pid, _amount) ***
Notice: Withdraw LP tokens from MasterWombat.Automatically harvest pending rewards and sends to user
Arguments
Outputs
MasterWombatV2.wom() view
Outputs
MasterWombatV2.womPerSec() view
Outputs