Closed greenlucid closed 2 years ago
strategy for edits in stake-curate: 0 edit validation or frontend protection contract side just allow an edit function that (if item is still valid, not being challenged, etc) emits an event with the new edited item if a challenge came, obviously the challenger wouldn't know about the edited item but just take note of the timestamp of the edition and the timestamp of the challenge in the subgraph. each item has an array of editions (ipfs uri and timestamp) this also allows the evidence groupid to remain the same during the lifecycle of the item
when an item is challenged the same block as it's edited, the (stake-curate) frontend will notify it and show you the previous edition (that happened in a different timestamp, beware multiple editions in the same block), the current one, and the challenge reason etc. you could notify of the frontran challenge status in the subgraph too
the block at which there's an edition, and the block at which theres a challenge are stored. if those blocks are the same, then lean towards the challenger (e.g. allow challenger to use previous edition) you can put rules on the list metaevidence to enforce correct challenge reason, so that if a challenger frontruns an edit to "figure out the reason later", then they lose
Current Curate doesn't have edit functionality and it's just lame. Stake Curate should make an effort to get it before it's too late
The scope of this issue is simply to add the edit method to the smart contract. Read my notes below and figure out what does the
editItem
method need, how does it work, etc. it should emit an event likeItemEdited
that broadcasts the new ipfs uri.it goes without saying that the method must be safe