RigoBlock / contracts

[DEPRECATED] directory of our contracts
Apache License 2.0
1 stars 0 forks source link

add user balance at fund in eventful #5

Closed gabririgo closed 6 years ago

gabririgo commented 6 years ago

check best way to create further filter for ui, possible to have one further ourput field in events: balance of user for such fund.

Logic: query balance, output in eventful. filter events by positive balance, so as to exclude funds which were bought in the past, sold, and no balance at fund exists

gabririgo commented 6 years ago

adds costs to eventful, but the biggest hurdle is that it might exceed the block gas limit.

Since the eventful contract cannot be upgraded, or we will lose the past transactions, will try to implement the functions inside a library which is used by eventful for making calculations.

Possibly this will provide better leverage for extending the protocol later, and we can add further fields as to allow adding further return values

gabririgo commented 6 years ago

user balance should be queried from the fund directly, as it's the only reliable source of data. If the endpoint cannot return correct values, the balance and its related checks could be incorrect. Closing as we already agreed on this