epam / mintgate

1 stars 2 forks source link

F12: As NEAR User, I want to buy a Token listed on the Mintgate Marketplace #59

Closed zahhar closed 3 years ago

zahhar commented 3 years ago

WIP, going in position:

OLD:

  1. Verifies that amount paid in NEAR FT is >= than MinPrice stated by the Owner. [tbd: we want to allow GREATER OR EQUAL to allow buyers to support Creators/Sellers by sending them more money they they asked for, no restriction if Buyer wants to spend more].
  2. Marketplace calculates Fee as per attribute set globally for the whole Marketplace contract (as of now it is 2.5%) and pays it to the MarketplaceAdminAccountId (configurable, can be different from account where Marketplace contract deployed to).
  3. Marketplace calculates Royalty and pays it to the CreatorAccountId
  4. Marketplace calls NFT Contract nft_transfer to change the Owner of the TokenId sold.
  5. NFT Contract clears all the Approvals given earlier, so it wont be possible to sell Token again without new Approval from a new Owner.
  6. Marketplace deletes Token from listed items, so it is not returned with all Tokens listed at this Marketplace.

NB! Only NEAR FTs are accepted as payment method. Multi-currency is out of scope.

Jshanks21 commented 3 years ago
  1. Yes [tbd: This might be better as a secondary entry, like an additional tip for the order, to avoid instances where someone might accidentally input a higher amount than they intended. This would also be more intuitive for a user than overpaying for an item on purchase. Perhaps there could be a MaxPrice amount to avoid a similar user error.]
  2. Perfect
  3. Perfect
  4. Perfect
  5. Perfect
  6. Perfect

Question: When you say NEAR FTs do you mean the native NEAR currency, or other fungible tokens in the NEAR ecosystem?

zahhar commented 3 years ago

@Jshanks21 - for Point 1 I would offer to handle MaxPrice on UI. E.g. you may want to display a warning message if buyer is about sending larger amount then MinPrice, or provide one extra field called "Tips" and if it is filled, then sum(MinPrice,Tips) and then proceed to the wallet for confirmation.

I doubt we need a MaxPrice in either of the contracts.

zahhar commented 3 years ago

NEAR FT = NEAR native currency, right. All other Fungible Tokens that can ever exist on NEAR are out of scope completely.

zahhar commented 3 years ago

Payout_HashMap proposed by the NFT Contract will include Mintgate perpetual fee (configurable % and receiver accountId).