OriginProtocol / origin

Monorepo for our developer tools and decentralized marketplace application
https://www.originprotocol.com/developers
MIT License
652 stars 196 forks source link

Variable Finalization Windows #3007

Open micahalcorn opened 5 years ago

micahalcorn commented 5 years ago

For historical context, see https://github.com/OriginProtocol/origin/issues/1831 & https://github.com/OriginProtocol/origin/pull/1830 & https://github.com/OriginProtocol/origin/issues/1760 😔

Our current finalization window is set to 14 days from offer acceptance for all listing types. This is problematic for any purchase that involves scheduled, future or deferred seller fulfillment. Home sharing is the classic case with offers often being made and accepted months before the stay. But similar issues apply to other For Rent listings and services, which don't involve in-DApp scheduling but are likely to be provided at some unknown future date.

The marketplace contract supports both relative and absolute finalization window expiration dates. The relative date is bound to offer acceptance. There may be some argument for changing the way that (and the entire transaction flow) works, but my recommendation would be to just establish different strategies for setting absolute dates using the Javascript layer at the times that the offers are made. For example, housing offers could have their finalization window expiration dates set to be three days following the end of the reservation. Any offers that deviate from this standard could either be invalidated or produce a warning in the UI.

Thoughts @joshfraser @matthewliu @franckc @DanielVF @nick @tomlinton @shahthepro @sparrowDom @mikeshultz ?


At Origin, we use ZenHub to manage our engineering tasks and product development. Download their browser extension and check out our open workspace at github.com/originprotocol/origin#zenhub.

joshfraser commented 5 years ago

This could be a serious problem. We can't help people through arbitration once the funds leave the contact.

It's not just home-sharing, but anything that has a calendar. Car rentals or scheduled services also have the same issue. I think we enforce a new rule in Javascript that calculates the absolute date for anything with a calendar or schedule associated with it. Something like 3 days after checkout or end of the scheduled service?

We can add more granular control later.

tomlinton commented 5 years ago

3 days after the end of any fractional listing sounds reasonable and is a simple solution which we should be able to do quickly. We should try and get it out this sprint.