Skip to content

Tap is a cash app that makes sending, spending, and earning cash easy. Built for everyone. Powered by solana and USDC.

License

Notifications You must be signed in to change notification settings

austinmilt/tap-cash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tap

digital cash, for everyone. tap is a user-first mobile cash app designed for mainstream adoption.

Submission to 2023 Solana Grizzlython Submission by:

Resources

Summary of Submission Features

  • SSO with Gmail
  • Multi-sig “semi-custodial” cash account
  • Credit Card onramp
  • Feeless peer-to-peer transfers
  • Parsed Solana Transactions Activity Feed
  • Live on Solana Devnet
  • Live on Android

Tech Stack

Detailed User Flow

New Users

Users create an account by logging in with gmail account.

  • Users are authenticated and receive a non-custodial Solana wallet via Web3 Auth.
  • On account initiation, the tap program (Devnet: TAPAPp2YoguQQDkicGyzTzkA3t4AgECvR1eL1hbx9qz) initiates a new Member PDA for the Tap "Bank".
  • A user "Checking" account is created (seeded on the member PDA), and a USDC ATA owned by the member account is initiated.
  • All initiation fees and rent are paid by the Tap Bank.

Deposits

  • Users deposit funds to their account a credit card using the Circle payments API
  • Currently, devnet assigns a random credit card to the user (manual credit card entry is disabled)
  • On confirmation of payment, funds are transferred from tap account to users USDC token account
  • Balance is updated on users homepage and the transaction on recent activity (custom parsed Solana transaction history)

Transfers

  • Users can initiate a peer to peer transfer via the "Send" button on the home page.
  • Users query other tap members via a search that looks up other members by email via our Google Backend.
  • Users select a user and amount and send the transaction to our backend.
  • The program transfer function requires 3 signatures: the Program, the tap Bank authority, and the user.
  • Once the transaction is confirmed on chain, balance and transfer are updated on the user homepage.

tap User Flow

Present Limitations/Known Issues

  • Some features currently disabled on devnet:
    • Cash withdrawals
    • Add/remove payment methods (we use random dummy credit cards for devnet)
  • Currently in-app transfers limited to other users on the platform. This is intentional for early release, but not a limitation of our future capabilities. In an effort to simplify the UX, we are activity avoiding introducing any reference to crypto, blockchain, public/secret keys, gas, Solana, etc.
  • Similarly, because tap is targetted to a non-crypto native user, we did not build in the seed vault or incorporate exporting secret keys (though these are features that can easily be added at a later date when customer's are ready for such features)
  • Current demo is limited to Android, however since we built with React Native, we should be able to add iOS in the near future
  • The user must sign in through web3auth on every launch of the app. In the future we may encrypt the user's credentials on their device to reduce start times. Because USDC transfers are gated through our backend, users that lose their device would be able to disable their account. And because we use an OAuth provider for their wallet, they can use the same Google account across devices.

tap app Local Development

To deploy tap locally, you will need to set up the following:

  • tap Solana Program (detailed setup and delpoyment instructions here))
  • Backend (detailed setup and delpoyment instructions here)
  • Frontend (detailed setup and delpoyment instructions below

Front End Set Up

Install Dependencies

Follow these directions https://reactnative.dev/docs/environment-setup but skip Creating a new application.

In a terminal in the project directory run npm install

Set up Environment

  • Set your environment JAVA_HOME to the location of the JRE, e.g. "C:\Program Files\Android\Android Studio\jre"
  • Copy .env.example to .env.local
  • Set environment variables, WEB3_AUTH_CLIENT_ID and
  • Set USDC_MINT_ADDRESS to the address of the same USDC token mint as FAKE_USDC_ADDRESS and USDC_MINT_ADDRESS in the ./backend/.env.example.yaml.

Starting the App

You must have run the setup steps already.

  1. Start the backend and local validator (./backend).
  2. In one terminal, run emulator -avd Pixel_6_Pro_API_33. Replace Pixel_6_Pro_API_33 with whatever AVD you are testing with. Alternatively, you can:
    • Run a device emulator from Android Studio or
    • If you're testing on a physical device, get your physical device connected to adb.
  3. In a second terminal, start Metro: npm start-windows or npm start. Choose one of the options that pop up (probably pressing a to run on Android).

Turning off Dev Mode

The app's appearance and behavior may be different between "dev" mode and "release" mode. To turn off dev mode

  1. start the app
  2. press d in the metro terminal to open the developer menu
  3. Go to Settings > uncheck JS Dev Mode

Building the APK (for testing)

Follow all setup steps above.

  1. Get the keystore file, app signing password and .env files from one of the Tap devs, to use in the next step.

  2. Follow the steps for Setting up Gradle Variables, using the password above for MYAPP_UPLOAD_STORE_PASSWORD and MYAPP_UPLOAD_KEY_PASSWORD. Do NOT save the variables in android/gradle.properties as the secret will be committed to git.

  3. In a terminal the repo root directory, run the command for generating the APK (see Testing the release build of your app):

    # windows
    npm run build-apk-windows
    
    # unix
    npm run build-apk

This will create an APK in android/app/build/outputs/release which you can then sideload on your phone or distribute to others for testing.

Note:

  • Before installing, you need to uninstall other versions of the app running on your phone as this will prevent it from being installed. You will see an error like

    Execution failed for task ':app:installRelease'. java.util.concurrent.ExecutionException: com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Existing package com.tapcash signatures do not match newer version; ignoring!

  • This is not the APK you would upload to the app store. See Generating the release AAB for that.

  • This process will also open the emulator and run there. You can close the emulator and other windows.

Program Info

  • PROGRAM: TAPAPp2YoguQQDkicGyzTzkA3t4AgECvR1eL1hbx9qz
  • BANK: AU88yciXy2Rz2DJkUUFu2gpYqaPRLngd3sevSfAH8KyS

About

Tap is a cash app that makes sending, spending, and earning cash easy. Built for everyone. Powered by solana and USDC.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published