In Tadle, offers are identified through a generated address based on its offer unique identifier, this ID is incremented each time a new offer is created.
However, as offer IDs are not based on the offer's data:
This could cause users to accept the wrong offer in the event a blockchain re-org occurs.
Assume the following transactions occur in separate blocks:
Block 1: Alice calls createOffer() to sell 1000 points for 1000 USDC, offer ID is 0
Block 2: Bob calls createTaker() to exchange 1000 USDC for Alice's 1000 points, offer ID is 1
Block 3: Alice calls createOffer() to sell 10 points for 1000 USDC, offer ID is 2
A blockchain re-org occurs and Block 1 is dropped in place of Block 3:
Alice's second offer now has the publication ID 0 instead of 2.
Bob's call to createTaker() in Block 2 is applied on top of the re-orged blockchain:
This causes Bob to accept a different offer than he intended to, since the second transaction submitted by Alice will have the same order address as the first transaction that was dropped.
Given that Tadle will be deployed on Ethereum and other EVM compatible chains, which may have experienced large re-orgs in the past such as Polygon, the likelihood of the scenario described above occuring due to a blockchain re-org is not low since it can lead to loss of funds.
Manual Review
Consider identifying offers with a method that is dependent on its contents and ID.
Invalid, the taker should be creating a taker offer for an already existing maker offer that has been finalized, i.e. createOffer has been successfully executed before reorg occurs, so this is a non-issue
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.