origin-js
origin-js copied to clipboard
Add seller stake to Listing data in IPFS
In order to support seller staking (see UI mocks), we'll need to make changes to listing data stored in IPFS:
- Update the listing JSON schema to add a separate field to store the amount of tokens stakes (perhaps named "sellerStake" or equivalent).
- Have origin-js marketplace.createListing() method populate that data based on input from seller captured by the DApp on the listing creation form.
On the contract side:
- the combined amount (commission + seller staking) should be stored in the existing "deposit" field of the Listing contract structure. No change should be needed there.
- The stake should get refunded to seller. Product requirements still to be confirmed. This should likely happen when either a) seller withdraws a listing or b) listing gets sold out.
- Seller stake should play a role in arbitration - the seller should lose some or all her stake in case of bad behavior. Product requirements TBD.
CC @micahalcorn
@matthewliu To give you some context, I'm trying to understand if I should add staking to the Listing JSON schema for data stored in IPFS now vs after V1. Could you comment on the following to help me understand the directions and make that decision ?
- How soon do you expect we'll implement seller staking ? Is it a high priority right after V1 ?
- Could you clarify the product requirements or point me to a doc ?
Related: https://github.com/OriginProtocol/origin-js/issues/307