interesting stuff. I wonder how the decentralized lottery works tho?
The same way everything else works! If you mean how the winners are picked, they are picked based on a future block hash which is randomly generated by Miners who are competing with each other so it's as random as it gets!