Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArcVault

An onchain saving-habit application for creating USDC goals, building daily consistency, and retaining control of recorded principal.

Warning

ArcVault currently supports Arc Testnet only. Testnet assets have no real-world value. Do not send mainnet or real assets. ArcVault is not a bank, custodian, yield, lending, staking, or investment product. The contracts have not received a formal external audit.

Overview

ArcVault lets a wallet owner create a saving goal, make fixed daily USDC deposits, track progress, and withdraw recorded principal according to the deployed contract rules. Wallets sign their own transactions; ArcVault never receives private keys.

Approval and deposit are separate wallet transactions. Approval authorizes the contract to spend a specified token amount; it is not itself a deposit.

ArcVault does not promise yield, returns, rewards, or investment performance. There is no custody service and no early-withdrawal penalty in the MVP.

Why ArcVault

Saving consistently is difficult. Traditional trackers can record intention, but they cannot provide independently verifiable onchain history. ArcVault combines a simple daily habit loop with transparent contract state. The goal is consistency and user control, not financial yield.

Verified features

  • Wallet connection and Arc Testnet detection/switching
  • Onchain saving-goal creation with official Arc Testnet USDC
  • Separate ERC-20 approval and deposit flow
  • Fixed daily deposits, progress, streak and principal presentation
  • Principal withdrawal according to contract state
  • Pre-signature transaction review and transaction status timeline
  • Explorer links and recent onchain activity
  • Responsive desktop/mobile interface with loading, stale, error and recovery states
  • BigInt-safe runtime normalization
  • Vitest, Playwright and Foundry coverage

Arc Testnet deployment

Item Value
Network Arc Testnet
Chain ID 5042002
RPC rpc.testnet.arc.network
Explorer testnet.arcscan.app
Official USDC 0x3600000000000000000000000000000000000000
ArcVault 0x653921b0d95B7675f815cB38Bb14F0bCB21506b1

A public frontend URL will be added when the hosted Testnet deployment is ready for public distribution.

Screenshots

The selected public UI captures are in docs/images.

ArcVault landing page

ArcVault connected dashboard

How it works

  1. Connect a compatible injected browser wallet.
  2. Switch the wallet to Arc Testnet.
  3. Create a saving goal.
  4. Approve ArcVault to spend the required USDC amount.
  5. Submit the daily deposit as a separate transaction.
  6. Track progress, streak and recorded principal.
  7. Withdraw according to the deployed contract state.

Architecture

flowchart LR
  User[User browser] --> Web[Next.js frontend]
  Web --> Wallet[Injected EIP-1193 wallet]
  Web --> Layer[wagmi / viem]
  Layer --> RPC[Arc Testnet RPC]
  RPC --> USDC[Official USDC contract]
  RPC --> Vault[ArcVault contract]
  Web --> Explorer[ArcScan explorer]
Loading

See the architecture guide.

Smart contracts

The contract records principal and fees separately, uses one immutable supported USDC address, and preserves user withdrawal rights. Administrative roles cannot withdraw user principal; their exact permissions are documented in contract architecture. No formal external audit is claimed.

Repository structure

apps/web/           Next.js application and wallet integration
contracts/src/      Solidity source
contracts/test/     Foundry unit, fuzz, invariant and security tests
packages/contracts/ Canonical ABI and deployment metadata
docs/               Product, architecture, testing and security documentation
.github/            CI, issue forms and pull-request guidance

Requirements

  • Node.js 20.20.x
  • pnpm 9.15.9
  • Git
  • Foundry (forge) for contract work

Local development

git clone https://github.com/0xbardia/arcvault.git
cd arcvault
pnpm install --frozen-lockfile
cp .env.example apps/web/.env.local
pnpm dev

Open http://localhost:3000. Public Arc configuration is safe for the browser; deployment credentials are never frontend variables. See local development and environment variables.

Commands

pnpm dev                 # Next.js development server
pnpm typecheck           # strict TypeScript checks
pnpm lint                # ESLint with zero warnings
pnpm test                # Foundry contract tests
pnpm --filter @arcvault/web test
pnpm build               # frontend and Solidity builds
pnpm contracts:fmt:check
pnpm contracts:build
pnpm contracts:test
pnpm check               # complete repository quality gate

For browser regression tests, install the Playwright browser and run pnpm --filter @arcvault/web exec playwright test against an isolated local production server. See testing.

Testing status

Verified at the publication preparation baseline:

  • Frontend: 193 tests passed
  • Playwright: 27 passed, 1 environment-dependent wallet case skipped
  • Foundry: 218 tests passed

Automated tests do not replace human-controlled MetaMask verification on Arc Testnet.

Security model and limitations

Private keys remain in the user’s wallet. Writes require wallet confirmation and are blocked when the active network is not Arc Testnet. Receipts, not submission alone, determine confirmed transaction state. Public reads depend on RPC availability; contract state is authoritative.

ArcVault is Testnet-only, has no mainnet support, requires a compatible injected wallet, and may be unable to load activity when RPC history is unavailable. Testnet assets have no value. Use at your own risk and do not treat this software as financial advice.

Read SECURITY.md, known limitations, and the threat model.

Roadmap

Planned or under evaluation, not current commitments:

  • Public hosted Testnet release
  • Independent contract review
  • Improved activity indexing
  • Broader wallet compatibility
  • Mainnet research only after a separate security and deployment phase

Contributing and license

See CONTRIBUTING.md, SECURITY.md, and the Code of Conduct. ArcVault is released under the MIT License.

Disclaimer

ArcVault is educational Testnet software. It is not a bank, custodian, yield, lending, staking, or investment service. Testnet assets have no real-world value. Review the network, contract address, transaction details and source code before signing.

About

Self-custodial savings habit DApp on Arc Testnet, built with Next.js, Solidity and Foundry

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages