NearDeFi / burrow-cash

burrow-burrow.vercel.app
The Unlicense
3 stars 15 forks source link

rewardPerDay precision fix #351

Closed csrudy closed 2 years ago

csrudy commented 2 years ago

Came across this mismatch for precision on shares in the rewardPerDay calculation.

I believe the boostedShares should be measured against asset decimals of the underlying farm and not the reward token's decimals. I think this may have gone under the radar because most assets are using 18 decimals, and Burrow pads extra decimals for small decimal tokens like USDC, but this could be an issue for inflating or deflating a user's share if the asset token has 24 decimals and reward token has 18 decimals.

vercel[bot] commented 2 years ago

@csrudy is attempting to deploy a commit to the Burrow Team on Vercel.

A member of the Team first needs to authorize it.

ciocan commented 2 years ago

Thank you @csrudy for spotting this