This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
ast3ros - Result from Chainlink oracle price is not checked for validity #127
Labels
Non-Reward
This issue will not receive a payout
ast3ros
medium
Result from Chainlink oracle price is not checked for validity
Summary
Chainlink oracle price is not checked for validity.
Vulnerability Detail
In Kept contract, the ETH price is retrieved from Chainlink oracle to calculate the keeper fee.
https://github.com/sherlock-audit/2023-07-perennial/blob/main/root/contracts/attribute/Kept.sol#L62
However, the price is not sufficiently validated. The
updatedAt
result is ignored and is not checked with a threshold to ensure the price is not too old.Impact
The stale price will lead to incorrect keeper fee calculation.
Code Snippet
https://github.com/sherlock-audit/2023-07-perennial/blob/main/root/contracts/attribute/Kept.sol#L62
Tool used
Manual Review
Recommendation
Add a checking
Duplicate of #159
The text was updated successfully, but these errors were encountered: