Another point I want to make that I think a lot of people on HN miss is that you cannot do this with a database alone.
This is the equivalent of a token table where the token is a cryptographic hash. However, it’s the cryptography that you are trusting, not the database.
The simple analogy is that you are using PGP to sign a message where the contents are a dollar. Only the person who can decrypt that message gets the dollar so you only give the hash to the person you want to have the dollar.
If there are actually dollars involved, this is a real thing.