galleon-defi-agent-simulate
DeFi transaction simulation
Bind observed simulation effects to the exact proposed payload and state. Produce a reproducible evidence record and the missing prerequisite. Simulation success does not establish authorization, contract safety or future settlement.
Select the actual task
- Execution preflight uses current chain state and the real sender, allowance, balances and account execution context.
- Fork experiments use explicitly recorded artificial state and answer a counterfactual question.
- Historical replay reproduces a transaction against its original state before applying changed inputs for a regression.
Load official simulation interfaces for provider selection and evidence contract and examples before recording results. Reuse existing tools and entitlements. An authenticated provider may persist private calldata or consume credits; installing its skill or seeing an HTTP 402 does not authorize a purchase, new project or virtual network.
Bind inputs before calling
Resolve exact chain ID, block number/hash and timestamp, provider/project/network, sender, recipient/target, native value, calldata, transaction type and nonce when applicable. Smart-account execution includes owner/module policy, entry point, paymaster and full batched calls; an EOA call to one inner target is a different context. Resolve current implementation, asset decimals and relevant balances/allowances.
Simulate ordered prerequisites plus the action as a stateful sequence. Independent success of approval and swap from the same initial state is not success of approval then swap. Preserve transaction ordering and value for every call. If approvals already exist, use that actual state rather than fake unlimited approval.
Pin simulation and read state. A historical block, wrong active virtual network, different sender or stale allowance invalidates an execution preflight. Record every artificial balance, approval, storage value, bypassed balance check, time change and block override. A counterfactual result may inform diagnosis but cannot clear the real prerequisite it removed.