Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Excess seller deposit is inaccessible unless listing is withdrawn #585

Open
cuongdo opened this issue Oct 2, 2018 · 3 comments
Open

Excess seller deposit is inaccessible unless listing is withdrawn #585

cuongdo opened this issue Oct 2, 2018 · 3 comments

Comments

@cuongdo
Copy link
Contributor

cuongdo commented Oct 2, 2018

Consider the following scenario:

  1. Seller creates listing with commission of 100 OGN, which createListing transfers to the Marketplace contract
  2. Buyer makes an offer with a commission of 25 OGN
  3. Seller accepts offer
  4. Buyer finalizes. Marketplace contracts pay 25 OGN to the affiliate, because affiliate payouts are based on the commission specified in the offer.

Now there's an excess commission of 75 OGN that's held by the Marketplace contract. The only way the seller can recover those funds is by withdrawing the listing. This is undesirable from a UI point of view.

There are other cases where we actually do want the marketplace contract to hold tokens after an offer finalizes:

  1. Multi-unit purchases, such as concert tickets
  2. Fractional usage listings, such as home rentals. The seller may pay commission for each completed reservation, so a single reservation would not use up all the commission.

However, when there is a single item for sale (as there will be with our v1 launch), we might want to consider auto-refunding any excess commission to the seller upon finalization.

This is a little nuanced, so I'm posting as much detail as I can here.

cc @micahalcorn @nick

@nick
Copy link
Member

nick commented Oct 2, 2018

For v1 my understanding that the buyer will always submit an offer for the full commission amount specified by the seller. So, unless the buyer is not using origin-js, I'm not sure this situation would arise?

@cuongdo
Copy link
Contributor Author

cuongdo commented Oct 2, 2018

Yes, this can only happen if someone is not using origin-js. I'm not putting a high priority on this issue, but I thought it best to at least record it.

@matthewliu
Copy link
Member

matthewliu commented Oct 2, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants