Submitted by Lambda, also found by imare, indijanc, MiloTruck, zzzitron, chaduke, bctester, Aymen0909, The_GUILD, RustyRabbit, phaze, 0x52, ladboy233, and KingNFT
LBToken.sol#L237
In LBToken._burn, the _beforeTokenTransfer hook is called with from = address(0) and to = _account:
Through a lucky coincidence, it turns out that this in the current setup does not cause a high severity issue. _burn is always called with _account = address(this), which means that LBPair._beforeTokenTransfer is a NOP. However, this wrong call is very dangerous for future extensions or protocol that built on top of the protocol / fork it.
Lets say the protocol is extended with some logic that needs to track mints / burns. The canonical way to do this would be:
Such an extension would break, which could lead to loss of funds or a bricked system.
Call the hook correctly:
0x0Louis (Trader Joe) confirmed
Alex the Entreprenerd (judge) commented:
