← All research

Builder notes · 13 October 2026 · 6 min read

A refusal that reverts is a refusal nobody sees

By James Warder and Anderson

  • Smart contracts
  • Refusal records
  • Base Sepolia

One millionth of a dollar

Here is the transaction: 0x55bf…fabf on Base Sepolia.

The refused transaction succeeded and moved no value

Status: Success. Value: 0. Base Sepolia, 28 September 2026.

An agent asked our mandate contract to send 100,001 base units of USDC, which is $0.100001. The owner had capped it at 100,000 base units, $0.10. The contract said no. Here is what it wrote down:

The MandateActionRefused event

refusalCode 67, ruleTag 512 (0x0200), attemptedValue 100001, remainingHeadroom 100000, seq 2.

We tested the boundary at one unit over the cap on purpose. Most expensive agent mistakes are not clever. In February 2026 the Lobstar Wilde trading bot was asked for 4 SOL and sent its entire token holding, about $250,000 at the time. One public theory is that it read a raw amount without decimals: about 52,439 tokens meant, 52.439 million sent (The Block). A per-transfer cap is the most boring control there is, and it would have stopped that. What matters is that the cap holds at exactly one unit over the line, and that the attempt is recorded.

Why a revert is the wrong answer

The first version anyone writes looks like this:

require(amount <= cap, "over cap");

It works. The money does not move. But on EVM a reverted transaction rolls back everything it did, including every event it emitted. The block keeps the failed transaction and its gas cost, so a determined analyst can replay it with a tracer and guess why it failed. There is no event, no structured reason and nothing an indexer, an owner or an auditor can subscribe to. As far as the chain's record goes, the agent never tried.

Revert versus record

So we treat a refusal as a successful outcome. The pattern, simplified for illustration (this is not our production code):

function execute(bytes32 mandateId, Action calldata a) external returns (bool) {
    (bool ok, uint16 code, uint16 ruleTag, uint256 headroom) = _evaluate(mandateId, a);
    if (!ok) {
        emit MandateActionRefused(
            mandateId, rootOf(mandateId), msg.sender, a.account, a.id, a.tag,
            mode, code, ruleTag, refusingMandate, a.value, headroom, POLICY_VERSION, ++seq
        );
        return false;            // no revert: the record survives
    }
    _settle(mandateId, a);       // counters move only on success
    _perform(a);                 // value moves only after every rule passed
    return true;
}

Three details carry most of the weight:

  • The check reads the actual arguments of the call, in the same transaction, before anything moves. Reconciling a running total afterwards is not the same thing, because by then the money has gone.
  • The reason is a stable number, not a sentence. Code 67 and rule 0x0200 mean the same thing forever. Human-readable text is derived from the code, never the other way round, so a translation or a UI change cannot change what was recorded.
  • Every record carries the attempted value and the remaining headroom. "Refused" alone tells an owner something went wrong. "Tried 100001, room left 100000" tells them it was a boundary probe and not an attack.

Two rules that are easy to miss

Reject what you do not recognise. Rules are identified by numeric tags. If a mandate contains a tag the contract does not implement, the contract must refuse the mandate, not skip the rule. An unknown rule that is silently ignored is a way around the limit. It is the kind of bug that only appears when a second chain or a newer version is added, which is exactly when nobody is looking.

Check an empty balance last. If the account is empty and the agent is also over its cap, report the cap. A team at a September hackathon pointed this out in their own design, and they were right. An "insufficient funds" refusal hides the rule that would have stopped the agent anyway, and that rule is the one the owner needs to see.

The same idea on other chains

The meaning of a refusal has to be identical everywhere: the same fields, the same codes, the same encoding. The mechanism cannot be.

EVMSolanaMove (Sui, Aptos)
Durable recordEvents, cheap and permanentProgram logs are pruned by most providers. The refusal must be written to account stateEvents, durable
Refusing without losing the recordMust not revertProgram returns without invoking the inner instructionAn abort discards state, so the refusal must be a normal return
Check and execute togetherSame call frameThe mandate program must call the instruction itself (cross-program invocation)Same transaction
Unknown rule kindsExplicit checkExplicit checkFalls out of an exhaustive match

Solana is where the obvious implementation fails hardest. A refusal that exists only as a program log is readable today and gone after the retention window. That is why we do not yet claim refusal recording on Solana, and will not until the record lives in account state and survives the window.

What a public refusal costs

Refusals on-chain are public by design, and that has a price. Anyone can see that an account has a mandate, what its limits are and when its agent was stopped. We tell owners this before they sign. We never link an address to a person. And a refusal record contains no prompt, no strategy text and no private metadata, only what is needed to verify the decision.

A refusal still costs gas, and the gas is charged. The same transaction emits a GasSettled event marked as paid. This one used 376,224 gas units. On a layer 2 that is a fraction of a cent. On a busy mainnet it would be a real cost, which is a reason to keep refusals cheap and to tell owners up front that a blocked attempt is not free.

Where we stand

  • Live on Base Sepolia only, under one compatibility profile, with one action: USDC transfers to listed recipients.
  • Unaudited. No mainnet until an audit is done.
  • Solana and Move refusal recording are designed, not shipped.

Disclosure: Morca Labs builds Gol. The contract in this post is Gol's MandateCore v3, 0xB261…E3ce on Base Sepolia, verified on Sourcify.

Sources

More research