AggregatorFeeSharingWithUniswapV3
An extra layer built on top of the FeeSharingSystem
that sells WETH to LOOKS using the Uniswap V3 router. It is a yield aggregator that optimizes LOOKS staking.
Prime shares represent the number of shares in the FeeSharingSystem. When not specified, shares represent secondary shares in this contract.
function MAXIMUM_HARVEST_BUFFER_BLOCKS() external view returns (uint256)
Name | Type | Description |
---|
MAXIMUM_HARVEST_BUFFER_BLOCKS | uint256 | maximum number of blocks between two harvests |
function MINIMUM_DEPOSIT_LOOKS() external view returns (uint256)
Name | Type | Description |
---|
MINIMUM_DEPOSIT_LOOKS | uint256 | minimum amount for a single deposit (in LOOKS) |
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 a (secondary) share in LOOKS |
function calculateSharePriceInPrimeShare() external view returns (uint256)
Calculate price of one (secondary) share (in prime share). Share price is expressed times 1e18
Name | Type | Description |
---|
- | uint256 | price of a (secondary) share in prime share |
function calculateSharesValueInLOOKS(address user) external view returns (uint256)
Calculate shares value of a user (in LOOKS)
Name | Type | Description |
---|
user | address | address of the user |
Name | Type | Description |
---|
- | uint256 | value (in LOOKS) of the total shares of a user |
function canHarvest() external view returns (bool)
Name | Type | Description |
---|
- | bool | whether harvests are triggered automatically at standard user action (i.e., deposits, withdraws) |
function checkAndAdjustLOOKSTokenAllowanceIfRequired() external nonpayable
Adjust allowance if necessary
Only callable by owner.
function checkAndAdjustRewardTokenAllowanceIfRequired() external nonpayable
Adjust allowance if necessary
Only callable by owner.
function deposit(uint256 amount) external nonpayable
Deposit LOOKS tokens
There is a limit of 1 LOOKS per deposit to prevent potential manipulation of the shares
Name | Type | Description |
---|
amount | uint256 | amount to deposit (in LOOKS) |
function feeSharingSystem() external view returns (contract FeeSharingSystem)
Name | Type | Description |
---|
- | contract FeeSharingSystem | address of the FeeSharingSystem contract |
function harvestAndSellAndCompound() external nonpayable
Harvest pending WETH, sell them to LOOKS, and deposit LOOKS (if possible)
Only callable by owner. It is meant for emergency.
function harvestBufferBlocks() external view returns (uint256)
Name | Type | Description |
---|
- | uint256 | number of blocks between two consecutive harvests |
function lastHarvestBlock() external view returns (uint256)
Name | Type | Description |
---|
lastHarvestBlock | uint256 | block number of the last harvest |
function looksRareToken() external view returns (contract IERC20)
Name | Type | Description |
---|
- | contract IERC20 | address of the LooksRareToken |
function maxPriceLOOKSInWETH() external view returns (uint256)
Name | Type | Description |
---|
maxPriceLOOKSInWETH | uint256 | maximum price of 1 LOOKS (in WETH) times 1e18 |
function owner() external view returns (address)
Returns the address of the current owner.
Name | Type | Description |
---|
owner | address | address of the current owner |
function pause() external nonpayable
Pause
Only callable by owner
function paused() external view returns (bool)
Returns true if the contract is paused, and false otherwise.
Name | Type | Description |
---|
paused | bool | whether the contract is in pause status. If paused, new user deposits are suspended but withdrawals are available. |
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 rewardToken() external view returns (contract IERC20)
Name | Type | Description |
---|
- | contract IERC20 | address of the rewardToken (i.e., WETH) |
function startHarvest() external nonpayable
Start automatic harvest/selling transactions
Only callable by owner
function stopHarvest() external nonpayable
Stop automatic harvest transactions
Only callable by owner
function thresholdAmount() external view returns (uint256)
Name | Type | Description |
---|
- | uint256 | threshold amount (in rewardToken ) to trigger a sale on Uniswap V3 |
function totalShares() external view returns (uint256)
Name | Type | Description |
---|
totalShares | uint256 | number of total (secondary) shares |
function tradingFeeUniswapV3() external view returns (uint24)
Name | Type | Description |
---|
tradingFeeUniswapV3 | uint24 | trading fee for Uniswap v3 (e.g., 3000 --> 0.30%, 500 --> 0.05%) |
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 uniswapRouter() external view returns (contract ISwapRouter)
Name | Type | Description |
---|
- | contract ISwapRouter | address of the Uniswap V3 swap router |
function unpause() external nonpayable
Unpause
Only callable by owner
function updateHarvestBufferBlocks(uint256 _newHarvestBufferBlocks) external nonpayable
Update harvest buffer block
Only callable by owner.
Name | Type | Description |
---|
newHarvestBufferBlocks | uint256 | buffer in blocks between two harvest operations |
function updateMaxPriceOfLOOKSInWETH(uint256 _newMaxPriceLOOKSInWETH) external nonpayable
Update maximum price of LOOKS in WETH
Only callable by owner
Name | Type | Description |
---|
newMaxPriceLOOKSInWETH | uint256 | new maximum price of LOOKS in WETH times 1e18 |
function updateThresholdAmount(uint256 _newThresholdAmount) external nonpayable
Adjust threshold amount for periodic Uniswap v3 WETH to LOOKS conversion
Only callable by owner
Name | Type | Description |
---|
newThresholdAmount | uint256 | new threshold amount (in WETH) |
function updateTradingFeeUniswapV3(uint24 _newTradingFeeUniswapV3) external nonpayable
Adjust trading fee for Uniswap v3
Only callable by owner. Can only be 10,000 (1%), 3000 (0.3%), or 500 (0.05%).
Name | Type | Description |
---|
newTradingFeeUniswapV3 | uint24 | new trading fee for Uniswap V3 |
function userInfo(address) external view returns (uint256)
Name | Type | Description |
---|
- | address | address of the user |
Name | Type | Description |
---|
- | uint256 | number of shares of the user |
function withdraw(uint256 shares) external nonpayable
Redeem shares for LOOKS tokens
Name | Type | Description |
---|
shares | uint256 | number of shares to redeem |
function withdrawAll() external nonpayable
Withdraw all shares of sender
event ConversionToLOOKS(uint256 amountSold, uint256 amountReceived)
Name | Type | Description |
---|
amountSold | uint256 | amount of tokens sold (in rewardToken ) |
amountReceived | uint256 | amount of LOOKS received |
event Deposit(address indexed user, uint256 amount)
Name | Type | Description |
---|
user indexed | address | address of the user |
amount | uint256 | amount deposited in LOOKS |
event NewHarvestBufferBlocks(uint256 harvestBufferBlocks)
Name | Type | Description |
---|
harvestBufferBlocks | uint256 | number of blocks between two consecutive harvests |
event NewMaximumPriceLOOKSInWETH(uint256 maxPriceLOOKSInWETH)
Name | Type | Description |
---|
maxPriceLOOKSInWETH | uint256 | maximum price of LOOKS in WETH times 1e18 |
event NewThresholdAmount(uint256 thresholdAmount)
Name | Type | Description |
---|
thresholdAmount | uint256 | threshold amount (in rewardToken ) to trigger a sale on Uniswap V3 |
event NewTradingFeeUniswapV3(uint24 tradingFeeUniswapV3)
Name | Type | Description |
---|
tradingFeeUniswapV3 | uint24 | trading fee for Uniswap V3 |
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 Paused(address account)
Name | Type | Description |
---|
account | address | - |
event Unpaused(address account)
Name | Type | Description |
---|
account | address | - |
event Withdraw(address indexed user, uint256 amount)
Name | Type | Description |
---|
user indexed | address | address of the user |
amount | uint256 | amount received (in LOOKS) |