Solidity smart contracts for GitSafe — soul-bound vault system on Solana (EVM bridge layer).
| Contract | File | Description |
|---|---|---|
SafeToken |
SafeToken.sol |
Soul-bound ERC-20. Represents a locked position. No transfer, approve, or allowance. |
SafeVault |
SafeVault.sol |
Per-user vault. Holds real ERC-20 assets, issues soul-bound safeTokens as claim certificates. |
SafeVaultFactory |
SafeVaultFactory.sol |
Deploys vault clones via EIP-1167 minimal proxy pattern. |
| Contract | Address |
|---|---|
| SafeVaultFactory | — |
| SafeVault impl | — |
| Deployer / feeCollector | — |
| relayerSigner | — |
Mainnet addresses will be published at launch. Follow @GitSafe.
- Dual-signature security — every state-changing vault call requires both the user execution keypair AND a short-lived ECDSA signature from the relayer (5-min deadline). A leaked execution key alone cannot drain the vault.
- Soul-bound safeTokens — cannot be phished or drained via approval exploits. No transfer, no approve.
- GitHub permanent user ID — vault identity anchored to immutable integer, survives username renames.
- Swap output whitelist —
gitSwapcan only output WETH or USDC, enforced on-chain. - 2-step commit-reveal transfer —
initTransfer+finalizeTransferprevents front-running. - EIP-1167 minimal proxy clones — cheap per-user vault deployment via factory.
| Underlying | safeToken | Description |
|---|---|---|
| USDC | safeUSDC |
Soul-bound USDC position |
| SOL (wrapped) | safeSOL |
Soul-bound SOL position |
| USDT | safeUSDT |
Soul-bound USDT position |
| JTO | safeJTO |
Soul-bound JTO position |
safeTokens are created automatically on first deposit of any ERC-20 token.
| Operation | Fee |
|---|---|
gitShield (deposit) |
0.10% |
gitUnshield (withdraw) |
0.10% |
gitSwap |
0.30% |
| Bounty payout | 0.20% |
- Node.js 20+
- pnpm 10+
pnpm installpnpm testpnpm hardhat run scripts/deploy.ts --network <network>GitSafe Relayer (off-chain)
│
├── verifies GitHub bot command (HMAC webhook)
├── issues short-lived relayerSig (5-min deadline)
│
▼
SafeVaultFactory
│
└── clone() ──► SafeVault (per GitHub User ID)
│
├── gitShield() → mint safeTokens
├── gitUnshield() → burn safeTokens, release ERC-20
├── gitSwap() → swap via DEX router
├── createProject() → lock budget in escrow
├── assignTaskBounty() → escrow per-task bounty
└── executeBountyPayout() → release on PR merge
Apache 2.0