Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

p0wd3r - Oracle is not checking for sequencer uptime #53

Closed
sherlock-admin opened this issue May 10, 2023 · 0 comments
Closed

p0wd3r - Oracle is not checking for sequencer uptime #53

sherlock-admin opened this issue May 10, 2023 · 0 comments
Labels
Non-Reward This issue will not receive a payout

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented May 10, 2023

p0wd3r

medium

Oracle is not checking for sequencer uptime

Summary

The Arbitrum Sequencer can allow tx to be queued while the L2 is offline, these will pass the freshness check but use outdated prices.

Although the project team stated in the documentation that Chainlink's failure is acceptable, I believe this situation is different because it makes the system unfair. Attackers can use non-real-time prices for trading while most normal users cannot trade properly.

Vulnerability Detail

Because of how Arbitrum works, if the L2 goes offline, tx can still be sent via the Delayed inbox on L1.

This could allow the creation of orders which use prices from when the Sequencer was down, which would still pass the freshness check, but may be incorrect or outdated.

If Chainlink failure results in the same impact on all users, then I think it is acceptable. However, the project team needs to avoid situations that create unfairness.

Impact

Attackers can use non-real-time prices for trading while most normal users cannot trade properly.

Code Snippet

https://github.com/JOJOexchange/smart-contract-EVM/blob/main/contracts/adaptor/chainlinkAdaptor.sol#L46
https://github.com/JOJOexchange/JUSDV1/blob/011e10d36257a404c8c1d7d2b8c9f01a2b7a1969/src/oracle/JOJOOracleAdaptor.sol

Tool used

Manual Review

Recommendation

Chainlink provides a solution: https://docs.chain.link/data-feeds/l2-sequencer-feeds#example-code

Duplicate of #101

@github-actions github-actions bot added Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels May 17, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label May 30, 2023
@sherlock-admin sherlock-admin added Non-Reward This issue will not receive a payout and removed Medium A valid Medium severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label Reward A payout will be made for this issue labels Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Non-Reward This issue will not receive a payout
Projects
None yet
Development

No branches or pull requests

1 participant