Skip to content

Revert #778: gate EVM submitters at their EVM address, not the derived Zilliqa address#780

Merged
frankmeds merged 1 commit into
mainfrom
fix/governance-revert-778-evm-identity
Jun 5, 2026
Merged

Revert #778: gate EVM submitters at their EVM address, not the derived Zilliqa address#780
frankmeds merged 1 commit into
mainfrom
fix/governance-revert-778-evm-identity

Conversation

@frankmeds

Copy link
Copy Markdown
Contributor

Reverts #778 (f0339c68).

Why

#778 derived a MetaMask user's Legacy/Zilliqa (SHA256) address from the signature and used it for the gZIL gate / scoring / members. That assumption was wrong: on Zilliqa, a MetaMask account holds its ZRC2 tokens (gZIL) at its EVM (Keccak) address, not at the legacy Zilliqa address.

Verified against a real account (same private key in MetaMask + ZilPay):

Account Address gZIL
EVM (MetaMask) 0x8307a100…167198 (zil1svr6zq…) 40 gZIL
Legacy/Zilliqa (SHA256) 0xaaA6833…035f34 (zil142ngx…) 0

The user signed in with MetaMask (the EVM account, which holds the 40 gZIL), but #778 normalized body.address to the legacy account (0xaaA6833…, empty) and the gate returned MIN_BALANCE. #778's derivation was correct (it does compute the legacy address) — but it pointed the balance check at the wrong one of the user's two accounts.

What this restores

The original behavior: gate/scoring/members use the address the user signed with (body.address):

  • MetaMask signer → EVM address → gZIL[0x8307a100…] = 40 → passes.
  • ZilPay (Legacy) signer → Zilliqa address → that account's gZIL → passes.

This is also the correct governance rule and avoids double-counting voting power: a user's gZIL is counted once, at the address controlled by the wallet they signed with (signing with the other wallet yields its own balance, typically 0). Forcing everyone onto the legacy address (keeping #778) would instead require every MetaMask holder to move their gZIL across accounts.

Scope

Verify on staging

With MetaMask account 0x8307a100… (40 gZIL), create a gZIL-space proposal → expect 201; GET /api/gzil/proposals shows the author as the EVM address. ZilPay holders continue to work as before.

@frankmeds frankmeds merged commit 517e014 into main Jun 5, 2026
3 checks passed
@frankmeds frankmeds deleted the fix/governance-revert-778-evm-identity branch June 5, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant