Added donation for the APY calculation and for the history/earning endpoint

This replaces PR 256

  • Added .idea to gitignore, for GoLand developers
  • Added donation rewards in the earnings/history endpoint, which has a similar structure than pool rewards. The big difference is that the donation can be done with an asset, which needs to be converted to runes. Thus, the historic asset price is fetched first, and the asset in rune is calculated.
  • Tests have been added for testing the earning endpoint (TestEarningsDonations)
  • Added donation to the stats endpoint. The donation have an influence on the APY, so without the donation the APY is calculated differently. Also here, the donation can be with assets, so the assets need to be converted to runes, which is done at the current market price.
  • Added 2 testcase, one for donation only, one for donation and liquidity

Merge request reports

Loading