Hi,
We are relatively new to solidity and to get familiar with it and with interactions between contracts I have tried to put together a code that accumulates "interest" (PoS) for the holders of token A (Basetoken in the code) which can be claimed later in the form of token B (RewardToken in the code, quite similarly to neo and gas).
The code relies on the zeppelin framework and we would be glad to see it (or something like this) later becoming a standard class in the framework after some (probably a lot of) review.
Contract A accumulates 'historical' rewards for the accounts which can be claimed for the same account in contract B.
The source is available on github:
https://github.com/cryptogoodie/reward-token.git.
What do you think about it? Any feedback is appreciated. Feel free to fork/push back commits to the repository. This is really a learning project for us.
Thanks!