Skip to content

Commit

Permalink
docs: fix formatting on signature-transfer.md (#797)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdevant authored Nov 21, 2024
1 parent 6458d82 commit cd715f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/contracts/permit2/reference/signature-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ It’s important to note that when hashing multiple typed structs, the ordering

Instead of using incrementing nonces, we introduce non-monotonic, or unordered nonces with a `nonceBitmap`.

The `nonceBitmap` maps an owner's address to a uint248 value, which we will call `wordPos` which is the index of the desired bitmap. There are 2**248 possible indices and this 2**248 possible bitmaps where each bitmap holds 256 bits. A bit must be flipped on to prevent replays of users’ signatures. Bits that are dirtied may not be used again.
The `nonceBitmap` maps an owner's address to a uint248 value, which we will call `wordPos` which is the index of the desired bitmap. There are 2<sup>248</sup> possible indices thus 2<sup>248</sup> possible bitmaps where each bitmap holds 256 bits. A bit must be flipped on to prevent replays of users’ signatures. Bits that are dirtied may not be used again.

```solidity
// nonceBitmap[ownerAddress][wordPosition] retrieves a uint256 bitmap
Expand Down Expand Up @@ -238,4 +238,4 @@ A signer called Bob signs a permit to transfer 100 USDC with a router contract a

</aside>

Universal Router protects against this by checking that the `msg.sender` from inside the routing contract is the supposed spender by passing `msg.sender` in as the `owner` param in any permit calls and by passing in `msg.sender` as the `from` param in any transfer calls.
Universal Router protects against this by checking that the `msg.sender` from inside the routing contract is the supposed spender by passing `msg.sender` in as the `owner` param in any permit calls and by passing in `msg.sender` as the `from` param in any transfer calls.

0 comments on commit cd715f1

Please sign in to comment.