Submitted by csanuragjain, also found by kirk-baird and unforgiven
It was observed that addPool function is not checking for duplicate lpToken which allows 2 or more pools to have exact same lpToken. This can cause issue with deposits.
In case of duplicate lpToken, the first pool calling depositAll will take away all lpToken and deposit them under there own pid. This leaves no balance for 2nd pool.
Add a global variable keeping track of all lpToken added for pool. In case of duplicate lpToken addPool function should fail.
jetbrain10 (veToken Finance) confirmed and commented:
Alex the Entreprenerd (judge) commented:
