Lucene search

K
code423n4Code4renaCODE423N4:2021-09-SUSHITRIDENT-FINDINGS-ISSUES-83
HistorySep 29, 2021 - 12:00 a.m.

IndexPool performs several unsafe type casts

2021-09-2900:00:00
Code4rena
github.com
4

Handle

cmichel

Vulnerability details

The IndexPool.burn/burnSingle/swap/flashSwap functions all perform unsafe type casts to uint120 without checking if the values actually fit into 120 bits.

Impact

Unlike mint, these functions have other require statements and checks that don’t seem to directly lead to exploits.
The safe type casts should still be implemented for additional security.

Recommended Mitigation Steps

A SafeCast library must be used everywhere a typecast is done.


The text was updated successfully, but these errors were encountered:

All reactions