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.
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.
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:
- 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.
- 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 the0x1626ba7emagic value, allowing the Safe to accept the signatures natively.
- 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.
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.
cd contracts
forge install
forge testcd frontend
npm install
npm run dev