Skip to main content
A configuration update sets an unintended trading fee. This template restricts the stored fee to a short allowlist selected by pool type.

Behavior

At transaction end, AmmFeeVerificationAssertion reads fee slot 1 and stable-pool flag slot 2. Stable pools permit raw fee values 1 or 15; other pools permit 25 or 30.

Configuration

Replace both slots, the flag decoding, and the allowed values. Confirm the fee denominator in the deployed implementation. A raw value of 30 must not be described as 30 basis points unless the protocol uses a 10,000 denominator.

Scenarios

Coverage limits

The example does not calculate fees, check recipients, or verify fee distribution. It also permits a transaction to change the pool-type flag and select a fee allowed for the new type. Protect that flag separately if pool type must remain fixed.

Source

The reviewed source is a teaching template. The example setup guide provides the pinned checkout and test procedure.