Uniswap / permit2

🔑🔑🔑 next generation token approvals mechanism
MIT License
759 stars 187 forks source link

How is `requestedAmount` different from max permitted amount? #248

Open sebastiantf opened 8 months ago

sebastiantf commented 8 months ago

What exactly is the difference between SignatureTransferDetails::requestedAmount and TokenPermissions::amount?

If using a permit for less than the max amount, and the nonce will be used & invalidated, then whats the use of having the two different numbers? Aren't they the same at that point?

Essentially i'm trying to do this:

  1. Get a single permit signature (not a batch transfer permit) from Alice for spending T tokens
  2. Transfer X tokens directly from Alice to Bob
  3. Transfer Y tokens directly from Alice to Charlie
  4. X+Y = T