Description: On the Protocol level, the variable block.timeStamp
is being used to influence the time when a Soulmate token has been minted. The global variable block.timeStamp
does not necessarily hold the current time, and may not be accurate. Miners can influence the value of block.timeStamp
to perform Maximal Extractable Value (MEV) attacks thus prioritising a certain time to mint the Soulmate
token.
Note: This additionally means users could front-run this function and influence a certain time to mint the soulMate token.
Impact: Any user can influence when the Soulmate
token has been minted thus making the protocol to register a false current time in the Soulmate::idToCreationTimestamp
mapping.
Proof of Concept:
A malicious user can influence the current time let's say to 1 week ahead which is equivalent to 604_800 seconds.
The Soulmate::idToCreationTimestamp
then records the altered current time to be the set 604_800 seconds/ 1week.
Place the following into the SoulmateTest.t.sol
.
Recommended Mitigation: Consider using an off-chain Oracle to get the accurate present time for minting the Soulmate token.
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.