passport
passport copied to clipboard
Notification and UI Update for Slashed GTC in Identity Staking v2 App
User Story:
As a user of the Identity Staking v2 App who has experienced a GTC slashing, I want to see a clear notification of the slashing event and have the staking widgets be visually distinct (greyed out), So that I am aware of the change in my staking status and understand that staking functionality is temporarily restricted.
Acceptance Criteria
GIVEN my GTC has been slashed, WHEN I log into the Identity Staking v2 app, THEN I see a prominent notification informing me of the slashing and all staking-related widgets are greyed out to indicate that they are not operable until the issue is resolved.
Product & Design Links:
Design Specifications for Slashed GTC Notification
Tech Details:
- Implement a frontend notification component that displays slashing information.
- Adjust the CSS styling of staking widgets to reflect a "disabled" state visually.
- Ensure backend services have appropriate endpoints to inform the frontend of a slashed state.
- Frontend must poll or receive a push notification about the slashing state upon login or in real-time if logged in.
Open Questions:
- [ ] Should there be an instructional tooltip or help link explaining why the widgets are greyed out and what steps to take next?
- [ ] What is the expected time for the resolution of a slashing event before the user can stake again?
Notes/Assumptions:
- It is assumed that the user will be informed of the appeal process or any other steps they must take following a slashing event.
- We are assuming that the "greyed out" state should be clear and not confuse users into thinking there is a UI malfunction.
Technical comments:
- we'll need an API to return this information, based on the indexed events in the DB (we might as well extend the current
getStakes
API). We might want to pass in the current round number as a parameter from the UI, or alternatively determine that based on the burn events in the indexer, and store in the DB. - we have the round number when a user was potentially slashed in the contract
- each slash event records also the round number
Questions: @erichfi whey do we need to gray out everything and make it inoperable? Users might want to stake again, shall they not be allowed to?
In addition to the other comments above:
- what if we need to display multiple notifications to the user? Like he has been slashed + the stake has expired / is unlocked. The current design does not support multiple notifications.
Just brainstorming:
- it would be nice to have an event log page (or section), where a user would see all the events for a user:
- stake
- unlock
- withdrawal
- slashing events