Proposal: Safe-backed enforcement layer for Franklin's Base trade path (Vantarix)
I've been going through the Franklin README, and in the Safety and security section you say that money moves only on the user's approval, that lifecycle hooks can veto any paid action, and that the wallet key never reaches the model. Those are strong controls against a steered model. They all run inside the Franklin process, though, and the key they protect is a local file under ~/.blockrun.
That matters in one case in particular. If anything else running as the user gets to that key, whether a compromised plugin, an auto-discovered MCP server or a dependency, it can read it and sign a transfer directly. The trade-plan gate and the hooks never see that transaction, and nothing independent exists to say no. For an agent that runs unattended through /loop and Telegram, that is the scenario that decides whether people fund it with $50 or $5,000.
That is why I'm proposing Vantarix, my project, as an optional enforcement layer. Funds sit in a Safe, and the agent holds an identity key that cannot move them. Every transaction goes out as a signed request, a policy engine checks it against a versioned, hashed policy and signs a single-use ALLOW decision, and onchain a Safe module and a SessionKeyManager contract enforce contract and function allowlists, per-token caps, expiry and revocation. If the service is compromised the onchain bounds still hold, and if it can't reach a decision, nothing is sent. Franklin could then state that even a fully compromised agent cannot spend outside its session bounds, as a property of the contracts and not a promise about the model.
The first version would be a PreSpend hook for the Base trade path, covering 0x swaps and approvals, with trade funds in a Safe and the x402 operating wallet left exactly as it is. x402 payments are off-chain authorizations and a different shape, and Stage 1 doesn't decode swap amounts yet, so for 0x it enforces the router allowlist, approval caps and lifetime limits. It is unaudited and runs on Base Sepolia.
I'm building the hook against Franklin's hook interface on Base Sepolia, and I'll post the repo here with a demo of an over-limit trade being blocked. If PreSpend has constraints I should design around, tell me. https://vantarix.netlify.app
Thanks for the detailed write-up. Closing this as an issue since there's nothing for Franklin core to change. Lifecycle hooks (PreSpend included) are a public interface, so Vantarix can ship as a standalone hook users opt into, with no merge on our side. Also note that Base swap execution (Base0xSwap / Base0xGaslessSwap) is currently disabled in Franklin pending local transaction validation, so the 0x path you're targeting isn't live today. Once the hook has an audited mainnet version and a public repo, feel free to open a new issue linking it and we'll take a look.
Thanks for clarifying. We'll pursue the standalone lifecycle hook approach and account for the current status of Franklin's Base swap execution routes.
We'll work toward a public repository and audited mainnet version, then open a new issue for review.
Appreciate the direction.
On Tue, 3 Nov 2026, 01:10 VickyXAI, @.***> wrote:
Closed #226 https://github.com/BlockRunAI/Franklin/issues/226 as not planned.
— Reply to this email directly, view it on GitHub https://github.com/BlockRunAI/Franklin/issues/226?email_source=notifications&email_token=BPC5O72W7K6FDLX4ZGYZV335XEPALA5CNFSNUABQM5UWIORPF5TWS5BNNB2WEL2JONZXKZKFOZSW45CON52GSZTJMNQXI2LPNYXTGNBZGY4DMMZZGU2DNJTSMVQXG33OUZQXK5DIN5ZKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#event-34968639546, or unsubscribe https://github.com/notifications/unsubscribe-auth/BPC5O7YR3ECJH3JS43EOG6T5XEPALAVCNFSNUABGKJSXA33TNF2G64TZHMYTCOBYGQ3TKOBYHA5US43TOVSTWNRQGI3DCMJWGU3TJILWAI . You are receiving this because you authored the thread.Message ID: @.***>