Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show amount of token earned #1

Open
2 tasks
DecentralizedDan opened this issue Sep 12, 2022 · 9 comments
Open
2 tasks

Show amount of token earned #1

DecentralizedDan opened this issue Sep 12, 2022 · 9 comments
Labels
backlog Something we want to do in the future feature New feature or request $ILOCK Features related to $ILOCK UI Features related to UI
Milestone

Comments

@DecentralizedDan
Copy link
Contributor

DecentralizedDan commented Sep 12, 2022

UI should show how much token the user has earned

TASKS:

  • Create script to call rewards contract token_earned getter. (This is Blair's deliverable, per ILOCK-smartcontracts, issue #179.)
  • Integrate script into extension logic (UI display, script control, etc).

GanttStart: 2023-09-01
GanttDue: 2023-11-30

@DecentralizedDan DecentralizedDan added feature New feature or request urgent Must be completed next UI Features related to UI labels Sep 12, 2022
@DecentralizedDan DecentralizedDan added the $ILOCK Features related to $ILOCK label Sep 12, 2022
@jmercouris
Copy link
Contributor

Agreed!

@blairmunroakusa
Copy link
Contributor

blairmunroakusa commented Sep 13, 2022

(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

@DecentralizedDan
Copy link
Contributor Author

DecentralizedDan commented Sep 13, 2022

@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.

  • @jmercouris lmk what you think about this
  • Solid point about batching rewards

@jmercouris
Copy link
Contributor

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.

@DecentralizedDan
Copy link
Contributor Author

@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?

@jmercouris
Copy link
Contributor

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.

@DecentralizedDan
Copy link
Contributor Author

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.

  • But maybe we just update the extension after 3 weeks (or 6...) and check a canonical record of how much they've earned so far
    • 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

@blairmunroakusa
Copy link
Contributor

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.

@jmercouris
Copy link
Contributor

That's good to know, thanks for the info Blair!

@DecentralizedDan DecentralizedDan added this to the 1.1.0 milestone Sep 14, 2022
@DecentralizedDan DecentralizedDan removed the urgent Must be completed next label Nov 28, 2022
@DecentralizedDan DecentralizedDan added the backlog Something we want to do in the future label Jun 13, 2023
@jmercouris jmercouris removed their assignment Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Something we want to do in the future feature New feature or request $ILOCK Features related to $ILOCK UI Features related to UI
Projects
None yet
Development

No branches or pull requests

3 participants