Skip to content

FluidLendingStakingRewards ​

rewardsToken ​

solidity
contract IERC20 rewardsToken

stakingToken ​

solidity
contract IERC20 stakingToken

_periodFinish ​

solidity
uint40 _periodFinish

lastUpdateTime ​

solidity
uint40 lastUpdateTime

_rewardsDuration ​

solidity
uint40 _rewardsDuration

_rewardRate ​

solidity
uint136 _rewardRate

rewardPerTokenStored ​

solidity
uint128 rewardPerTokenStored

_totalSupply ​

solidity
uint128 _totalSupply

nextRewardsDuration ​

solidity
uint40 nextRewardsDuration

nextRewards ​

solidity
uint216 nextRewards

userRewardPerTokenPaid ​

solidity
mapping(address => uint256) userRewardPerTokenPaid

rewards ​

solidity
mapping(address => uint256) rewards

_balances ​

solidity
mapping(address => uint256) _balances

constructor ​

solidity
constructor(address owner_, contract IERC20 rewardsToken_, contract IERC20 stakingToken_, uint40 rewardsDuration_) public

nextPeriodFinish ​

solidity
function nextPeriodFinish() public view returns (uint256)

nextRewardRate ​

solidity
function nextRewardRate() public view returns (uint256)

periodFinish ​

solidity
function periodFinish() public view returns (uint256)

rewardRate ​

solidity
function rewardRate() public view returns (uint256)

rewardsDuration ​

solidity
function rewardsDuration() public view returns (uint256)

totalSupply ​

solidity
function totalSupply() public view returns (uint256)

balanceOf ​

solidity
function balanceOf(address account) public view returns (uint256)

lastTimeRewardApplicable ​

solidity
function lastTimeRewardApplicable() public view returns (uint256)

gets last time where rewards accrue, also considering already queued next rewards

rewardPerToken ​

solidity
function rewardPerToken() public view returns (uint256 rewardPerToken_)

gets reward amount per token, also considering automatic transition to queued next rewards

earned ​

solidity
function earned(address account) public view returns (uint256)

gets earned reward amount for an account, also considering automatic transition to queued next rewards

getRewardForDuration ​

solidity
function getRewardForDuration() public view returns (uint256)

gets reward amount for current duration, also considering automatic transition to queued next rewards

stakeWithPermit ​

solidity
function stakeWithPermit(uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external

stake ​

solidity
function stake(uint256 amount) external

withdraw ​

solidity
function withdraw(uint256 amount) public

getReward ​

solidity
function getReward() public

exit ​

solidity
function exit() external

updateRewards ​

solidity
function updateRewards() public

updates rewards until current block.timestamp or periodFinish. Transitions to next rewards if previous rewards ended and next ones were queued.

queueNextRewardAmount ​

solidity
function queueNextRewardAmount(uint216 nextReward_, uint40 nextDuration_) external

queues next rewards that will be transitioned to automatically after current rewards reach periodFinish.

notifyRewardAmountWithDuration ​

solidity
function notifyRewardAmountWithDuration(uint256 reward_, uint40 newDuration_) external

add new rewards and update reward duration AFTER a reward period has ended.

notifyRewardAmount ​

solidity
function notifyRewardAmount(uint256 reward_) public

add new rewards or top-up adding to current rewards, adjusting rewardRate going forward for leftover + newReward until block.timestamp + duration

spell ​

solidity
function spell(address target_, bytes data_) external returns (bytes response_)

Spell allows owner aka governance to do any arbitrary call

Parameters ​

NameTypeDescription
target_addressAddress to which the call needs to be delegated
data_bytesData to execute at the delegated address

updateReward ​

solidity
modifier updateReward(address account)

RewardAdded ​

solidity
event RewardAdded(uint256 reward)

Staked ​

solidity
event Staked(address user, uint256 amount)

Withdrawn ​

solidity
event Withdrawn(address user, uint256 amount)

RewardPaid ​

solidity
event RewardPaid(address user, uint256 reward)

NextRewardQueued ​

solidity
event NextRewardQueued(uint256 reward, uint256 duration)