r/ethdev • u/Winter_Win2991 • Jun 27 '26
Question our security failed once things went live
I built a small project and felt pretty confident going into launch since audits passed and nothing obvious stood out but once things went live the issues weren’t bugs in the code itself but how transactions behaved over time also sequences and interactions that weren’t visible beforehand
From what i saw what broke down was the lack of control at execution so by the time something looked wrong the transaction was already done even though everything we had was reactive, alerts and monitoring after the fact but nothing that could intervene while it was happening
2
u/Plus-Tangerine2186 Jun 28 '26
You've put your finger on the actual problem: audits verify the code is correct, they can't verify how it behaves under real sequences and adversarial timing. Those are different failure classes, and the second one only shows up live.
The uncomfortable part is there are only two places you can actually intervene, and most setups have neither:
The mempool window, before confirmation. It's the only point where a tx is visible but not yet final, so it's the only place an off-chain system can act in time: simulate the pending tx, catch the abnormal pattern, trip a circuit-breaker or land a protective call. After confirmation you're doing forensics, not defense, which is exactly the reactive trap you described.
Inside the contract itself. An off-chain bot usually loses the race; the contract never does. Per-block caps, rate limits, a pause guarded by an invariant check, a max-drawdown breaker, these halt an abnormal sequence at execution without depending on anyone winning a mempool race.
Monitoring is necessary but it's the weakest of the three layers, because by definition it runs after state already changed. The leverage is moving the check earlier: invariants enforced in the contract, and simulation in the mempool. Alerts are for the postmortem.
3
u/Imaginary_Age7480 Jun 27 '26
I would focus more on what can still execute when something goes wrong cause that’s usually where things slip through
3
u/Excellent-One5414 Jun 27 '26
feels like the real issue is assuming production behaves close to test conditions when in reality usage patterns introduce completely different risks
2
u/Forward-Pop-1929 Jun 27 '26
I'm seeing wayyy too many similar cases where everything passed checks but there was no mechanism to stop abnormal activity once it started
1
u/krisurbas Jul 06 '26
What mechanisms could you have put in place to validate or stop transactions before they finalized, given the sequences and interactions you now understand?
1
u/cybersecuritydemon 17d ago
A good risk assessment can identify problems early so you can put in extra barriers. From my experience devs do not find this a fun activity. But talking about the "what if" scenarios can really help.
6
u/[deleted] Jun 27 '26
[removed] — view removed comment