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

feat: stewards injector robot #13

Merged
merged 31 commits into from
Nov 9, 2024

Conversation

brotherlymite
Copy link
Collaborator

@brotherlymite brotherlymite commented Oct 10, 2024

Short Summary:

  • AaveStewardInjector: new robot contract to fetch latest update from risk oracle and inject into the risk steward.
  • RiskSteward: all keepCurrent values and same updates not allowed
  • EdgeRiskSteward: modified risk steward which only allows interest rate updates.

Please note: The huge diffs is because of the remapping change with v3.2 as we need to change the import paths.


Aave Steward Injector:

The AaveStewardsInjector is a chainlink automation compatible contract which checks if the latest update from the Edge Risk Oracle could be pushed to the Risk Steward, and if so it injects the update from the Edge Risk Oracle to the Risk Stewards. The AaveStewardsInjector should be set as the riskCouncil on the Risk Steward contract so it can inject updates.

Some important things to note about the AaveStewardInjector:

  • Although the AaveStewardInjector will be triggered by chainlink automation nodes, but the method to inject the update performUpkeep() is made permissionless by design to allow for manual trigger.
  • In case of any emergency the steward injector guardian can also disable injection of an updateId to the risk steward.
  • Updates consisting of WETH asset and the update type RateStrategyUpdate has been hardcoded to be only allowed for injection, if there are updates of any other params on the RiskOracle it will simple be ignored.
  • Only the latest update from the RiskOracle will be injected into the risk stewards, for simplicity if there were any older updates which was not executed by Injector it will be ignored as the latest update will be the ultimate source of truth.
  • If the update on the RiskOracle is invalid or not within the bounds of the RiskSteward, the call to the RiskSteward will revert. In practise, since it will be automated by chainlink automation, the automation nodes does an simulation before execution and as the simulation fails there will be no on-chain call.

Risk Steward:

  • Import path change as we now use the protocol v3.2 version from v3.1
  • We introduced Edge Risk Stewards which inherits from the Risk Steward contract and only allows Interest rate updates. This is done as a security measure, as at the time of activation we only wish to automate InterestRateUpdates for WETH on the lido instance.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@brotherlymite brotherlymite merged commit 650d51e into aave-dao:main Nov 9, 2024
0 of 2 checks passed
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