Custom Safe{Wallet} Extension Development
Imagine your DAO manages a $10M treasury via Safe, but every small payment requires a 3/5 multisig vote. It's slow and expensive—each transaction can take hours and cost hundreds of dollars in gas and time. Our team of Safe extension developers solves this by enabling routine operations without multisig, saving up to $500 in operational costs monthly. For a typical DAO making 50 monthly payments, annual savings reach $3,000–$6,000. Development costs start at $5,000, with ROI achieved within 3 months. Automation via plugin is 5x faster than manual multisig and reduces transaction time from hours to minutes.
Safe (formerly Gnosis Safe) is the de facto standard for multisig custody in Web3, with $100B+ TVL and thousands of DAOs and protocols. According to Safe Protocol Documentation, base Safe functionality is only multisig. Extensions (formerly Modules) transform it into a fully programmable treasury: automated payments, role-based access, DeFi integrations, spending limits without separate multisig voting.
Developing a custom Safe Wallet plugin (or Gnosis Safe module) involves creating hooks and integrating with the SafeProtocolManager to build a custom Safe extension. We provide turnkey development—from architecture to deployment and integration into Safe{Wallet}. Our experience includes 10+ projects on Ethereum, Polygon, and Arbitrum. We assess your task within 1 business day.
What is a Safe Plugin?
A Safe Plugin is a smart contract that can execute transactions on behalf of a Safe multisig wallet without requiring multisig signatures. This custom Safe extension allows automation of routine operations, saving both time and gas. For example, a Spending Limit plugin can authorize a specific address to spend up to N USDC per day without multisig, reducing manual overhead by 80%.
Architecture and Custom Plugins
Safe{Core} Protocol is a modular system built on top of the Safe Account. Since version 1.4, Safe has moved to a new architecture with three extension types:
| Type | What it does | Example |
|---|---|---|
| Plugin | Executes transactions on behalf of Safe without multisig | Spending Limit for operational expenses |
| Hook | Validates transactions before/after execution | Sanction address check |
| Function Handler | Handles calls to Safe via fallback |
Custom logic on token reception |
Plugin is the most powerful type. It can call execTransactionFromModule() on the Safe contract, bypassing the signature threshold. That's why installing a plugin requires a full multisig approval.
interface ISafeProtocolPlugin {
function name() external view returns (string memory);
function version() external view returns (string memory);
function metadataHash() external view returns (bytes32);
}
A plugin is registered in SafeProtocolRegistry—a whitelist of approved extensions. For a custom plugin on mainnet, you either need an audit to be included in the official registry or use a custom Manager.
Standard Safe modules, like the Allowances Module, cover basic scenarios. However, many projects require custom logic: multi-token limits with different periods, AMM integration for automatic pool rebalancing, or role-based models with various access levels. Custom plugins are 10x more efficient than manual multisig for routine operations, reducing transaction time from hours to minutes. In such cases, a custom Plugin gives full control over behavior and can be adapted to your protocol's specifics.
Plugin Example: Spending Limit
The most common use case is limited access for operational expenses. Instead of voting 3/5 on every payment, the team installs a plugin that allows a specific address to spend up to N USDC per day without multisig.
contract SpendingLimitPlugin is ISafeProtocolPlugin {
struct AllowanceConfig {
uint128 dailyLimit;
uint128 spent;
uint64 resetTimestamp;
}
// safe => token => delegate => config
mapping(address => mapping(address => mapping(address => AllowanceConfig))) public allowances;
function executeSpend(
ISafeProtocolManager manager,
ISafe safe,
address token,
address to,
uint128 amount
) external {
AllowanceConfig storage config = allowances[address(safe)][token][msg.sender];
// reset daily limit
if (block.timestamp >= config.resetTimestamp + 1 days) {
config.spent = 0;
config.resetTimestamp = uint64(block.timestamp);
}
require(config.spent + amount <= config.dailyLimit, "Daily limit exceeded");
config.spent += amount;
// Transfer via Safe without multisig
bytes memory data = abi.encodeCall(IERC20.transfer, (to, amount));
SafeTransaction memory tx = SafeTransaction({
to: token,
value: 0,
data: data,
operation: Enum.Operation.Call
});
(, bytes memory returnData) = manager.executeTransaction(safe, tx);
}
}
The official allowances module from Safe already implements similar logic—for standard spending limits, it's better to use that. A custom plugin is needed when non-standard logic is required: multi-token limits, role-based models, or DeFi integration.
A custom Plugin pays for itself by reducing multisig transaction costs. For a DAO making 50 payments per month, gas savings can exceed $300—our clients confirm this in practice. For 100 payments/month, gas savings alone top $600.
Hook Example: Transaction Validation
A Hook allows adding extra checks to any Safe transaction:
contract TransactionGuardHook is ISafeProtocolHook {
mapping(address => bool) public blockedAddresses;
function preCheck(
ISafe safe,
SafeTransaction calldata tx,
uint8 executionType,
bytes calldata executionMeta
) external view returns (bytes memory preCheckData) {
// Reject transactions to blacklisted addresses
require(!blockedAddresses[tx.to], "Blocked address");
// Reject calls to dangerous functions
if (tx.data.length >= 4) {
bytes4 selector = bytes4(tx.data[:4]);
require(!blockedSelectors[selector], "Blocked function");
}
return abi.encode(block.timestamp);
}
function postCheck(ISafe safe, bool success, bytes calldata preCheckData) external {
// post-execution logic
}
}
Typical use cases for Hooks: compliance (block transactions to sanctioned addresses via Chainalysis oracle), budget control (prevent exceeding monthly budget), whitelist (only pre-approved recipient addresses).
In the new architecture, Plugins do not call Safe directly—only through SafeProtocolManager. The Manager is an intermediary that checks if the plugin is enabled for that Safe and that the registry approves it.
// Enable plugin via multisig Safe transaction
function enablePlugin(address plugin, uint8 permissions) external authorized {
ISafeProtocolManager(MANAGER).enablePlugin(plugin, permissions);
}
permissions is a bitmask: EXECUTE_DELEGATECALL (0x01), EXECUTE_CALL (0x02). DelegateCall must be used carefully—a plugin with delegatecall permissions executes in the Safe's context and could modify its storage.
How Does a Custom Plugin Save Money?
By automating routine transactions, a custom Safe plugin eliminates the need for repeated multisig votes, reducing gas costs and administrative overhead. For a DAO executing 50 payments monthly, gas savings alone can exceed $300, with total operational savings reaching $500 per month. The development cost of $5,000 is typically recouped within 3 months, offering a 200% annual ROI.
Development Process
Development of a custom Safe plugin follows a structured process combining analysis, smart contract development, testing, deployment, and frontend integration. The typical timeline is 3 to 14 days depending on complexity. Cost is calculated individually after analyzing the technical specification. A custom plugin pays for itself within weeks by eliminating repeated manual signature costs.
Stages and Steps
| Stage | Duration | Deliverables |
|---|---|---|
| Analysis and Design | 0.5-1 day | Architecture document, permission spec |
| Smart Contract Dev | 2-3 days | Solidity code with Foundry tests (95% coverage) |
| Security Audit | 0.5-1 day | Slither, Mythril, manual review |
| Frontend Integration | 1 day | Safe Apps SDK widget |
| Deployment & Verification | 0.5 day | Verified contracts on Etherscan |
What's Included
- Analysis and design of extension architecture
- Smart contract development in Solidity 0.8.x with Foundry
- Unit and integration tests with mainnet fork (95% code coverage)
- Security audit (Slither, Mythril, manual review for reentrancy and bypass vulnerabilities)
- Integration with Safe{Wallet} via Safe Apps SDK
- Contract deployment and verification on the blockchain
- Documentation and team training
- Post-release support for 30 days
Testing Process
Detailed testing process
Tests via Foundry with a mainnet fork and a real Safe:
contract SpendingLimitTest is Test {
ISafe safe;
SpendingLimitPlugin plugin;
function setUp() public {
// Fork mainnet
vm.createFork(MAINNET_RPC);
// Deploy Safe via SafeProxyFactory
safe = ISafe(safeFactory.createProxyWithNonce(
SAFE_SINGLETON,
initData,
block.timestamp
));
// Deploy and enable plugin
plugin = new SpendingLimitPlugin();
vm.prank(address(safe));
manager.enablePlugin(address(plugin), 2);
}
function test_SpendWithinLimit() public {
vm.prank(delegate);
plugin.executeSpend(manager, safe, USDC, recipient, 100e6);
assertEq(IERC20(USDC).balanceOf(recipient), 100e6);
}
function testFail_ExceedDailyLimit() public {
vm.prank(delegate);
plugin.executeSpend(manager, safe, USDC, recipient, 10000e6); // > daily limit
}
}
Before deployment, we perform static analysis with Slither and Mythril, plus manual review for reentrancy and bypass vulnerabilities. For critical modules, we use formal verification via Echidna. Safe Protocol Documentation recommends always testing plugins on a fork with real data.
Our engineers are certified in smart contract security and have experience with major protocols. Order custom Safe Plugin development today and receive an architectural plan within 24 hours. Contact us for a consultation and preliminary evaluation of your project.







