Recording Holding Periods Without a Hard Fork: A Design Review of SecurityToken.sol
Should someone who held a token all month receive the same income as someone who bought it just before settlement? In the previous article, we approached this question through ownership history and time-weighted rights. Recording only the points where balances change lets us reconstruct how much an address held and for how long.
After writing that article, we reopened the code from 2023. The implementation had existed before the formula was
written down. SecurityToken.sol in nigo-protocol-v0 is a prototype that uses balance history to calculate income
for a specified block range. We could express the idea in a smart contract without a hard fork of the underlying
chain. A small calculation makes both its possibilities and its unfinished work easier to see.