hackquest logo

Mantissa

Passkey-native smart wallet for Mantle L2. Features πŸ” Seedless Authentication - Use device biometrics instead of seed phrases πŸ“± WebAuthn/FIDO2 - Industry-standard passkey protocol β›½ ERC-4337

Videos

Tech Stack

Solidity
Python

Description

Features

  • πŸ” Seedless Authentication - Use device biometrics instead of seed phrases

  • πŸ“± WebAuthn/FIDO2 - Industry-standard passkey protocol

  • β›½ ERC-4337 Compatible - Account abstraction ready

  • πŸ”‘ Multi-Owner Support - Add backup passkeys for recovery

  • ⚑ Mantle Optimized - Built for low gas costs on Mantle L2

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    User Device                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Biometric  │───▢│   Passkey    │───▢│  Wallet   β”‚  β”‚
β”‚  β”‚   Prompt    β”‚    β”‚  (WebAuthn)  β”‚    β”‚   SDK     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚ Sign Transaction
                             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Mantle L2                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ MantissaFactory│───▢│  MantissaWallet (Clone)  β”‚  β”‚
β”‚  β”‚ (Deploys Wallets)β”‚    β”‚  β€’ P-256 Signature Verify β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚  β€’ Execute Transactions   β”‚  β”‚
β”‚                          β”‚  β€’ Multi-Owner Support    β”‚  β”‚
β”‚                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Packages

Package

Description

packages/contracts

Solidity smart contracts (Foundry)

packages/sdk

TypeScript SDK for passkey + wallet integration

packages/demo

Next.js demo application

πŸš€ Quick Start

Prerequisites

Installation

# Clone the repo
git clone https://github.com/subh/keymantle.git
cd keymantle

# Install dependencies
npm install

# Build all packages
npm run build

Run Demo

# Terminal 1: Start local Mantle forkcd packages/contracts
anvil --fork-url https://rpc.sepolia.mantle.xyz

# Terminal 2: Deploy contracts
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
forge script script/Deploy.s.sol --rpc-url http://127.0.0.1:8545 --broadcast

# Terminal 3: Run demo appcd packages/demo
npm run dev

Open http://localhost:3000 and click "Create Passkey Wallet"!

πŸ“š Documentation

Smart Contracts

The core contracts implement a passkey-authenticated smart wallet:

  • MantissaWallet.sol - Smart wallet with P-256 signature verification

  • MantissaFactory.sol - Factory for deploying wallets (CREATE2)

  • WebAuthnVerifier.sol - On-chain WebAuthn signature verification

See packages/contracts/DEPLOYMENT.md for deployment instructions.

SDK Usage

import { MantissaClient } from '@mantlepass/sdk';

// Initialize clientconst client = new MantissaClient({
  rpcUrl: 'https://rpc.sepolia.mantle.xyz',
  factoryAddress: '0x...',
});

// Create wallet with passkeyconst wallet = await client.createWallet({
  name: 'My Wallet',
});

// Sign and send transactionconst txHash = await client.sendTransaction({
  to: '0x...',
  value: 1000000000000000000n, // 1 MNTdata: '0x',
});

Networks

Network

Chain ID

Factory Address

Mantle Sepolia

5003

0x876DBabB4A37cCB97D5ca4285444f1BcE06220a6

Mantle Mainnet

5000

TBD

Local (Anvil)

5003

0xae13506deae7f82ea5c1c646d0b6693b220a4bb8

πŸ§ͺ Testing

# Run contract testscd packages/contracts
forge test -vvv

# Run SDK testscd packages/sdk
npm test

πŸ› οΈ Development

Project Structure

keymantle/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ contracts/          # Solidity contracts
β”‚   β”‚   β”œβ”€β”€ src/           # Contract source files
β”‚   β”‚   β”œβ”€β”€ test/          # Foundry tests
β”‚   β”‚   └── script/        # Deployment scripts
β”‚   β”œβ”€β”€ sdk/               # TypeScript SDK
β”‚   β”‚   └── src/
β”‚   β”‚       β”œβ”€β”€ client/    # MantissaClient
β”‚   β”‚       β”œβ”€β”€ webauthn/  # Passkey utilities
β”‚   β”‚       └── utils/     # Helpers
β”‚   └── demo/              # Next.js demo app
β”œβ”€β”€ package.json           # Monorepo root
└── README.md

Build Commands

# Build everything
npm run build

# Build specific package
npm run build --workspace=packages/sdk

# Run tests
npm test

πŸ” Security

  • P-256 (secp256r1) - Hardware-backed elliptic curve cryptography

  • WebAuthn - W3C standard for passwordless authentication

  • On-chain verification - All signatures verified by smart contracts

  • No private key exposure - Keys never leave secure hardware

Audit Status

⚠️ Not audited - This is experimental software. Use at your own risk.

πŸ—ΊοΈ Roadmap

  • Core smart contracts

  • TypeScript SDK

  • Demo application

  • ERC-4337 Bundler integration

  • Social recovery module

  • Session keys for dApps

  • Mobile SDK (React Native)

  • Hardware wallet backup

Team Leader
SSiddhesh Scindia
Project Link
Sector
Other