farm-army / farm-army-backend

Track your farming and pool performance on the Binance Smart Chain, Polygon, Fantom, KuCoin Community Chain, Harmony, Celo - https://farm.army - nodejs backend
https://farm.army
MIT License
107 stars 61 forks source link

Alpaca showing balances too high #21

Closed Tritium-VLK closed 3 years ago

Tritium-VLK commented 3 years ago

If you go to the farming page of an open farming posistion you see something like this:

image

Note the 3 BNB amounts. Posistion, debt and equity. The posistion is the total being farmed, the debt is how much is being borrowed to achieve that, and the equity is the difference, which is how much your posistion is actually worth if you withdraw.

Right now with FARM.army shows this: image which is 93 BNB which is the same as the posistion value shown on the site.

Basically you need to either grab the "equity" value of bnb, or subtract the debt from the posistion in order to get the actual equity.

Drop me a comment if you want a wallet address, but I think this is clear and should be easy to fix.

Haehnchen commented 3 years ago

"equity" is now calculated, feedback is welcome

Tritium-VLK commented 3 years ago

Looks perfect. Thanks a lot. Awesome project!