Uniswap/UniswapX

Add fuzz testing for sig verification

Closed this issue · 3 comments

Some fuzz / random tests that:

  • generate a random order
  • hash it
  • change one or more order values at random
  • assert hash changes

Bonus points to sign original order and check that execution works, then change order and assert execution no longer works

FYI taking a slightly different approach than what you've suggested. IMO It's a bit complicated to generate a random order, and then change one or more order values at random. Just gonna start with a static order and then change one attribute at a time.

Bonus points to sign original order and check that execution works, then change order and assert execution no longer works

@marktoda Will the 2nd execution use the signature of the 1st order? I don't follow exactly