Skip to content

Repository files navigation

GitBranch

GitHub native RWA stock vault. Own real stocks onchain with no wallet app, no brokerage account, and no gas fees.

ChainSolidityLicenseBot

Dashboard · Install Bot · Docs · Explorer

Tag @gitbranchbot in any GitHub issue to buy, sell, swap, or withdraw real tokenized stocks. All onchain, all from your keyboard.

Table of Contents

  1. What is GitBranch?
  2. How It Works
  3. Core Features
  4. Smart Contract Architecture
  5. Supported Assets
  6. Bot Command Reference
  7. Technical Stack
  8. Monorepo Structure
  9. Getting Started
  10. Environment Variables

What is GitBranch?

GitBranch is a GitHub native banking platform that lets developers buy and hold real tokenized stocks (RWA) directly from GitHub issues. No wallet setup, no brokerage account, no gas fees for users.

When you tag @gitbranchbot, the bot:

  1. Creates a soul bound vault onchain (your personal vault, tied to your GitHub identity)
  2. Accepts USDG deposits on your behalf
  3. Swaps USDG for the stock token you want via Uniswap V3 on Robinhood Network
  4. Holds the token in your vault until you withdraw

How It Works

GitHub Issue -> @gitbranchbot -> API Server -> GitBranchVault (onchain)
|
Uniswap V3 Router
|
RWA Token: gitNVDA, gitTSLA, gitAAPL ...

Step by step:

  1. User comments @gitbranchbot buy $NVDA 50 in any GitHub issue
  2. Bot webhook fires and the API server parses the command
  3. API server deposits USDG into the user vault onchain
  4. Vault calls Uniswap V3 to swap USDG for the gitNVDA token
  5. Token sits in the vault; user can sell or withdraw any time

Core Features

Soul bound vaults. Each GitHub user gets exactly one vault contract tied to their GitHub ID. The vault is not transferable and holds their stock tokens onchain.

Gasless for users. The relayer covers all gas fees. Users only interact via GitHub comments.

Real RWA tokens. Stock tokens (gitNVDA, gitTSLA, gitAAPL, etc.) are backed by real tokenized assets on Robinhood Network.

MCP support. Use GitBranch from Claude, Cursor, or ChatGPT via the MCP server. See gitbranch-mcp.

No wallet required. Vaults are managed server side. Users can optionally link a wallet to withdraw tokens.


Smart Contract Architecture

ContractDescription
GitBranchVaultFactoryDeploys one soul bound vault per GitHub user
GitBranchVaultHolds RWA tokens and executes swaps via Uniswap V3
GitBranchStockFactoryDeploys ERC20 receipt tokens for each RWA asset
GitBranchStockTokenERC20 receipt token: gitNVDA, gitTSLA, gitAAPL and more
GitBranchTokenNative GITB governance token

Key onchain addresses (Robinhood Network, chain 4663):

ContractAddress
VaultFactory0x2d63D4092Ab7a7DC8761394b22Bb2f6Ac1F226Ba
SwapRouter (Uniswap V3)0xCaf681a66D020601342297493863E78C959E5cb2
QuoterV20x33e885ed0ec9bf04ecfb19341582aadcb4c8a9e7
WETH0x4200000000000000000000000000000000000006
USDG0x79A02482A880bCE3F13e09Da970dC34db4CD24d1

Supported Assets

TickerTokenPool
NVDAgitNVDAUSDG/gitNVDA 1%
TSLAgitTSLAUSDG/gitTSLA 1%
AAPLgitAAPLUSDG/gitAAPL 1%
MSFTgitMSFTUSDG/gitMSFT 1%
AMZNgitAMZNUSDG/gitAMZN 1%
GOOGLgitGOOGLUSDG/gitGOOGL 1%
METAgitMETAUSDG/gitMETA 1%
SPYgitSPYUSDG/gitSPY 0.3%
QQQgitQQQUSDG/gitQQQ 0.3%

See packages/rwa/src/tokens.ts for the full list of 27 supported assets.


Bot Command Reference

Tag @gitbranchbot followed by any of these commands in a GitHub issue or PR comment:

CommandExampleDescription
buy $TICKER AMOUNTbuy $NVDA 100Buy stock worth $100 USDG
sell $TICKER AMOUNTsell $TSLA 50Sell $50 worth of TSLA
sell all $TICKERsell all $AAPLSell your full AAPL position
portfolioportfolioShow all holdings and values
balancebalanceShow USDG balance
depositdepositGet deposit instructions
withdraw $TICKERwithdraw $NVDAWithdraw tokens to your wallet
swap $FROM $TOswap $NVDA $TSLASwap one stock for another

Technical Stack

LayerTechnology
Smart contractsSolidity 0.8.34 and Hardhat on Robinhood Network
Swap routingUniswap V3 SwapRouter02 and QuoterV2
Backend APINode.js and Express and TypeScript
Web frontendReact 18 and Vite and Tailwind CSS
MobileExpo SDK and React Native
DatabasePostgreSQL with Drizzle ORM
AI interfaceMCP server compatible with Claude and Cursor
AuthGitHub Apps and OAuth
Paymentsx402 protocol and USDG stablecoin

Monorepo Structure

gitbranch/
apps/
web/ # React frontend (landing page and dashboard)
api/ # Express API server and GitHub bot webhook handler
social-cards/ # OG image and social card generator
packages/
db/ # Drizzle ORM schema and migrations
rwa/ # RWA token registry and price feeds
rh-swap/ # Uniswap V3 quote and swap helpers for Robinhood Network
mcp/ # MCP server tools and handlers
api-spec/ # OpenAPI spec shared between server and client
api-zod/ # Zod validators generated from OpenAPI spec
api-client-react/ # React Query hooks generated from the API spec
x402/ # x402 payment protocol integration
scripts/ # Dev and deploy scripts
base-plugin/ # Vite base plugin shared across apps

Getting Started

Prerequisites

  • Node.js 20 or higher
  • pnpm 9 or higher
  • PostgreSQL database

Install

git clone https://github.com/gitbranchorg/gitbranch.git
cd gitbranch
pnpm install

Configure

cp .env.example .env
# Fill in your GitHub App credentials and database URL

Run

# API server
pnpm --filter @workspace/api-server dev
# Web frontend (in a separate terminal)
pnpm --filter @workspace/gitbank dev

Environment Variables

VariableRequiredDescription
GITHUB_APP_IDYesGitHub App numeric ID
GITHUB_APP_PEMYesGitHub App private key (RSA)
GITHUB_CLIENT_IDYesGitHub OAuth client ID
GITHUB_CLIENT_SECRETYesGitHub OAuth client secret
GITHUB_WEBHOOK_SECRETYesWebhook HMAC secret
SESSION_SECRETYesExpress session secret
ENCRYPTION_MASTER_KEYYes32 byte key for encrypting vault private keys
DEPLOYER_PRIVATE_KEYYesEVM private key for contract deployment
RELAYER_SIGNING_KEYYesEVM private key for gasless relay
DATABASE_URLYesPostgreSQL connection string

License

Apache 2.0

About

GitHub native RWA stock banking: web app, API server, packages

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages