Home/Projects/Auth-Governed Secure Vault
GitHub Repository
Cryptography / Smart Contract Security2024 · Completed / Open Source

Auth-Governed Secure Vault

Off-Chain EIP-712 ECDSA Authorized Vault Protocol

A cryptographic custody vault requiring cryptographic authorizations signed by a designated security signer before executing capital disbursements. Ideal for high-value operations requiring off-chain compliance or multi-party approvals.

Signature Standard
EIP-712
Replay Security
100% Nonce Verified
Test Suite
Foundry Invariant
Applied Stack
SolidityFoundryDockerECDSAEIP-712 Signatures
Context & Threat Vector

The Engineering Problem

Smart contract vaults relying solely on msg.sender or simple access modifiers are vulnerable to compromised private keys, phishing transactions, and reentrancy loops.

System Design

EIP-712 Typed Signature Verification & Nonce Accounting

Validates structured off-chain permits against an immutable domain separator before updating internal accounting.

1

SecureVault.sol: Holds ETH reserves and executes payouts only upon valid signature submission.

2

AuthorizationManager.sol: Verifies ECDSA recovered addresses match active authorized signer keys.

3

Monotonic Nonce Mapping: Tracks and invalidates used nonces to permanently prevent transaction replay attacks.

Adversarial Defense

Technical Challenges & Mitigations

Signature Malleability in ecrecover

Utilized OpenZeppelin ECDSA library to strictly reject signatures with non-standard s-values (preventing s-malleability exploits).

Cross-Contract Reentrancy Safeguards

Maintained strict CEI ordering and nullified user allowances prior to invoking low-level .call{value: amount} transfers.

Verified Guarantees & Features

EIP-712 structured data hashing for transparent wallet signing
Replay protection through per-account nonce increments and expiration timestamps
Zero external dependency execution paths for emergency withdrawals
Formal invariant test suite authored in Foundry