https://github.com/code-423n4/2025-05-upside/blob/9b733293823beebe0cc6813dcfb7bbbb2454d60a/contracts/UpsideProtocol.sol#L113-L159
The tokenize() function in the UpsideProtocol contract allows users to tokenize the provided url. A critical parameter governing this process is tokenizeFeeEnabled, which determines whether users must pay a fee in order to call the function. When this flag is set to false, users can freely call tokenize() without paying any fee.
This design introduces a significant front-running risk. Since the function can be called without restriction or cost when fees are disabled, malicious actors can monitor pending transactions in the mempool and submit the same tokenize() call with a higher gas price to get their transaction mined first.
Once the second user successfully tokenizes the provided URL, the contract sets a mapping entry for that URL:
This causes urlToMetaCoinMap[_ur] to be non-zero. Therefore, when user1s transaction is eventually mined, the following check fails:
Attackers can steal high-value URLs (e.g., popular brand names).
Require users to first commit to a hash of the URL, and then reveal the full URL in a second transaction after a short delay. This prevents front-runners from knowing what is being tokenized in the first transaction.
