Open DecentralizedDan opened 1 year ago
Agreed!
(I believe) User wallet balance should also display. Also, rewards generated should be posted/displayed every time they are 'claimed'. Further, rewards should be batched (perhaps displaying rewards total and rewards earned during a day). Batching (daily?) must be employed to lower costs of Interlock processing rewards transactions on-chain !OR! we will need to make the extension into a wallet, which may be way too costly dev-wise to implement (which would allow users to sign their own rewards collection transactions, paying tx fee in AZERO). Further, it may actually be impossible to (securely) process rewards transaction from the extension client...it may need to be an Interlock relay transaction, but this latter bit is probably more appropriate for a different issue. At the least, we need to have a discussion, in tandem with issue 6.
@DecentralizedDan @jmercouris
@blairmunroakusa
User wallet balance should also display
Why? For the MVP at least I envision simply showing how much token they've ever earned historically, not their realtime balance of tokens.
For the MVP we can simply show an estimate of how much they've earned by doing some calculations based on the actions they've submitted. There is no need to integrate with the wallet and show the real amounts ,or the historical amounts. This way we do not actually incur any transaction costs. We could have a button that they can click that will send an intent to open up the wallet app on their system to show their real balance.
@jmercouris
an estimate of how much they've earned
Is this an estimate of how much they've earned in these two weeks? By "historical" I meant how much they've ever earned all put together (running total). Is that different than what you mean?
It's not different with regards to information displayed. I am suggesting that we make no connection to the actual wallet whatsoever. We simply show estimates from the user data client side. So, we can show whatever data we like, whether it is historical, past two weeks etc, but calculate it all client side.
Maybe for the MVP what you're describing would be enough. I'm inclined to not trust client-side data for this in particular bc the extension could uninstalled and reinstalled, making the user think they've lost all their data, etc.
FWIW this is different than their wallet contents, bc I only ever want to show them how much they've earned total, not their current balance after selling etc
Yeah, MVP rewards contract will have a public state mapping for total rewards awarded to a given address. This way people can verify that they were actually rewarded what they were told.
It's not different with regards to information displayed. I am suggesting that we make no connection to the actual wallet whatsoever. We simply show estimates from the user data client side.
We only need to connect a wallet if we are forcing users to pay fee for rewarding on smart contract. Since we probably wont be doing this, we will only need knowledge of the account the user wishes their rewards transferred to. In any case, user will need to input this address into the extension directly, and this will be the identifier we use to get reward info for user on clientside.
Why? For the MVP at least I envision simply showing how much token they've ever earned historically, not their realtime balance of tokens.
Good catch, this is what I meant (a historic total).
So, likewise clientside, displaying information from the blockchain can all be done from client. Getting any information from the blockchain is free. Thus, UI displays can be updated as needed, to display real time information about historic rewards or wallet balances without needing to integrate any wallets into extension.
That's good to know, thanks for the info Blair!
UI should show how much token the user has earned
TASKS:
token_earned
getter. (This is Blair's deliverable, per ILOCK-smartcontracts, issue #179.)GanttStart: 2023-09-01 GanttDue: 2023-11-30