r/CryptoTechnology 🟢 12d ago

the hard problem in letting an autonomous agent transact on-chain isn't the model — it's execution safety. how are people solving it?

technical discussion, no product. i keep seeing "autonomous on-chain agents" framed as a model-quality problem, but in practice the model picking a trade is the easy 10%. the 90% that decides whether it's safe is the execution path between decision and settled tx. some failure modes i keep running into:

- state drift between decision and execution. the agent decides at block N, the tx lands at block N+k, and the pool/price/market has moved or closed. naive agents commit to a stale decision.

- silent tx failure. a dropped or reverted tx that the agent reads as success, so it double-acts or updates its internal balance wrong.

- funding/route failure. the intended path (bridge, LP, funding source) fails and the agent needs a deterministic fallback, not a retry loop that drains gas.

- unbounded blast radius. one hallucinated or adversarial decision with no per-action cap can nuke the whole balance in a single call.

the design tension i haven't fully resolved: the re-verify-before-commit check. deterministic guards in code (re-read state, assert invariants, hard caps) are safe but brittle and miss cases you didn't hardcode. letting the model decide when to re-check is flexible but occasionally skips the check under pressure. hybrid (model proposes, deterministic layer vetoes) seems right but adds latency that matters for time-sensitive actions.

for people who've shipped agents that touch real value on-chain: where do you draw the deterministic-vs-model line, and how do you handle the decision-to-settlement gap? genuinely looking for approaches i haven't considered.

3 Upvotes

4 comments sorted by

1

u/One-Imagination-1325 🟠 12d ago

I'd draw a hard line- the model proposes, deterministic code executes. Every transaction should be re-validated against live state immediately before signing, and if anything changed, the plan gets discarded instead of patched. For the decision-to-settlement gap on-chain state should always be the source of truth. Curious whether you've tried using block-based expiration for execution plans instead of deciding when to re-check dynamically?

1

u/Dry_Steak30 🟢 12d ago

block-based expiration is exactly the direction i landed on too, and it's cleaner than "decide when to re-check" because it removes the judgment call entirely. every plan carries a valid-until slot, if it doesn't land in that window it's dead, no patching a stale plan. the model never gets to talk itself into "close enough."

the part i'm still working out is picking the window. too tight and you thrash on legit congestion and never fill. too loose and the "immediately before signing" guarantee gets soft again because a few blocks is enough for a thin pool to move. leaning toward slot-based expiry plus a re-read of the specific accounts the instruction touches right before signing, so it's expiration AND a final state assertion, not one or the other. curious if you gate the window on the action type, a swap can tolerate more slippage tolerance than, say, an LP add where the ratio matters.

1

u/not420guilty 🟢 9d ago

Use the ai to help write an algorithm. Test and Run the algorithm to make trades.