Platform: Code4rena
Start Date: 16/09/2021
Pot Size: $200,000 SUSHI
Total HM: 26
Participants: 16
Period: 14 days
Judge: alcueca
Total Solo HM: 13
Id: 29
League: ETH
Rank: 15/16
Findings: 1
Award: $115.80
🌟 Selected for report: 1
🚀 Solo Findings: 0
🌟 Selected for report: nikitastupin
9.2639 SUSHI - $115.80
nikitastupin
The DOMAIN_SEPARATOR
for permit
function is defined in constructor https://github.com/sushiswap/trident/blob/9130b10efaf9c653d74dc7a65bde788ec4b354b5/contracts/pool/TridentERC20.sol#L30-L38. As noted in https://eips.ethereum.org/EIPS/eip-2612#security-considerations this may lead to replay attacks in case of a future chain split.
Scenario is as follows:
permit
function off-chain for the first chain.permit
function with victim's parameters and signature.Possible replay attacks on permit
function in case of a future chain split
I'll write a PoC if needed
As noted in https://eips.ethereum.org/EIPS/eip-2612#security-considerations retrieve DOMAIN_SEPARATOR
each time via function DOMAIN_SEPARATOR() external view returns (bytes32)
.
#0 - maxsam4
2021-09-23T09:50:28Z