origin-js icon indicating copy to clipboard operation
origin-js copied to clipboard

Excess seller deposit is inaccessible unless listing is withdrawn

Open cuongdo opened this issue 5 years ago • 3 comments

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

cuongdo avatar Oct 02 '18 01:10 cuongdo

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?

nick avatar Oct 02 '18 01:10 nick

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.

cuongdo avatar Oct 02 '18 01:10 cuongdo

Yea thanks for filing this. This is definitely not high priority but at some point we should expect a minority of users to want to interact outside of Origin JS. Potentially just to screw around.

On Mon, Oct 1, 2018 at 6:16 PM Cuong Do [email protected] wrote:

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OriginProtocol/origin-js/issues/585#issuecomment-426114634, or mute the thread https://github.com/notifications/unsubscribe-auth/AEuxN5VRD-E4fX6JfYTqneuQEa19E8Jbks5ugr5qgaJpZM4XDJW1 .

-- Cofounder of Origin http://www.originprotocol.com

Join our Telegram http://t.me/originprotocol

matthewliu avatar Oct 02 '18 01:10 matthewliu