ERC-5805: Voting with Delegation Checkpointing
ERC-5805 is the standard interface that ERC-20Votes / ERC-721Votes implement. Token holders delegate voting power to themselves or an address (a representative). Voting power is tracked in historical checkpoints so a governance vote at block N can read the delegate's voting power as it was at block N — protecting against flash-loan governance attacks.
Required Methods
function clock() external view returns (uint48);
function CLOCK_MODE() external view returns (string memory);
function getVotes(address account) external view returns (uint256);
function getPastVotes(address account, uint256 timepoint) external view returns (uint256);
function delegates(address account) external view returns (address);
function delegate(address delegatee) external;Neo Equivalent
The Neo C# port stores per-account checkpoints (block, votes) in storage and reads them at vote time using binary search. Same flash-loan-resistance property, implemented identically.
Live on Neo TestNet
Both implementations deployed on Neo N3 TestNet.
| Implementation | TestNet Address | Contract Hash |
|---|---|---|
Solidity (neo-solc) | NUKHCo2gUfGE3vAyKDCYfWvkHcCjkN4MmL | 0xb87fa58c…035f3110 |
Neo C# (nccs) | NSXG6PtP19h74j4xZyPTV6myWdMcWSsRwz | 0x1d33818b…3243692 |
Verified: ERC-6372 clock interface (CLOCK_MODE = "mode=blocknumber&from=default"), token symbol, delegation API. Both implementations use block.number / Ledger.CurrentIndex as the timestamp source — flash-loan-resistant by construction. docs/standards-mirror/deployments/erc-5805/.
