I have a question, is it possible for the ICP transaction hash to be tampered with?

I have a question, is it possible for the ICP transaction hash to be tampered with? Are you sure it’s tamper-proof? I have an idea – to use ICP transaction hash as a lottery number for lottery game transactions.

1 Like

Not 100% sure on all this, so please verify my claims with docs or code too.

I see a bunch of ways this can be manipulated. Basically all of it boils down to the fact that ICP ledger blocks are created for every transaction. In BTC or other chains a bunch of transactions are pooled into a big block full of unpredictable data, plus the consensus mechanism is part of the block hash. In ICP this is not the case. One user creates one transaction which creates one block, no other users’ data included.

Important note about semantics: The TRANSACTION hash contains little to no unpredictable data, so I can set it to whatever I want by changing e.g. the memo or the timestamp that I submit. Maybe the subnet time is part of it? That’s not completely predictable, but still guessable. BLOCK hashes are a bit better. They include the previous block’s block hash. That is much better for a lottery. But at times of low activity I’m sure it is possible to manipulate.

1 Like

Thank you for your answer, I feel like I need to find a more reliable way to realize my vision, in short, thank you.

Maybe you could combine a range of transactions to get better properties? E.g. if you take all transactions that happened over five minutes and crunch those down into a hash then you get back most of the properties of a BTC block

Thank you very much for your suggestion.