FeeSharingSystem
It handles the distribution of fees using WETH along with the auto-compounding of LOOKS.
function PRECISION_FACTOR() external view returns (uint256)
Name | Type | Description |
---|
PRECISION_FACTOR | uint256 | - |
function calculatePendingRewards(address user) external view returns (uint256)
Calculate pending rewards (WETH) for a user
Name | Type | Description |
---|
user | address | address of the user |
Name | Type | Description |
---|
- | uint256 | pending rewards for the user |
function calculateSharePriceInLOOKS() external view returns (uint256)
Calculate price of one share (in LOOKS token) Share price is expressed times 1e18
Name | Type | Description |
---|
- | uint256 | price of one share (in LOOKS token) |
function calculateSharesValueInLOOKS(address user) external view returns (uint256)
Calculate value of LOOKS for a user given a number of shares owned
Name | Type | Description |
---|
user | address | address of the user |
Name | Type | Description |
---|
- | uint256 | estimated number of LOOKS for a user given the number of owned shares |
function currentRewardPerBlock() external view returns (uint256)
Name | Type | Description |
---|
- | uint256 | current reward per block (in WETH) |
function deposit(uint256 amount, bool claimRewardToken) external nonpayable
Deposit staked tokens (and collect reward tokens if requested)
Name | Type | Description |
---|
amount | uint256 | amount to deposit (in LOOKS) |
claimRewardToken | bool | whether to claim reward tokens |
function harvest() external nonpayable
Harvest reward tokens that are pending
function lastRewardAdjustment() external view returns (uint256)
Name | Type | Description |
---|
lastRewardAdjustment | uint256 | last reward adjustment |
function lastRewardBlock() external view returns (uint256)
Return last block where trading rewards were distributed
Name | Type | Description |
---|
lastRewardBlock | uint256 | last block where trading rewards were distributed |
function lastUpdateBlock() external view returns (uint256)
Name | Type | Description |
---|
lastUpdateBlock | uint256 | last update block |
function looksRareToken() external view returns (contract IERC20)
Name | Type | Description |
---|
looksRareToken | contract IERC20 | address of the LooksRare token |
function owner() external view returns (address)
Returns the address of the current owner.
Name | Type | Description |
---|
owner | address | address of the current owner |
function periodFinish() external view returns (uint256)
Name | Type | Description |
---|
periodFinish | uint256 | endBlock for the current reward period |
function renounceOwnership() external nonpayable
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 rewardPerTokenStored() external view returns (uint256)
Name | Type | Description |
---|
rewardPerTokenStored | uint256 | current reward that has been stored per share |
function rewardToken() external view returns (contract IERC20)
Name | Type | Description |
---|
rewardToken | contract IERC20 | reward token address (WETH) |
function tokenDistributor() external view returns (contract TokenDistributor)
Name | Type | Description |
---|
tokenDistributor | contract TokenDistributor | address of the TokenDistributor |
function totalShares() external view returns (uint256)
Name | Type | Description |
---|
totalShares | uint256 | number of outstanding shares |
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Name | Type | Description |
---|
newOwner | address | address of the new owner |
function updateRewards(uint256 reward, uint256 rewardDurationInBlocks) external nonpayable
Update the reward per block (in rewardToken)
Only callable by owner. Owner is meant to be another smart contract.
Name | Type | Description |
---|
reward | uint256 | total reward distributed in the period |
rewardDurationInBlocks | uint256 | number of blocks in the period (e.g., 6500) |
function userInfo(address) external view returns (uint256 shares, uint256 userRewardPerTokenPaid, uint256 rewards)
Name | Type | Description |
---|
- | address | address of the user |
Name | Type | Description |
---|
shares | uint256 | number of shares |
userRewardPerTokenPaid | uint256 | user reward per token paid |
rewards | uint256 | pending rewards |
function withdraw(uint256 shares, bool claimRewardToken) external nonpayable
Withdraw staked tokens (and collect reward tokens if requested)
Name | Type | Description |
---|
shares | uint256 | shares to withdraw |
claimRewardToken | bool | whether to claim reward tokens |
function withdrawAll(bool claimRewardToken) external nonpayable
Withdraw all staked tokens (and collect reward tokens if requested)
Name | Type | Description |
---|
claimRewardToken | bool | whether to claim reward tokens |
event Deposit(address indexed user, uint256 amount, uint256 harvestedAmount)
Name | Type | Description |
---|
user indexed | address | address of the user |
amount | uint256 | amount deposited |
harvestedAmount | uint256 | harvested amount (in WETH) |
event Harvest(address indexed user, uint256 harvestedAmount)
Name | Type | Description |
---|
user indexed | address | address of the user |
harvestedAmount | uint256 | harvested amount (in WETH) |
event NewRewardPeriod(uint256 numberBlocks, uint256 rewardPerBlock, uint256 reward)
Name | Type | Description |
---|
numberBlocks | uint256 | number of blocks for the new reward period |
rewardPerBlock | uint256 | reward per block (in WETH) |
reward | uint256 | total reward distributed over the period (in WETH) |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Name | Type | Description |
---|
previousOwner indexed | address | address of the previous owner |
newOwner indexed | address | address of the new owner |
event Withdraw(address indexed user, uint256 amount, uint256 harvestedAmount)
Name | Type | Description |
---|
user indexed | address | address of the user |
amount | uint256 | amount withdrawn |
harvestedAmount | uint256 | harvested amount (in WETH) |