About
To let a bot compound your Uniswap v4 position today, you call approve(keeper, tokenId). That says WHICH position the keeper may touch. It says nothing about WHAT it may do.
v4 makes this sharper than it sounds. Liquidity management goes through one entrypoint, modifyLiquidities(bytes actions), and that bytes payload is an action array — a small language with 26 opcodes. Restricting a keeper to "may only call modifyLiquidities" restricts nothing, because that function is itself an interpreter. We traced all 26 opcodes to file and line: four of them (TAKE_PAIR, TAKE, SWEEP, MINT_POSITION) take a recipient address straight from the caller. So an approved keeper can assemble DECREASE_LIQUIDITY + TAKE_PAIR(..., its own wallet) and nothing on chain objects. That is the Code4rena Revert Lend H-04 class, and the shape behind the ~$17M Aperture Finance drain.
Envoyage inverts who writes the instructions. The keeper never sends calldata — it calls compound(mandateId, minFee), two integers. Envoyage assembles the v4 action array itself, with the recipient as a constant in code. Misuse is not rejected by a check; there is no field in which to express it.
A mandate carries what an approval cannot: a fee cap in basis points of harvested fees (never of the position), a fee recipient pinned at grant time, a cooldown, an expiry, and a check that the position has not changed hands. Revocation is immediate.
Each mandate is also published as an ENSv2 subname, so anyone can resolve it in any ENS client and read the exact scope — without visiting our app or trusting our frontend.
From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.






