transmissions11 / solmate

Modern, opinionated, and gas optimized building blocks for smart contract development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

token balance checkpointing extension

z0r0z opened this issue · comments

commented

Solmate should support a minimalist, compound-style module for voting that checkpoints balances over time. I imagine we can make this extensible with both ERC20 and ERC721 tokens. Supporting delegation feels a bit opinionated and might be its own separate module. To better support cross-chain composability and upcoming merge (with fixed block times), unix timestamps should be used rather than block numbers. This may nudge OZ to follow as well.

block.timestamp is provided by the miner , right ? subjected to miner manipulation.

commented

sure @jaglinux But I would argue this remote risk is outweighed by the benefits. In any case, a solmate-style pattern for checkpointing balances seems useful.