oxen-io / oxen-improvement-proposals

The Loki Improvement Proposal repository
MIT License
11 stars 12 forks source link

Revolutionizing Payments: Crypto Wallet Integration in Session Private Messenger #44

Open venezuela01 opened 11 months ago

venezuela01 commented 11 months ago

Revolutionizing Payments: Crypto Wallet Integration in Session Private Messenger

The community has expressed interest in integrating a wallet within Session, yet in-depth discussions on this topic have been limited. This proposal aims to delve into the untapped potential and unique opportunities presented by the integration, many of them haven’t been mentioned before.

1. Reducing Wallet Syncing Overhead

Blockchain consensus algorithms require wallet clients to sync with the remote blockchain. On mobile platforms, wallet apps typically don't support background syncing. Crypto wallets, which are infrequently used but often critical, may have local ledgers out of sync when users urgently need them, resulting in resyncing times that range from seconds to minutes.

In contrast, messenger apps are used more frequently, as people communicate more often than they make payments. Integrating a wallet into a messenger app allows for blockchain synchronization to occur silently in the a non-UI thread while users chat in foreground. This means users can quickly access up-to-date local ledgers when making payments, checking balances, or performing other wallet tasks, reducing wait times to under a second.

For users with multiple devices, we can establish a mechanism to sync wallet balance snapshots. One device would store an encrypted balance snapshot on the Oxen Storage Server, allowing the other devices to download and import that snapshot. This approach would eliminate the need for each device to individually sync the full chain.

2. Streamlining Micropayments to Conceal Confirmation Time

Traditional crypto wallets usually require a minimum of one block confirmation time to acknowledge incoming transfers, in case of Oxen it takes 2 mins. The integration of a crypto wallet into Session can effectively obscure this blockchain confirmation time for micropayments.

When publishing transactions to the public blockchain, senders can simultaneously transmit unconfirmed transaction data to recipients via direct messages within Session. This process grants recipients immediate access to unconfirmed transactions, decreasing wait times from two minutes to less than two seconds—a more suitable duration for micropayments.

Imagine a line of customers ordering coffee; waiting two minutes for payment confirmation would be unfeasible. The wallet integration within Session allows for instantaneous unconfirmed transactions, enabling cafés to commence coffee preparation upon receipt of unconfirmed transaction data. The time required to prepare the coffee bridges the gap, ensuring eventual payment confirmation.

To safeguard transaction security, a monitoring system can be incorporated into the recipient's integrated wallet. By publishing a copy of the incoming unconfirmed transaction and keeping an eye on the blockchain, the recipient identifies any rejected or timeouted transactions within a timeframe that does not exceed the coffee-making duration. If any such transactions are detected, a notification alerts the business owner to resolve the issue prior to delivering the coffee. In over 99% of instances, this would work seamless, considerably enhancing the user experience in micropayment situations.

3. Onion Routing for Transaction Publishing

For most crypto wallets, when a user sends a transaction, their IP address can be exposed to the blockchain node they connect to. Some wallets use Tor to hide sender’s IP, but others don't. With a wallet in Session, transactions could publish through Lokinet or Onion Requests, giving users better privacy protection.

4. Dedicated Address per Contact

Integrating a crypto wallet into Session allows for associating different contacts with different sender or recipient addresses. This avoids reusing the same address among different people without increasing management costs, as the Session app can handle the contact-wallet mapping. This approach improves privacy and user experience at the same time.

5. Emulating Opt-Out Style Subscriptions with Client-Side Pseudo-Recurring Payments

Opt-out style subscriptions refer to a payment structure that automatically enrolls users into recurring services or products, until they manually cancel the subscription. This model is effectively managed in traditional financial systems by centralized entities such as banks. However, most cryptocurrencies do not support this feature. In contrast, cryptocurrencies typically require manual renewal of payments each billing cycle.

Session's messenger app can offer a solution with client-side pseudo-recurring payments. When a user manually opens the Session app on a billing day, the wallet can send the transaction silently in a non-UI thread, avoiding technical issues with on-chain subscription payments. If the user misses the billing day, the wallet can scan for outstanding payments when the user open it next time and sends the delayed transaction.

To prevent unintended transactions, timestamps should be constructed from remote block height, and a per-subscription pre-allocated sub-wallet should be used to store only the required amount for a limited number of billing cycles. This approach reduces the impact of a buggy client-side pseudo-recurring payment implementation on the user's overall wallet balance and increases subscription payment security.

6. Enhancing the User Experience of Multisig Wallets

Integrating the creation, deposit, spending, signing, and verifying processes of multisig wallets into a Session closed group can create a breakthrough solution for multisig transactions. Multisig wallet operations often involve a lot of message passing back and forth between multiple parties. Session group conversation is the natural playground for this, and some of the workflow can be automated by the Session clients.

7. Boosting Session's Market Presence with Multi-Crypto Support

Session has the potential to become a one-stop wallet hub by supporting not only Oxen but also many other cryptocurrencies. This move would not only benefit other currencies but also strengthen Oxen's position in the long run.

As users of various cryptocurrencies become more familiar with the wallet features in Session, they will start to recognize the Oxen token, just like how Binance traders eventually discover the BNB token. By serving as a common ground for all crypto users in the Session wallet, Oxen can become a focal point between users who are unsure of which cryptocurrency the other party prefers, much like how New York's Grand Central Station is a central meeting place for those unsure of where to go.

The global cryptocurrency user base is exceeding a hundred million and growing at a rate of over 30% annually, and this trend is set to continue. By supporting multiple cryptocurrencies, Session can ride this wave for free. This move would solidify Session's market presence, increase Oxen adoption, and open up new opportunities for monetization in the long run.

8. Chainflip Integration in Session Wallet

If multi-crypto support is embraced in the Session wallet, integrating Chainflip support would be a natural next step, creating a smooth experience for Chainflip users, and benefiting both the Chainflip ecosystem and the Session ecosystem.

9. Future Oxen Improvements Based on Lessons Learned from Other Cryptos

Integrating multi-crypto support in the Session wallet allows the development team to gather feedback from users of various cryptocurrencies. As a result, they can identify and address the most common or critical pain points and use this knowledge to improve Oxen.

10. Empowering Third-Party Businesses

The existing PySogs infrastructure could serve as a solid foundation for designing a CRM (Customer Relationship Management) system that leverages Session ID as a SSO (Single Sign On) account with integrated payment capabilities. In this setup, each customer would have access exclusively to their individual conversation stream with the business owner. Group moderators would function as sales support, and the group administrator would have the authority to assign or dismiss sales support staff by adding or removing Session IDs as moderators.

The in-app default Community selection panel could offer entry to the Lokinet Exit marketplace, featuring VPN service providers who partner with OPTF. Session can introduce privacy-sensitive users to VPN providers, offering a communication and payment platform, while VPN providers contribute to the Session ecosystem and pay a commission to buy and burn Oxen for the network. See Oxen Monetization: Integration of Lokinet Marketplace Referral Program in Session for more details.

Over the past decade, the cost-per-acquisition in the VPN industry has increased from a few dollars to nearly a hundred, accompanied by a rising customer churn rate year over year. Session has over 700k users and is continuing growing, by consistently directing new customers to VPN providers, Session can establish its market position within the VPN industry.

Conclusion

In conclusion, integrating a crypto wallet into Session's private messenger offers numerous advantages, including improved user experience, reduced wait times, seamless transactions, and enhanced privacy. By supporting multiple cryptocurrencies, Session can attract a diverse user base, create a network effect, and encourage the eventual adoption of Oxen, leveraging its unique position as a privacy-centric coin. This integration presents innovative solutions for micropayments, multisig wallets, subscription payments, and more, while fostering partnerships and collaborations within the industry. Ultimately, the integration of wallet services into Session can revolutionize the way users interact with cryptocurrencies and solidify Session's presence in the market.

venezuela01 commented 11 months ago

CC @KeeJef @degenrocket

degenrocket commented 11 months ago

That is a great proposal with many new ideas and it's aligned with the SessionX vision (#38) of integrating a privacy coin into the Session app.

  1. Dedicated Address per Contact

There are multiple ways how to handle addresses:


I'd also add that for a better user experience a public and private key-pair for the Session ID and cryptocurrency seeds can be derived from the same entropy generated during the registration process as described in the Technical implementation section of the SessionX proposal (#38).

venezuela01 commented 11 months ago

@degenrocket, thanks for reading and commenting. Yes, we shared a lot of common ideas.