Summary
On Aug 31 2023, a bug was identified and subsequently fixed in the voting power calculations for proposals on snapshot.org. The issue was first reported by members of the ApeCoin community and had a minor impact on voting power scores in some proposals, but no proposals from verified spaces suffered changes in their final outcome.
Timeline
- Aug 30 11:00 GMT: Bug introduced accidentally during a routine code update.
- Aug 30 16:00 GMT: ApeCoin community members report an issue with voting power, caused by the bug.
- Aug 31 19:45 GMT: Internal verification confirms the issue and finds the root cause.
- Aug 31 20:14 GMT: Fix deployed.
- Aug 31 23:15 GMT: All affected proposals from verified spaces updated.
Root cause
The bug originated from a code change that affected the Score-API, our voting power calculation engine. Instead of using the proposal’s snapshot to calculate voting power, the Score-API was computing voting power at the latest block of the network where voting power was requested.
Resolution
Upon pinpointing the faulty segment within the Score-API, our engineering team promptly reverted the code to its previous, stable state. This reversal effectively eliminated the issue, recalibrating voting power calculations back to their intended functionality.
Impact
- Most proposals that closed within the period where the bug was active haven’t been affected.
- Minor discrepancies in scoring (<1%) in most of the affected closed proposals.
- No proposals had their outcome changed.
- List of affected proposals with score change > 1% from verified spaces
Future steps
- No further action is required by any user or space.
- Despite constant improvement, we can aspire to more rigorous code reviews and testing procedures. In particular, we will cover score calculation process with more e2e/unit tests