I’m building a cryptocurrency market where consumers buy and sell mostly small-ticket items (worth $ 10 – $ 50) using cryptocurrency. However, I can’t find out how to design the market without going bankrupt due to miners’ fees.
SCENARIO:
Suppose we have a market of sellers and buyers where a consumer can be both a seller and a buyer. A buyer must deposit money into his account (the balance of the supplemental account) before he can spend cryptocurrency on the platform. For each new user, we would generate a unique address so that any money deposited to that address would be credited to that user. It makes it easy to know who to credit when we find a deposit for a particular address. My main problem is with payments to the seller and taking a platform fee (see below).
After the buyer purchases an item (using the account balance), the payment is held in escrow until the item is delivered to the buyer. Once the item is delivered, the payment is “transferred” to the seller without a 1.9% “platform transaction fee” (paid to the platform owner). A seller can withdraw his or her earnings at any time upon payment of a $ 5 flat withdrawal fee. Similarly, a buyer may withdraw his deposit (account balance) at any time for the same $ 5 flat fee. that a seller’s withdrawal typically involves payment received from hundreds of transactions (all originating from multiple buyers and numerous addresses). It may also include a deposit made by the seller himself to supplement his balance.
Once a single order has been completed (ie, a product is delivered) it is clearly not practical to transfer payment from the buyer’s wallet to the seller’s private wallet as this would always mean a “mining fee” that an order is placed on site. Instead we would rely on the internal ledger concept described in this answer.
In short, based on the ledger concept, if a product were to sell for $ 25, we would “credit” the seller with $ 25 worth of a particular type of cryptocurrency without actually broadcasting the transaction to the blockchain. Similarly, we would “deduct” the $ 25 crypto from the buyers balance (using an internal database, without actually broadcasting anything to blockchain). Now, let’s say a seller completes 100 transactions * $ 25 when Bitcoin is worth $ 10,000 per BTC. So we would now owe the seller $ 2,500 USD or 0.25 BTC (minus 1.9% platform fee).
Here is my problem:
When the seller chooses to withdraw its earnings, the 0.25 BTC would originate from 100 different addresses (100 buyers) which will obviously result in prohibitive miner fees. Similarly, since the website owner takes a 1.9% fee for each transaction, if the site owner wanted to aggregate all that little cryptocurrency gained from 100 addresses to 1 address, it would mean a similar process (and the relative cost would be much greater for her platform owner).
TIME SLOT METHOD
One solution to this problem would be to have all website users deposit funds in one cryptocurrency address. Of course, this makes it difficult to trace who’s who when making a deposit as everyone sends the same address. It is possible to dedicate an address to a single user for a period of time (“time slot”) and then credit the user with the dedicated “time slot” but this method is not ideal as we would need to track which user had access to the address at a specified period of time. Furthermore, users may not remember that allocating addresses is time sensitive and may in future deposit that address under someone else’s “time slot”. It is also very confusing for the user and would still require dozens of unique addresses if the site has multiple users. However, in theory this would resolve the main issue as the payment to the seller would originate in one direction.
Presumably, there are other solutions to this problem as there are many websites that have a similar function. Is there an industry standard solution to this problem? What are some of the methods?
Note: The market will support deposits in Bitcoin, Ethereum, Bitcoin Cash, Ripple, Litecoin, USDC and USDT.
Note: I am exposed to a native solution that relies on the blockchain client or API solution from a reputable company.