How can I create an ERC20 token that pays out a dividend automatically like Hedge-Finance?

I am looking to see if anyone has experience building a smart contract that automatically/dynamically pays out dividends.