Submitted by TomFrenchBlockchain
Detailed description of the impact of this finding.
https://github.com/code-423n4/2021-11-vader/blob/3a43059e33d549f03b021d6b417b7eeba66cf62e/contracts/twap/TwapOracle.sol#L156
On L156 of TwapOracle we perform the calculation:
This seems extremely odd as for an 18 decimal token were then calculating
This is just plain weird. I expect what was meant is to replace this line with the below so were properly scaling for tokens number of decimals.
Marked as high severity as this exchange rate appears to be used in some form of minting mechanism and correctness of the oracle is listed as one of the key focuses of the audit.
As above.
SamSteinGG (Vader) confirmed
