Skip to content

New range parameters - #5

Open
0x0Louis wants to merge 14 commits into
mainfrom
new-range-parameters
Open

New range parameters#5
0x0Louis wants to merge 14 commits into
mainfrom
new-range-parameters

Conversation

@0x0Louis

Copy link
Copy Markdown
Contributor

Refactor the contracts to allow different range settings:

  • delta rewarders: rewards LPs in [activeId + deltaBinA, activeId + deltaBinB[
  • static rewarders: rewards LPs in [binStart, binEnd[
  • oracle rewarders: rewards LPs in [oracleId + deltaBinA, oracleId + deltaBinB[

Comment thread src/oracle/LBHooksOracle.sol Outdated
/**
* @title LB Hooks Oracle
* @dev Abstract contract for the LB Hooks Oracle Rewarder
* This contract allows to distribute rewardsto LPs of the [oracleId + deltaBinA, oracleId + deltaBinB[ bins

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Comment thread src/oracle/OracleIdChainlink.sol Outdated
Comment on lines +68 to +70
if (answer <= 0 || uint256(answer) > type(uint128).max) revert OracleIdChainlink__InvalidPrice();
if (block.timestamp > updatedAt + _heartbeat) revert OracleIdChainlink__StalePrice();

@Mathieu-Be Mathieu-Be Oct 14, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this reverts it will prevent anyone from doing anything with the pair, isn't it a bit too much ? Of course we can disable the oracle but that would take a few hours, it might be more acceptable to just skip updating the id ? (meaning we store the previous answer of this function in the contract storage and use it if the oracle is failing for some reasons)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants