I am looking for example of implementation of mintable token where minting happens automatically based on certain rules (e.g. percentage of inflation per year that reduces overtime).
OpenZeppelin has MintableToken implementation https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/MintableToken.sol
That implementation assumes that owner calls mint function wherever required.
What is the best way to make minting happen automatically?
I was thinking to add mint logic call to 'transfer' function that would check if it is time to create new tokens and create them. Is it good approach?