nolus-protocol/nolus-money-market

[Lease][State Query] Provide interest amounts estimated for a future point of time

Closed this issue · 0 comments

Currently, leases respond to state queries with their actual state and amounts. In the case of the "Active" state, that includes interests as of the last block.
In some scenarios, the app needs them projected in the future.
The Lease state query would take an optional non-negative number of seconds to accomplish that need. The seconds specify the moment in the future for which to estimate interest amounts.
The four interest amounts returned in the response would show the estimated amounts. The 'overdue_collected_in` would show the period relative to the future point of time.