White-Whale-Defi-Platform / white-whale-core

Core contracts for White Whale, The Interchain Liquidity Protocol for the Cosmos.
https://whitewhale.money
MIT License
36 stars 23 forks source link

Expose weight calculation given epochs #260

Open kerber0x opened 7 months ago

kerber0x commented 7 months ago

If you want to report a security issue, please follow our security policy: https://github.com/White-Whale-Defi-Platform/migaloo-core/blob/main/SECURITY.md


Improvement description

To display the rewards correctly, the frontend needs information about the weight of an address in the whale lair.

Currently, the weight epoch returns the weight for an address on a given timestamp, or the current timestamp otherwise.

The frontend needs some sort of cumulative weight calculation, similar to what it's done when claiming the rewards.


Additional context

Add any other context here, code snippets, json responses, screenshots and so on.

Code sample ```rust ```
Logs ``` ```
Screenshots ``` ```