Open Walodja1987 opened 1 year ago
Mockup Design Link to Prototype: https://www.figma.com/proto/mcyci32XlFZJ8K1JZa25Ts/Diva-App?node-id=8133%3A49017&scaling=scale-down-width&page-id=5268%3A32007&starting-point-node-id=8133%3A49017
Link to design mockup: https://www.figma.com/file/mcyci32XlFZJ8K1JZa25Ts/Diva-App?node-id=8133%3A49017&t=gLMADVqnrjEFfk4F-4
Report Page
My Rewards Page
State: Wallet not connected
State: Wallet connected with Zero $TRB balance
Context
The goal of this PR is to implement a reporting Dashboard inside the DIVA App for pools that use the Tellor oracle as data provider. Mock-ups are attached in the comments.
Below an illustration of the DIVA Tellor reporting flow:
Implementation
Proposed implementation steps:
Report tab specs
In table, show pools where
0x63098cC6EDa33B0FbD07472B1a8dD54D4a5C2153
now
>=expiryTime - 24h
statusFinalReferenceValue != Confirmed
Pools can be in 4 different states. Those are reflected in the mock designs (each line represents one possible state):
State 1: Pool about to expiry (pool 91 in mock design) -> Enable "Add Tip" button only
State 2: Pool expired but no value has been reported yet (pool 91 in mock design) -> Enable "Report" and "Add tip" buttons
State 3: A value has been reported (pool 92 in mock design) -> Enable "Dispute" button only
State 4: A value has not been disputed for more than 12 hours (pool 93 in mock design) -> Enable "Settle" button and keep "Dispute" button enabled as well. "Settle" means calling the
setFinalReferenceValue
function in the DIVA Tellor adapter contract which will pull the value from Tellor smart contract and pass it on to the DIVA smart contract.If a value gets disputed, it gets back to pool state 92 if no other values have been reported or it stays in the same state if multiple values have been reported (e.g., via scripts)
Functionality
All the relevant functionality has been implemented in the tests scripts of the DIVA Tellor oracle adapter contract and can be used as a reference:
Tellor subgraph:
Contract addresses
There are two smart contracts that are relevant:
submitValue
functionsetFinalReferenceValue
is triggered after the minimum dispute period of 12h has passed and fees/tips are claimed fromTellor
0x3251838bd813fdf6a97D32781e011cce8D225d59
(playground version without staking requirements)DIVA Tellor oracle adapter
0x63098cC6EDa33B0FbD07472B1a8dD54D4a5C2153
(playground version with 10 sec min undisputed period)My Rewards tab specs
TODO
Header specs
TODO