Trustless timestamps on Algorand

I think it would be great if Algorand could provide an easy way for trustless timestamping for example implementing the OpenTimestamps format (OTS) or something even better - I couldn’t find anything related to that so I’m assuming at the moment it is something still missing.
Ii would be a great L1 feature and, along with trustless document signing, could open up to many real world usecases which today still rely on cumbersome third-party CAs.
At the same time could be a boost for network usage and transaction consumption.

Comments and experiences welcome!

OTS seems to be quite hardcoded into bitcoin opentimestamps-client/cmds.py at a2121ea7a66db36cc52fad1d19ab6bdccf2ccf06 · opentimestamps/opentimestamps-client · GitHub

I believe it would be easier for timestamp service to create timestamp just with single transaction to algo blockchain with note field the hash of the document to sign. Then timestamp is just 32 bytes of the txid.

To verify this timestamp one has just to read this transaction from the blockchain, check the hash in the note field, and get the timestamp from the block.

In that case how can you achieve truly trustless time information? If I got right you rely on the timestamp included in the transaction, but who tells you it is exactly that time? Where does information come from? I’m not technical so sorry If I say something wrong, but as far as I know OTS does some kind of comparison to avoid using a timestamp produced by a server. In legal mail for example you rely on the timestamp of the mail server but that’s a centralized approach

it comes from the blockchain. 1000 node operators agreess each block on the list of transactions included in the block as well as the timestamp… there are hardcoded rules for example that timestam must always go up, and much more…
in order to hack the time function of algorand you would probably have to manage create block in which you modify timestamp to be very high and make over 500 node operators to agree that it is correct time… statistically it is not possible as you would have to pay a lot of money to get enough algos to have all 500 nodes arranged in one block for you to be verifier

https://mainnet-api.algonode.cloud/v2/blocks/26034245?format=json

"ts": 1672860178,

ts is the timestamp of the block

It makes sense…Thank you very much for your kind reply!