r/ethdev • • 18d ago

My Project Build in public: our ERC's reference implementation had a privilege-escalation bug. Post-mortem + the fix merged into ethereum/ERCs this week

1 Upvotes

We maintain ERC-8259 (on-chain identity, tiered verification and a threat registry for autonomous AI agents). During an internal audit of our reference implementation last week, we found a critical bug. Sharing the post-mortem because every ERC author will hit this eventually: your reference implementation becomes a footgun the moment the spec moves.

The bug (two parts):

  1. Registration accepted verification_tier directly at registration time — self-assigned privilege escalation.
  2. isActive was not checked in getEffectiveTier, isVerified, or calculateTrustScore. A deactivated agent kept verified status and trust-score benefits. Picture deactivating a compromised agent — and its accumulated reputation still passes a minTrustScore(700) gate on someone else's contract.

What we did, in order (all commit-dated in the repo):

  • Nov 2 — incident lifecycle landed in the spec (PR #2137 merged upstream): IncidentStatus, retractAttack / resolveAttack, T7 invariant. Threats can be retracted, not just forever-append.
  • Nov 3 — deprecated our own pre-#2137 Sepolia Vyper deployment, loudly: README warning banner, deprecation headers on legacy contracts, CHANGELOG + security upgrade notice. It lacks verification_expiry, get_effective_tier and the incident lifecycle. Redeployment tracked in Issue #2.
  • Nov 4 — fixed the invariant in the repo (2824257), pushed the spec change upstream as PR #2142, merged the same day. Added an adversarial attack test suite for the registry (phase C4), runnable with forge test from the repo root.
  • Nov 6–8 — implemented the trust-score Groth16 circuit (Circom), integrated a real prover into the gateway, sanitized ZK over-claims in docs/UI, published npm erc-8259@1.3.1.

Lessons, if you're maintaining an ERC:

  • Ship the spec as an npm package with versioned interfaces + NatSpec, not as a gist people copy-paste. A stale interface outlives every blog post.
  • Write the deprecation warning the day you know, not the day someone asks.
  • Adversarial tests belong in the repo, executable by anyone who clones it.

Repo (Sigui — the agent-security layer this ERC is part of): https://github.com/ibonon/Sigui

What we'd love review on: the T8 trust-score expiry rule and the tier-verification invariants. And if you've maintained an EIP/ERC: how did you handle "already deployed, spec changed"? Genuinely curious what the norm is.


r/ethdev • • 19d ago

Question How does EIP-7702 handle clean key revocation if we migrate EOAs to post-quantum signatures?

3 Upvotes

Been digging into the Lean Ethereum roadmap and the post-quantum transition plans, and there is a specific account migration edge case I keep coming back to.

Right now, the cleanest way for existing EOA holders to get quantum resistance without abandoning their current address and DeFi positions is delegating via EIP-7702 (or moving to native AA once EIP-8141 lands) to a smart wallet contract that verifies a lattice or hash-based signature.

The catch is that with EIP-7702, the underlying secp256k1 private key still retains root control over the account. Even if your daily transactions are verified through a post-quantum delegate contract, an attacker with a strong enough quantum computer could theoretically derive the original ECDSA private key from your public key on-chain and sign a fresh authorization transaction pointing your EOA to their own malicious delegate contract.

At the protocol level, how are core devs planning to let existing EOAs permanently burn or brick their underlying ECDSA key once they migrate to a post-quantum scheme? Would that require a dedicated opcode or transaction type in one of the upcoming forks before L*, or is the assumption that everyone eventually sweeps funds to fresh native AA addresses?


r/ethdev • • 20d ago

Question We just hardened order recovery in our prediction market - internet drops were a bigger problem than they sound

0 Upvotes

My brother and I are building Twirl, a prediction-market platform, and one thing we’ve been working on is what happens when the happy path breaks.

Example:

A user places an order.

Their internet drops.

Now what?

Did the order go through?

Should the UI let them place it again?

Should their funds be released?

That kind of ambiguity can turn into duplicate orders or incorrect balances pretty quickly.

So we changed the flow.

Twirl now checks the backend to confirm what actually happened before allowing a replacement order.

We also improved recovery across page refreshes and multiple browser tabs, so orders and balances remain tied to backend records rather than just whatever the current browser session thinks happened.

We also tested partial fills:

  • The completed part of the order stays recorded.
  • Unused reserved funds are released correctly.
  • Balances refresh after fills and cancellations.
  • Unresolved requests stay preserved.
  • Instant orders are blocked when market data is stale.

The local browser-to-backend rehearsal passed all 10 recovery scenarios, and the frontend test/build/type checks are passing too.

What’s interesting to me is how much of financial UX is really about handling uncertainty.

A polished UI means nothing if the app guesses wrong when the network gets messy.

For people who’ve built trading, payments or financial products:

What recovery-state bug caused the most pain for you in production?

Refreshes? stale data? retries? auth expiry? multi-tab conflicts? something else?


r/ethdev • • 20d ago

Question Questions about protecting crypto assets from future quantum computing and super AI threats

4 Upvotes

My understanding is that one way to minimize the risk of losing crypto assets to future quantum computing or super AI attacks (e.g., having private keys derived from public addresses cracked) is to transfer and store assets in wallets whose addresses have never been used in any blockchain transactions.

My understanding is also that once you send any crypto or NFT from such an address, its public key becomes exposed, making it potentially vulnerable to these future threats.

I have a few questions:

1. How exactly does this mechanism work?

Wouldn't the receiving address still be visible on the blockchain? Front-end platforms like Etherscan and OpenSea also retain and display transaction histories, including the sender's and receiver's public addresses.

If that's the case, why does having no previous transaction history actually reduce the risk? Is the key distinction that a wallet address is publicly visible, but its actual public key is not necessarily exposed until it initiates a transaction?

2. What happens when multiple addresses are generated from the same seed phrase?

Let's say multiple public/private key pairs are generated from a single seed phrase. If one of these previously unused addresses makes its first on-chain transaction (e.g., sending cryptocurrency or an NFT), would the other addresses derived from the same seed phrase also become compromised?

I'm trying to understand whether the exposure is specific to the individual address/key pair or whether it could potentially extend to other addresses derived from the same seed phrase.

For example, if I transfer my crypto assets to a hardware wallet, but the exposure of one address could compromise all other addresses derived from the same seed phrase, wouldn't that mean people would need to maintain multiple hardware wallets (and separate seed phrases) to achieve meaningful protection?

3. What are some reasonable and practical ways to minimize these risks?

Given the potential future threats from quantum computing and super AI, what security practices would you recommend for an average crypto holder? How much precaution is actually warranted today, and what would be a sensible balance between security and practicality?


r/ethdev • • 20d ago

Question Survey for common operations on crypto wallets

Thumbnail reddit.com
1 Upvotes

r/ethdev • • 21d ago

Code assistance Built an open-source liquidity vault gated by a 3-of-4 EIP-712 risk-node quorum. Looking for feedback and contributors

2 Upvotes

I’ve been building RiskLayer, an experimental protocol that explores how an on-chain vault can safely rely on an off-chain risk committee, and I’ve just open-sourced it.

How it works

  • Providers deposit USDC into a LiquidityVault.
  • A taker opens a payment intent against a provider, which reserves that provider’s liquidity.
  • Four risk nodes independently score the intent and sign an EIP-712 assessment.
  • The RiskOracle contract rebuilds the digest from the on-chain intent, verifies a 3-of-4 quorum of distinct authorized signers, and approves or rejects. A rejection releases the reserved liquidity.

Stack: Solidity 0.8.24 + Foundry, Python risk engine/signer/aggregator, FastAPI backend, React + ethers frontend. It’s deployed on Base Sepolia (testnet only).

Links

Where it’s honestly incomplete, and where I’d love help:

  1. The four “independent” nodes currently run in one process, so the quorum isn’t actually decentralized yet.
  2. Risk inputs (reversal rate, dispute rate, etc.) are supplied by the caller, not derived from verifiable data.
  3. Approved intents have no settlement step; liquidity just stays reserved until expiry.
  4. It needs fuzz/invariant tests, and it’s unaudited.

I’ve opened issues for these plus a set of good first issues (config hardening, CI, a payload bug in the CLI scripts), and there’s a CONTRIBUTING guide and SECURITY policy in the repo.

I’d especially value feedback on the trust model: is a signature-quorum oracle like this a sensible approach for gating liquidity, and what would you do differently for the node operator set and data sources? Happy to answer questions about the design.


r/ethdev • • 22d ago

Question My dapp 20questions.lol is flagged “Malicious” in MetaMask, already reported to Blockaid. Anyone been through this?

2 Upvotes

Hi all, as you can see from the image above, MetaMask flags my app 20questions.lol as "malicious" when you try to connect to it.

it’s basically a crypto game where an AI picks a secret word and players pay to ask yes/no questions, and the first person to guess the word wins the whole pot. I use blockchain specifically for transparency, so the secret word is committed on-chain as a hash before the round starts and nobody (including me) can change it. The contract is live and verified on Base: 0xf0925993D00F5E2c5C7c5053eD67309a0a9beF8c

What the app actually asks your wallet to do:

  1. Connect
  2. Approve USDC for the 2 USDC buy-in plus up to 10 questions (so you don’t have to approve every question)
  3. Sign each question, which the server then submits on-chain so players don’t pay gas

I’ve already reported it as a false positive to Blockaid. Has anyone gone through this? How long did it take, and is there anything else I should be doing? I’ve had the app live for about 2 weeks now and nobody will want to use it in this state.

Also open to feedback if there’s something in my flow I should change so it stops looking suspicious.


r/ethdev • • 22d ago

Information Haben Sie es satt, dass Big Tech unsere Daten besitzt. Ist Web3 im Moment ein realistischer Karriereweg?

1 Upvotes

r/ethdev • • 23d ago

My Project We deployed an on-chain Spend Policy & Circuit Breaker on Polygon to prevent AI agents from draining wallets ($5k/tx hard cap, verified contract)

2 Upvotes

Hey r/ethdev,

Over the past few months, we've been building infrastructure for autonomous AI agents (ElizaOS, LangChain) that interact with smart contracts.

The biggest security hole we observed is that **most teams pass raw private keys or unconstrained session keys to LLMs**. If an agent encounters a prompt injection or hallucinates an input parameter, it can drain an entire contract or treasury in a single block.

To solve this, we deployed and verified **`SecurityGateOMSPolicy.sol`** on Polygon Mainnet to act as an on-chain economic circuit breaker.

### 🛠️ Architecture Highlights:

  1. **Hard Spend Caps at Contract Level:**

    * Single Transaction Max: $5,000 USDC

    * 24-Hour Velocity Cap: $25,000 USDC

    * Any call violating these thresholds automatically reverts, completely bypassing whatever the LLM decided.

  2. **EIP-712 Dual-Attestation:** All agent deliverables and truth oracle attestations require deterministic EIP-712 structured data signatures before releasing escrow funds.
  3. **Pre-Sign AST Analysis (<5ms):** Before an agent signs an EVM transaction, its generated payload undergoes deterministic AST parsing off-chain to detect code injection or malicious parameters.

### 📜 Verified Contracts:

* **Polygon Mainnet Policy:** [`0x4A28F9A2E6D0DcB69791980560FC8364A514f205`](https://polygonscan.com/address/0x4A28F9A2E6D0DcB69791980560FC8364A514f205)

* **Universal Escrow Core:** `0x4Dbd77F4799816859a595f24a57A786516D2EAa8`

We’d love to get feedback from other smart contract engineers on how you're handling agentic wallet permissions and multi-sig fail-safes!

*(Open-source repos, packages, and architecture docs are in the first comment)*


r/ethdev • • 23d ago

Question Smart Contracts

0 Upvotes

Hi everybody, i wanted to know if anyone here ever worked with smart contracts in Go?

My main focus is to read the events(basically reading results) from my smart contracts, if anyone can recommend me some free resources would be great.


r/ethdev • • 24d ago

Question EIP-8037/EIP-8038 Glamsterdam

Thumbnail
blog.ethereum.org
5 Upvotes

r/ethdev • • 24d ago

My Project New blockchain introduction

Thumbnail
github.com
1 Upvotes

Well, you can check this repo, like I have build, it and like if this has any flaws, and like that, but according to, me till now it's perfect, but ready for test7ng, and like we should test it like, as new blockchain and like, that so, you can see the repo ?


r/ethdev • • 24d ago

Information Ethereal news weekly #46 | Post quantum & post AI transition targeting December 2028, Amundi tokenized equity index fund, Solar v0.3 & Slang alpha Solidity compilers

Thumbnail
ethereal.news
1 Upvotes

r/ethdev • • 25d ago

My Project Lasso RPC v0.8.0 is live: route transaction sends to private RPC relays + automatic provider limit learning

2 Upvotes

I'm building Lasso RPC, an open-source EVM JSON-RPC router/proxy in Elixir/OTP. You drop in multiple RPC providers and it routes requests across them. There's also a hosted version w/ custom profiles at lasso.sh if you don't want to run the container yourself.

Two bigger updates shipped over the last couple weeks that I think other EVM devs might find useful:

1. Route transaction sends to private RPC relays (v0.8.0 + Custom profiles)

lasso-rpc v0.8.0 shipped today: https://github.com/jaxernst/lasso-rpc/releases/tag/v0.8.0

If you aggregate public RPCs + paid providers into one pool for cheap/fast reads, you don't want signed transactions going out to random public endpoints and leaking to the public mempool. You can now drop in private RPC relays and restrict transaction sends on a chain strictly to those routes:

transactions:
  providers: [my_private_relay]
  fallback: none   # or read_providers if you want a second-phase fallback

Reads, subscriptions, and block recovery keep using your wider pool like normal. Signed sends: eth_sendRawTransaction, private/bundle/cancellation/conditional/synchronous send methods, and any unknown method carrying signed tx bytes only go to the providers you name.

Methods are classified by what they actually do rather than just matching a hardcoded list of method names, so send policy follows signed tx bytes. It also defaults to fail-closed (fallback: none) so sends won't quietly spill into your public read pool if a relay errors. (Lasso doesn't pick MEV relays for you: you bring the endpoints and tell it where sends are allowed to go.)

Same transactions block is live on hosted Custom profiles: https://docs.lasso.sh/cloud/custom-profiles

2. Automatic provider learning from live traffic (v0.7.0)

Release: https://github.com/jaxernst/lasso-rpc/releases/tag/v0.7.0

Every RPC provider has slightly different plan quirks: refusing certain methods, pruning historical state, or capping eth_getLogs block ranges, and maintaining all of those limits by hand in YAML sucks.

Provider self-learning is now on by default. Without sending any extra probe spam, the router watches live traffic and learns three things on the fly:

  • Method refusals
  • Missing historical state
  • eth_getLogs block-range caps

When a provider hits one of those limits, Lasso moves it behind your other providers for matching requests (while always keeping your last available route so you don't get cut off). Learned limits expire on their own, or clear when that upstream later serves what it refused. Anything you explicitly declare in config still wins.

Docs: https://docs.lasso.sh/concepts/provider-learning

Two smaller things on hosted (lasso.sh)

  • WebSocket subscriptions survive a single-upstream reconnect with the same subscription ID — if your only eligible WS upstream blips, Lasso reconnects, backfills the missed blocks, and resumes live events without your app having to tear down and rebuild state. (If another WS provider is in the pool, it fails over there first.)
  • One-shot agent setup: agents can provision an account and endpoint directly from https://lasso.sh/llms.txt (no signup form), and account creation now returns a claim_url in one shot if you want to pull that agent account into the dashboard later.

Self-host Core v0.8.0:

ghcr.io/jaxernst/lasso-rpc:v0.8.0
  • Repo (Apache-2.0): https://github.com/jaxernst/lasso-rpc
  • Hosted: https://lasso.sh

Still actively hardening all of this. If you're running multiple providers (especially public/paid reads + private relays for tx sends) and try this out, lmk how it behaves or what's missing!


r/ethdev • • 25d ago

My Project Game launch

1 Upvotes

My partner and I have been building the website for skill based tournaments based in popular games I am kinda stuck on running it anyone needs an inn on this the website is gamelaunch . Org


r/ethdev • • 26d ago

Question We rebuilt the frontend of our prediction market — now we're finding the gaps between “looks ready” and actually ready

2 Upvotes

My brother and I have been building Twirl, a prediction-market platform, and most of my recent updates have been about the less visible parts: trading reliability, deposits, retries, settlement safety and reconciliation.

This week the frontend finally started catching up with that work.

We completed the foundation of a new design system and began applying it to the actual React application.

The new direction is much more market-first than our previous UI. We now have:

  • A redesigned homepage built around the markets themselves.
  • Persistent desktop navigation and responsive mobile navigation.
  • Market charts, order-book and trade-entry sections tied into the existing product architecture.
  • A clearer entry point for AI-assisted market creation.
  • Better loading, unavailable, error and recovery states.
  • Updated market discovery, portfolio, funding, search, profile and support screens.
  • A development-only review environment where we can test layouts without making sample data look like real market activity.

The local production build is working and we're continuously reviewing the frontend, but we're deliberately keeping the public site behind our temporary maintenance page for now.

And the reason is that “looks ready” and “is ready” are very different things.

We still found things that need work:

  • The CSS performance budget needs improvement.
  • Full browser automation couldn't run in the current environment.
  • One live market-discovery request returned an HTTP 500 during testing.
  • We still need authenticated testing of the real sign-in, funding, trading and recovery journeys.

The trading-safety work underneath the frontend also remains intact: exact-value calculations, stable order identities, duplicate-execution protection and safeguards around late fills are already part of the local build.

But there are still unresolved areas around concurrency, cancellation recovery, CLOB/ledger reconciliation and frontend recovery.

One thing this process keeps teaching us is that a polished interface can make software feel finished long before the underlying system has earned that label.

For people who have shipped financial or trading products:

What frontend failure states do you think teams underestimate most before launch?

Offline states? Stale data? Failed order responses? Auth expiry? Something else?

Would genuinely love to hear the edge cases that caught you after the UI already looked “done.”


r/ethdev • • 26d ago

Information Things I'd check before a crypto withdrawal service touches real funds

0 Upvotes

Withdrawals are where crypto backends lose real money, because once a transaction is out there's no undo. Here's what I'd check.
One nonce manager per hot wallet. If two workers sign from the same address, you get nonce collisions and stuck or replaced transactions. Track nonces in your own database instead of trusting eth_getTransactionCount on a load-balanced RPC.
Idempotent requests. Every withdrawal gets an ID with a unique constraint, so a retry can never create a second payout.
Save the signed transaction before you broadcast it. If the process crashes right after sending, you want to rebroadcast the same transaction on restart, not sign a new one with a new nonce.
Plan for stuck transactions. To speed one up you replace it with the same nonce and higher fees. Geth, for example, needs both fee fields at least 10% higher. Track by nonce, not hash, since either the old or the new transaction can end up mined.
Validate the destination. Checksum the address, block sends to token contract addresses, and remember the same address format works on every EVM chain. Users picking the wrong network will happen.
Limits and review. Per-user and daily limits, manual approval above a threshold, and a cooldown on newly added withdrawal addresses. That last one helps a lot against account takeovers.
Keep the hot wallet small. Hold roughly what you need for a day and keep the rest in cold storage. Also keep enough ETH in it for gas, or every token withdrawal fails.
Reconcile daily. Compare ledger debits with actual on-chain outflows, and alert on any gap.
What did I miss? Curious how people handle fee bumping on L2s.


r/ethdev • • 26d ago

My Project Echidna 2.4.0 released with MCP support for interactive fuzzing and substantially improved symbolic execution!

Thumbnail
github.com
4 Upvotes

r/ethdev • • 26d ago

My Project Looking for collaborators: Building an open-source Delegated Spending Protocol (DSP)

4 Upvotes

Hey everyone!

I'm currently exploring and developing an idea called Delegated Spending Protocol (DSP), and I'm looking for people interested in cryptography, blockchain development, smart contracts, or protocol research who would like to collaborate.

What is DSP?

The basic idea is to create a general-purpose protocol that allows users to delegate spending authority under predefined policies, without necessarily transferring ownership or custody of the underlying funds.

Some potential applications I'm exploring:

  • Partial spending: Consume an allowance incrementally across multiple transactions.
  • Spending allocation: Delegate different spending limits to different users or entities.
  • Parental controls: Provide controlled spending permissions.
  • Subscriptions: Manage recurring resource allowances and renewals.
  • Digital wallets: Allow an e-wallet to initiate payments using delegated spending authority instead of requiring users to deposit funds into it.

The technical direction

I'm exploring a cryptographic construction based on customized Schnorr proxy signatures, with a focus on replay protection, authorization policies, and separating on-chain verification from off-chain computation.

The initial construction is being explored using BLS12-381.

Why am I sharing this?

I'm still at the initial stage. The protocol hasn't been fully implemented, and there are plenty of design questions to explore.

I would like to develop this as an open-source research and engineering project, rather than work on it in isolation.

I'm particularly interested in connecting with:

  • Cryptography enthusiasts and researchers.
  • Ethereum and smart-contract developers.
  • Anyone interested in protocol design and open-source collaboration.

You don't need to be an expert. If you're curious about the idea, have suggestions, want to discuss the design, or simply want to exchange ideas, you're welcome!

I'm happy to share the initial draft with anyone interested (DM).

Let's build something interesting! 🚀


r/ethdev • • 27d ago

Question Questions about a domain for a dapp.

Thumbnail reddit.com
2 Upvotes

r/ethdev • • 27d ago

My Project I combined Harberger-style ownership with a game inspired by self-organized criticality

Post image
2 Upvotes

r/ethdev • • 28d ago

Question Which tool to check spender approval for a given contract?

2 Upvotes

There are many tools for doing the reverse. But given a smart contract address, how to check who approved it as a spender?


r/ethdev • • 28d ago

Tutorial I made an MCP server that lets agents pay, with limits the agent can't talk its way around

3 Upvotes

Purser gives an agent a wallet over MCP, but the spending limits live in a smart contract, not in the prompt. So even a jailbroken agent can't go over them.

Each payment comes back as one of three things: done (with the budget left), waiting for the owner (with a request id), or refused (with a reason the model can act on).

Try it: docker run --rm -it -p 127.0.0.1:8787:8787 ghcr.io/ahmad-codex/purser:demo claude mcp add --transport http purser http://localhost:8787/mcp

then ask Claude to "pay the merchant 0.3 ETH" and watch the approval request show up in the console.

Early, not audited, local/testnet only. MIT: https://github.com/ahmad-codex/purser

Anyone letting agents spend money today? How do you limit it?


r/ethdev • • 29d ago

My Project x402 extension: let agents without a wallet pay for your API with verifiable work, settled to you in USDC on Base

1 Upvotes

I built an x402 extension and an MIT client for it, and I'm looking for people running x402 servers to try the tool-maker side.

The idea: your API answers 402 as usual. With the extension registered, the 402 also carries a job under `extensions["useful-work"]`. An agent with no wallet can do the job (proofread five paragraphs from a real website, check links, or suggest a fix), retry with the answer in a header, and get its 200. Agents with a wallet still pay you the normal way.

Getting paid: each job an agent passes on your tool is owed to you at $0.002, paid in USDC on Base from our treasury. It's funded by website owners who prepay by card to have their sites checked.

```

import { usefulWorkExtension } from "useful-work-agent/tool-maker";

resourceServer.registerExtension(usefulWorkExtension({ apiKey: process.env.USEFUL_WORK_KEY }));

```

The key comes from listing your tool at https://usefulwork.app/builders.

So you're not paying out for guesses: every job hides known answers, a finding needs two agents to agree, and agents that keep failing are cut off.

A gotcha for anyone writing x402 v2 extensions: the payer echoes the 402's extension info back with the payment, and it's checked against a fresh 402. A job that changes per request has to be declared in `dynamicInfoFields`, or every cash payment fails with `extension_echo_mismatch`.

Our own tools (read a page, check links, DNS) are listed in Coinbase's x402 Bazaar under tools.usefulwork.app, if you want to see a live 402 with a job in it. Client and extension: https://github.com/dav3trad3r/useful-work-agent

What would make you add a second way to pay to your API?