Skip to content

aapsi/PolkaSig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PolkaSafeModule

PolkaSafeModule is a cross-VM compatible module for Safe (formerly Gnosis Safe) on Polkadot Hub. It allows Substrate-based users (like Polkadot.js wallets using Ed25519) to act as seamless co-signers on standard Safe multisigs alongside EVM users (MetaMask/ECDSA).

Built for Track 2: PVM Smart Contracts of the Polkadot Solidity Hackathon, it demonstrates the power of cross-VM calls by calling a Rust PVM contract from Solidity to verify Ed25519 signatures.

Problem

DAO management on Polkadot is fragmented between the Substrate ecosystem (Ed25519) and the EVM ecosystem (ECDSA). Current solutions force users to maintain separate wallets or use clunky bridges. Furthermore, building custom multisigs from scratch is an industry anti-pattern and poses severe security risks.

Solution

Instead of building a standalone multisig, this project extends the industry-standard Safe by creating a custom Safe Module (PolkaSafeModule.sol).

This module implements two key features:

  1. Cross-VM Signature Verification: It accepts both EVM ECDSA signatures and Substrate Ed25519 signatures. The Ed25519 signatures are verified via a precompile-like call to a Rust-compiled PolkaVM contract.
  2. EIP-1271 Support (isValidSignature): The module itself acts as a smart contract signer on the Safe. It validates the signatures across VMs, and if its registered owners approve, it returns the 0x1626ba7e magic value, allowing the Safe to accept the signatures natively.

Why it's a Winner for Track 2

  • True Interoperability: Demonstrates a practical, high-value use case for Solidity -> Rust PVM calls (Ed25519 verification).
  • Core Infrastructure: Solves a fundamental UX and security issue for DAOs operating across VMs.
  • Industry Standards: Leverages standard Safe architecture rather than reinventing the wheel with a custom, un-audited multisig.

Architecture

  • PolkaSafeModule.sol: The Solidity Safe module that manages owner keys, thresholds, and transaction proposals.
  • ed25519-verifier (Rust): The PolkaVM contract that verifies the Substrate signatures.
  • Frontend: A Next.js dashboard providing a unified interface for both Polkadot.js and MetaMask users to interact with the module.

Setup & Running

Contracts

cd contracts
forge install
forge test

Frontend

cd frontend
npm install
npm run dev

About

PolkaSig — Dual-Signature Multisig Wallet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors