Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 584 Bytes

File metadata and controls

7 lines (4 loc) · 584 Bytes

Incorrect mask size when decoding oracleId parameter

The function _getOracleParameters present in the LBPair decodes the oracle parameters from storage by manually sloading the slot and applying bit math to extract the individual values.

The decoding of the oracleId is correctly offset by 224, but it applies a mask of 24 bits, while the size of this variable is 16 bits (see the definition in the PairInformation struct).

This may lead to incorrectly reading the variable and decoding it with a wrong value, since the function is reading outside the variable bounds.