woonetwork / WooPoolV2

Woo pool, version 2.0
MIT License
11 stars 2 forks source link

fix the bug in the deposit function #13

Closed simontianx closed 1 year ago

simontianx commented 1 year ago

A bug is fixed in the deposit function from

user.amount += _amount;
user.rewardDebt += (_amount * pool.accTokenPerShare) / 1e12;

to

user.amount += _amount;
user.rewardDebt = (user.amount * pool.accTokenPerShare) / 1e12;