文件 1 的 9:Address.sol
pragma solidity >=0.6.2 <0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 9:Context.sol
pragma solidity >=0.6.0 <0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this;
return msg.data;
}
}
文件 3 的 9:IERC20.sol
pragma solidity >=0.6.0 <0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
文件 4 的 9:Math.sol
pragma solidity >=0.6.0 <0.8.0;
library Math {
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
function average(uint256 a, uint256 b) internal pure returns (uint256) {
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
}
文件 5 的 9:Ownable.sol
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
文件 6 的 9:ReentrancyGuard.sol
pragma solidity >=0.6.0 <0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () internal {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
_;
_status = _NOT_ENTERED;
}
}
文件 7 的 9:Rewarder.sol
pragma solidity >=0.6.6;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
contract LPTokenWrapper {
using SafeMath for uint256;
using SafeERC20 for IERC20;
IERC20 public y;
function setStakeToken(address _y) internal {
y = IERC20(_y);
}
uint256 private _totalSupply;
mapping(address => uint256) private _balances;
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view returns (uint256) {
return _balances[account];
}
function stake(uint256 amount) public virtual {
_totalSupply = _totalSupply.add(amount);
_balances[msg.sender] = _balances[msg.sender].add(amount);
y.safeTransferFrom(msg.sender, address(this), amount);
}
function withdraw(uint256 amount) public virtual {
_totalSupply = _totalSupply.sub(amount);
_balances[msg.sender] = _balances[msg.sender].sub(amount);
y.safeTransfer(msg.sender, amount);
}
}
contract Rewarder is Ownable, LPTokenWrapper, ReentrancyGuard {
using Address for address;
event LogEmergencyWithdraw(uint256 number);
event LogSetRewardPercentage(uint256 rewardPercentage_);
event LogSetBlockDuration(uint256 duration_);
event LogSetPoolEnabled(bool poolEnabled_);
event LogStartNewDistribtionCycle(
uint256 amount_,
uint256 rewardRateDebaseExpansion_,
uint256 rewardRateDebaseContraction,
uint256 cycleEnds_
);
event LogSetContractionRewardRatePercentage(
uint256 contractionRewardRatePercentage_
);
event LogSetRewardRate(uint256 rewardRate_);
event LogSetEnableUserLpLimit(bool enableUserLpLimit_);
event LogSetEnablePoolLpLimit(bool enablePoolLpLimit_);
event LogSetUserLpLimit(uint256 userLpLimit_);
event LogSetPoolLpLimit(uint256 poolLpLimit_);
event LogRewardAdded(uint256 reward);
event LogStaked(address indexed user, uint256 amount);
event LogWithdrawn(address indexed user, uint256 amount);
event LogSetMultiSigPercentage(uint256 multiSigReward_);
event LogSetMultiSigAddress(address multiSigAddress_);
IERC20 public debase;
IERC20 public mph88;
IERC20 public crv;
address public policy;
uint256 public blockDuration;
bool public poolEnabled;
uint256 public periodFinish;
uint256 rewardRateDebase;
uint256 rewardRateDebaseExpansion;
uint256 rewardRateDebaseContraction;
uint256 public contractionRewardRatePercentage;
uint256 rewardRateMPH;
uint256 rewardRateCRV;
uint256 lastUpdateBlock;
uint256 rewardPerTokenStoredDebase;
uint256 rewardPerTokenStoredMPH;
uint256 rewardPerTokenStoredCRV;
uint256 public rewardPercentage;
uint256 public rewardDistributedDebase;
uint256 public rewardDistributedMPH;
uint256 public rewardDistributedCRV;
uint256 public mph88Reward;
uint256 public crvReward;
uint256 public multiSigRewardPercentage;
uint256 public multiSigRewardShare;
address public multiSigRewardAddress;
mapping(address => uint256) userRewardPerTokenPaidDebase;
mapping(address => uint256) userRewardPerTokenPaidMPH;
mapping(address => uint256) userRewardPerTokenPaidCRV;
mapping(address => uint256) public rewardsDebase;
mapping(address => uint256) public rewardsMPH;
mapping(address => uint256) public rewardsCRV;
modifier enabled() {
require(poolEnabled, "Pool isn't enabled");
_;
}
modifier updateReward(address account) {
(
rewardPerTokenStoredDebase,
rewardPerTokenStoredMPH,
rewardPerTokenStoredCRV
) = rewardPerToken();
lastUpdateBlock = lastBlockRewardApplicable();
if (account != address(0)) {
(
rewardsDebase[account],
rewardsMPH[account],
rewardsCRV[account]
) = earned(account);
userRewardPerTokenPaidDebase[account] = rewardPerTokenStoredDebase;
userRewardPerTokenPaidMPH[account] = rewardPerTokenStoredMPH;
userRewardPerTokenPaidCRV[account] = rewardPerTokenStoredCRV;
}
_;
}
function setContractionRewardRatePercentage(
uint256 contractionRewardRatePercentage_
) external onlyOwner {
contractionRewardRatePercentage = contractionRewardRatePercentage_;
emit LogSetContractionRewardRatePercentage(
contractionRewardRatePercentage
);
}
function setRewardPercentage(uint256 rewardPercentage_) external onlyOwner {
rewardPercentage = rewardPercentage_;
emit LogSetRewardPercentage(rewardPercentage);
}
function setMultiSigReward(uint256 multiSigRewardPercentage_)
external
onlyOwner
{
multiSigRewardPercentage = multiSigRewardPercentage_;
emit LogSetMultiSigPercentage(multiSigRewardPercentage);
}
function setMultiSigAddress(address multiSigRewardAddress_)
external
onlyOwner
{
multiSigRewardAddress = multiSigRewardAddress_;
emit LogSetMultiSigAddress(multiSigRewardAddress);
}
function setblockDuration(uint256 blockDuration_) external onlyOwner {
require(blockDuration >= 1);
blockDuration = blockDuration_;
emit LogSetBlockDuration(blockDuration);
}
function setPoolEnabled(bool poolEnabled_) external onlyOwner {
poolEnabled = poolEnabled_;
emit LogSetPoolEnabled(poolEnabled);
}
function setMPH88AndCRVReward(uint256 mph88Reward_, uint256 crvReward_)
external
onlyOwner
{
mph88Reward = mph88Reward_;
crvReward = crvReward_;
}
constructor(
IERC20 debase_,
IERC20 mph88_,
IERC20 crv_,
address pairToken_,
address policy_,
uint256 mph88Reward_,
uint256 crvReward_,
uint256 rewardPercentage_,
uint256 blockDuration_,
uint256 multiSigRewardPercentage_,
address multiSigRewardAddress_,
uint256 contractionRewardRatePercentage_
) public {
setStakeToken(pairToken_);
debase = debase_;
mph88 = mph88_;
crv = crv_;
policy = policy_;
blockDuration = blockDuration_;
rewardPercentage = rewardPercentage_;
mph88Reward = mph88Reward_;
crvReward = crvReward_;
multiSigRewardPercentage = multiSigRewardPercentage_;
multiSigRewardAddress = multiSigRewardAddress_;
contractionRewardRatePercentage = contractionRewardRatePercentage_;
}
function checkStabilizerAndGetReward(
int256 supplyDelta_,
int256 rebaseLag_,
uint256 exchangeRate_,
uint256 debasePolicyBalance
) external returns (uint256 rewardAmount_) {
require(
msg.sender == policy,
"Only debase policy contract can call this"
);
if (multiSigRewardShare != 0) {
debase.safeTransfer(
multiSigRewardAddress,
debase.totalSupply().mul(multiSigRewardShare).div(10**18)
);
multiSigRewardShare = 0;
}
if (block.number >= periodFinish) {
uint256 rewardAmount =
debasePolicyBalance.mul(rewardPercentage).div(10**18);
uint256 multiSigRewardClaim =
rewardAmount.mul(multiSigRewardPercentage).div(10**18);
multiSigRewardShare = multiSigRewardClaim.mul(10**18).div(
debase.totalSupply()
);
uint256 totalRewardAmount = multiSigRewardClaim.add(rewardAmount);
if (debasePolicyBalance >= totalRewardAmount) {
startNewDistribtionCycle(supplyDelta_, rewardAmount);
return totalRewardAmount;
}
} else {
if (
supplyDelta_ >= 0 &&
rewardRateDebase != rewardRateDebaseExpansion
) {
changeRewardRate(rewardRateDebaseExpansion);
} else if (
supplyDelta_ < 0 &&
rewardRateDebase != rewardRateDebaseContraction
) {
changeRewardRate(rewardRateDebaseContraction);
}
}
return 0;
}
function emergencyWithdraw() external onlyOwner {
debase.safeTransfer(policy, debase.balanceOf(address(this)));
mph88.safeTransfer(owner(), mph88.balanceOf(address(this)));
crv.safeTransfer(owner(), crv.balanceOf(address(this)));
emit LogEmergencyWithdraw(block.number);
}
function lastBlockRewardApplicable() internal view returns (uint256) {
return Math.min(block.number, periodFinish);
}
function rewardPerToken()
public
view
returns (
uint256,
uint256,
uint256
)
{
if (totalSupply() == 0) {
return (
rewardPerTokenStoredDebase,
rewardPerTokenStoredMPH,
rewardPerTokenStoredCRV
);
}
uint256 result = lastBlockRewardApplicable().sub(lastUpdateBlock);
return (
rewardPerTokenStoredDebase.add(
result.mul(rewardRateDebase).mul(10**18).div(totalSupply())
),
rewardPerTokenStoredMPH.add(
result.mul(rewardRateMPH).mul(10**18).div(totalSupply())
),
rewardPerTokenStoredCRV.add(
result.mul(rewardRateCRV).mul(10**18).div(totalSupply())
)
);
}
function earned(address account)
public
view
returns (
uint256,
uint256,
uint256
)
{
uint256 balance = balanceOf(account);
(
uint256 rewardPerTokenDebase,
uint256 rewardPerTokenMPH,
uint256 rewardPerTokenCRV
) = rewardPerToken();
return (
calculateEarned(
balance,
rewardPerTokenDebase,
userRewardPerTokenPaidDebase[account],
rewardsDebase[account]
),
calculateEarned(
balance,
rewardPerTokenMPH,
userRewardPerTokenPaidMPH[account],
rewardsMPH[account]
),
calculateEarned(
balance,
rewardPerTokenCRV,
userRewardPerTokenPaidCRV[account],
rewardsCRV[account]
)
);
}
function calculateEarned(
uint256 balance,
uint256 rewardPerToken_,
uint256 userRewardPerTokenPaid_,
uint256 rewards_
) internal pure returns (uint256) {
return
balance
.mul(rewardPerToken_.sub(userRewardPerTokenPaid_))
.div(10**18)
.add(rewards_);
}
function stake(uint256 amount)
public
override
nonReentrant
updateReward(msg.sender)
enabled
{
require(
!address(msg.sender).isContract(),
"Caller must not be a contract"
);
require(amount > 0, "Cannot stake 0");
super.stake(amount);
emit LogStaked(msg.sender, amount);
}
function withdraw(uint256 amount)
public
override
nonReentrant
updateReward(msg.sender)
{
require(amount > 0, "Cannot withdraw 0");
super.withdraw(amount);
emit LogWithdrawn(msg.sender, amount);
}
function exit() external {
withdraw(balanceOf(msg.sender));
getReward();
}
function getReward() public nonReentrant updateReward(msg.sender) enabled {
(uint256 earnedDebase, uint256 earnedMPH, uint256 earnedCRV) =
earned(msg.sender);
if (earnedDebase > 0) {
rewardsDebase[msg.sender] = 0;
uint256 rewardToClaim =
debase.totalSupply().mul(earnedDebase).div(10**18);
debase.safeTransfer(msg.sender, rewardToClaim);
rewardDistributedDebase = rewardDistributedDebase.add(earnedDebase);
}
if (earnedMPH > 0) {
rewardsMPH[msg.sender] = 0;
mph88.safeTransfer(msg.sender, earnedMPH);
rewardDistributedMPH = rewardDistributedMPH.add(earnedMPH);
}
if (earnedCRV > 0) {
rewardsCRV[msg.sender] = 0;
crv.safeTransfer(msg.sender, earnedCRV);
rewardDistributedCRV = rewardDistributedDebase.add(earnedCRV);
}
}
function changeRewardRate(uint256 rewardRateDebase_)
internal
updateReward(address(0))
{
rewardRateDebase = rewardRateDebase_;
emit LogSetRewardRate(rewardRateDebase);
}
function startNewDistribtionCycle(int256 supplyDelta_, uint256 amount)
internal
updateReward(address(0))
{
require(
amount < uint256(-1) / 10**18,
"Rewards: rewards too large, would lock"
);
uint256 rewardShare = amount.mul(10**18).div(debase.totalSupply());
rewardRateDebaseExpansion = rewardShare.div(blockDuration);
rewardRateDebaseContraction = rewardRateDebaseExpansion
.mul(contractionRewardRatePercentage)
.div(10**18);
rewardRateMPH = mph88Reward.div(blockDuration);
rewardRateCRV = crvReward.div(blockDuration);
mph88Reward = 0;
crvReward = 0;
if (supplyDelta_ >= 0) {
rewardRateDebase = rewardRateDebaseExpansion;
} else {
rewardRateDebase = rewardRateDebaseContraction;
}
periodFinish = block.number.add(blockDuration);
lastUpdateBlock = block.number;
emit LogStartNewDistribtionCycle(
amount,
rewardRateDebaseExpansion,
rewardRateDebaseContraction,
periodFinish
);
}
}
文件 8 的 9:SafeERC20.sol
pragma solidity >=0.6.0 <0.8.0;
import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(IERC20 token, address spender, uint256 value) internal {
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 9 的 9:SafeMath.sol
pragma solidity >=0.6.0 <0.8.0;
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}
{
"compilationTarget": {
"contracts/SP1-Liquidity/Rewarder.sol": "Rewarder"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"contract IERC20","name":"debase_","type":"address"},{"internalType":"contract IERC20","name":"mph88_","type":"address"},{"internalType":"contract IERC20","name":"crv_","type":"address"},{"internalType":"address","name":"pairToken_","type":"address"},{"internalType":"address","name":"policy_","type":"address"},{"internalType":"uint256","name":"mph88Reward_","type":"uint256"},{"internalType":"uint256","name":"crvReward_","type":"uint256"},{"internalType":"uint256","name":"rewardPercentage_","type":"uint256"},{"internalType":"uint256","name":"blockDuration_","type":"uint256"},{"internalType":"uint256","name":"multiSigRewardPercentage_","type":"uint256"},{"internalType":"address","name":"multiSigRewardAddress_","type":"address"},{"internalType":"uint256","name":"contractionRewardRatePercentage_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"number","type":"uint256"}],"name":"LogEmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"LogRewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration_","type":"uint256"}],"name":"LogSetBlockDuration","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"contractionRewardRatePercentage_","type":"uint256"}],"name":"LogSetContractionRewardRatePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enablePoolLpLimit_","type":"bool"}],"name":"LogSetEnablePoolLpLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enableUserLpLimit_","type":"bool"}],"name":"LogSetEnableUserLpLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"multiSigAddress_","type":"address"}],"name":"LogSetMultiSigAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"multiSigReward_","type":"uint256"}],"name":"LogSetMultiSigPercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"poolEnabled_","type":"bool"}],"name":"LogSetPoolEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"poolLpLimit_","type":"uint256"}],"name":"LogSetPoolLpLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardPercentage_","type":"uint256"}],"name":"LogSetRewardPercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardRate_","type":"uint256"}],"name":"LogSetRewardRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"userLpLimit_","type":"uint256"}],"name":"LogSetUserLpLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRateDebaseExpansion_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardRateDebaseContraction","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cycleEnds_","type":"uint256"}],"name":"LogStartNewDistribtionCycle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"supplyDelta_","type":"int256"},{"internalType":"int256","name":"rebaseLag_","type":"int256"},{"internalType":"uint256","name":"exchangeRate_","type":"uint256"},{"internalType":"uint256","name":"debasePolicyBalance","type":"uint256"}],"name":"checkStabilizerAndGetReward","outputs":[{"internalType":"uint256","name":"rewardAmount_","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractionRewardRatePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crv","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crvReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"debase","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mph88","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mph88Reward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiSigRewardAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiSigRewardPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiSigRewardShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"policy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDistributedCRV","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardDistributedDebase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardDistributedMPH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsCRV","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsDebase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsMPH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"contractionRewardRatePercentage_","type":"uint256"}],"name":"setContractionRewardRatePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mph88Reward_","type":"uint256"},{"internalType":"uint256","name":"crvReward_","type":"uint256"}],"name":"setMPH88AndCRVReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"multiSigRewardAddress_","type":"address"}],"name":"setMultiSigAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"multiSigRewardPercentage_","type":"uint256"}],"name":"setMultiSigReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"poolEnabled_","type":"bool"}],"name":"setPoolEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardPercentage_","type":"uint256"}],"name":"setRewardPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockDuration_","type":"uint256"}],"name":"setblockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"y","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]