Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New range parameters #5

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

New range parameters #5

wants to merge 14 commits into from

Conversation

0x0Louis
Copy link
Collaborator

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[

/**
* @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

Choose a reason for hiding this comment

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

typo

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();

Copy link

@Mathieu-Be Mathieu-Be Oct 14, 2024

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