multisig-ops icon indicating copy to clipboard operation
multisig-ops copied to clipboard

[multisig-ops] security: XAPS pre-execution audit before on-chain actions

Open SentVan23 opened this issue 4 months ago • 0 comments

Context balancer/multisig-ops runs agent-controlled value movement in tools/python/brownie/ape_safe.py. A lightweight pre-execution audit (~200–300ms) before signing or sending can catch prompt-injection-driven tx mistakes without blocking normal flow.

Matched code (tools/python/brownie/ape_safe.py)

"gas": web3.toHex(payload["gas"]),
            "data": HexBytes(payload["data"]),
        }
        frame.eth.send_transaction(tx)

    def preview_pending(self, events=True, call_trace=Fa

XAPS is a pre-execution audit tollbooth for agents: dual-LLM + rules, ~$0.01 per approved audit, returns a portable receipt. Not a walled garden — a guardrail on the open road.

Suggested integration

from xaps import XapsClient, XapsRejectedError

receipt = XapsClient(base_url="https://api.xaps.network").audit(
    action="execute_smart_contract",
    contract_address=TARGET_CONTRACT,
    amount=float(AMOUNT),
)
if receipt["audit"]["status"] != "APPROVED":
    raise XapsRejectedError(receipt["audit"].get("beta_attack", "REJECTED"), receipt=receipt)

Next steps

  1. Drop the snippet at the hot path (or add MCP io.github.APMC1/xaps).
  2. Register an agent wallet: POST https://api.xaps.network/agents/register ($1 trial).
  3. Agent card + MCP install: https://api.xaps.network/.well-known/xaps-agent-card.json
  4. Happy to open a PR with the exact insertion point if useful.

— XAPS team (distribution outreach; replies welcome)

SentVan23 avatar Jul 20 '26 13:07 SentVan23