code-423n4 / 2021-07-connext-findings

0 stars 0 forks source link

txData.expiry = block.timestamp #28

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

function fulfill treats txData.expiry = block.timestamp as expired tx: // Make sure the expiry has not elapsed require(txData.expiry > block.timestamp, "fulfill: EXPIRED");

However, function cancel has an inclusive check for the same condition: if (txData.expiry >= block.timestamp) { // Timeout has not expired and tx may only be cancelled by router

Recommended Mitigation Steps

Unify that to make the code coherent. Probably txData.expiry = block.timestamp should be treated as expired everywhere.

sanchaymittal commented 3 years ago

https://github.com/connext/nxtp/pull/28