So, I have been reading this https://docs.openzeppelin.com/contracts/4.x/governance . First of all, great job at writing this, and thanks for writing such a descriptive documentation. While reading this, I came across a sentence which I don't completely understand. Can someone provide some context for this?
"The token has to implement the ERC20Votes extension. This extension will keep track of historical balances so that voting power is retrieved from past snapshots rather than the current balance, which is an important protection that prevents double voting."
I don't completely understand that the part about keeping historical balances for voting power.
I am assuming that it means storing tokens held by an account while voting on a particular proposal. For example, I am on BanklessDAO and held 150K BANK while I voted on proposal A. Then, I sold some and now have 100K BANK in my wallet while I vote on proposal B. So, it's going to store how many tokens I had while voting. Am I right here?
(PS:- Example is based on my experience using Snapshot)