Dryec / tron-wallet-android

Apache License 2.0
55 stars 38 forks source link

Implement Tron Kiosk whitepaper as "merchant mode" in Tron Wallet #15

Open jcisemer opened 6 years ago

jcisemer commented 6 years ago

Feature request Implement the Tron Kiosk whitepaper, published on July 21, 2018, as a merchant mode in Tron Wallet. Tron Kiosk envisions a lightweight mobile point of sale client for retail/service businesses. Implemented in Tron Wallet, any merchant would be able to use the existing Tron Wallet app and toggle a button to switch into merchant mode. Any merchant could then use Tron Kiosk's cash register-like frontend to: build individual transactions based on available inventory previously added by the merchant into the app; present users with a QR code of a TRX address to scan upon time of checkout to complete customer-to-merchant payment; process the entire transaction in TRX; search through previous transactions; and review the shop's sales analytics over time. Virtual gift vouchers in TRX, added to the merchant's inventory by default, would also allow the merchant to exchange any denomination of fiat currency into TRX, simultaneously turning any Tron Kiosk merchant into a fiat currency-to-TRX exchange.

Detailed whitepaper https://docs.google.com/document/d/1VIysFeiamSXwNBQwDrBicNUjFlDyQqgL-jO54Yc0iHo/view

Business model Alternative A: Preferred revenue model is to retain 1% of gross merchandise value (GMV) processed in TRX (versus, for example, 2.75% by Square) as a transaction fee, which is automatically charged in TRX via a smart contract upon customer paying the merchant the full transaction amount in TRX. Of this 1% transaction fee on total GMV, retained in TRX, into perpetuity:

Alternative B: No transaction fees are charged at all, making Tron Kiosk available inside of the Tron Wallet app entirely for free. While supposedly appealing at first casual glance, this approach has one very clear drawback of missing any monetary community incentives to spread "word-of-mouth marketing". If the 1% transaction fee per transaction is not charged and esp. the 80% of that retained transaction fee is not shared back to reward current voters of Tron SR "Tron Society", the community has no hard and permanent monetary incentive at all to spread "word-of-mouth marketing" for Tron Kiosk.

jcisemer commented 6 years ago

Mockups The proposed implementation of the Tron Kiosk whitepaper in Tron Wallet is visually envisioned as follows:

tron-wallet-tron-kiosk-1
  1. In Tron Wallet, a new navigation icon is added to the bottom row to toggle Tron Kiosk "merchant mode"
  2. Upon first use, the merchant defines their country's local sales tax rate and a local currency (e.g. USD, EUR, etc.) for easy TRX-to-local currency comparisons (which are both saved as global variables)
  3. Analysis screen shows total store revenue in TRX for a selected time frame, change in revenue over previous time frame, as well as top selling categories and top selling products for the selected time frame
tron-wallet-tron-kiosk-2
  1. Via a simple tabbed cash register front-end, the merchant can easily add (or remove) products to a new transaction while a running counter at the top keeps track of the transaction's current subtotal and also displays the last item added to the transaction for quick visual confirmation
  2. Transaction summary is presented on merchant's device for merchant to show to customer that purchase looks good
  3. Merchant shows QR code of the merchant's TRX address for the customer to scan, while app is simultaneously checking the purchase progress if the merchant has received the money from the customer
tron-wallet-tron-kiosk-3
  1. Merchant can search through details of previous transactions and quickly identify which transactions are still waiting for Tron blockchain confirmation vs. which transactions have been successfully confirmed
  2. Merchant can search through product inventory in an inventory viewer, including TRX virtual vouchers that have automatically been added to any merchant's inventory (to allow any Tron Kiosk merchant to exchange any denomination of fiat currency into TRX, simultaneously turning any Tron Kiosk merchant into a fiat currency-to-TRX exchange)
  3. Merchant can add or update product inventory or product categories
jcisemer commented 6 years ago

Data model

Global settings CREATE TABLE TronKioskSettings ( settings.sales_tax_percentage DECIMAL(5, 2), settings.local_currency_code CHAR(3), settings.tron_address_merchant CHAR(34) )

Product categories CREATE TABLE TronKioskProductCategories ( product_category.id INT(64), product_category.name TEXT )

Product inventory CREATE TABLE TronKioskProductInventory ( product_category.id INT(64), product.id INT(64), product.gtin CHAR(14), product.name TEXT, product.image_link TEXT, product.unit_amount INT(64), product.crypto_currency_code CHAR(8), product.price DECIMAL(64,18), product.wholesale_price DECIMAL(64,18), product.inventory_amount INT(64), product.discount_percentage DECIMAL(5, 2), product.sales_tax_percentage_override DECIMAL(5, 2) )

Transaction individual receipt CREATE TABLE TronKioskTransactionReceipt ( transaction.id INT(64), product.id INT(64), product.crypto_currency_code CHAR(8), product.price DECIMAL(64,18), product.quantity_purchased INT(64), product.discount_percentage DECIMAL(5, 2), product.sales_tax_percentage DECIMAL(5, 2) )

Transaction history CREATE TABLE TronKioskTransactionHistory ( transaction.id INT(64), transaction.date DATETIME(), transaction.confirmation BOOLEAN, transaction.tron_address_customer CHAR(34) )