Skip to content

Add ETH RPC DAO pool balance alias#415

Open
andrewnguyen22 wants to merge 7 commits into
stagingfrom
dao-pool-eth-balance-alias
Open

Add ETH RPC DAO pool balance alias#415
andrewnguyen22 wants to merge 7 commits into
stagingfrom
dao-pool-eth-balance-alias

Conversation

@andrewnguyen22

Copy link
Copy Markdown
Collaborator

This PR improves exchange-facing ETH-RPC compatibility for Canopy by exposing protocol balances through Ethereum-style reads.

Summary

  • Adds canopy_getStake(address, blockTag?) to return validator stakedAmount as an eth_getBalance-style 18-decimal hex amount.
  • Adds canopy_getPool(id, blockTag?) to return pool amount as an eth_getBalance-style 18-decimal hex amount.
  • Adds a reserved read-only DAO pseudo-address alias:
    • eth_getBalance(0x000000000000000000000000000000000001ffff, < blockTag >)
    • Returns the DAO pool balance from DAOPoolID for centralized-exchange compatibility.
  • Updates ETH-RPC documentation to describe the new custom methods and DAO pseudo-address behavior.

Why

  • Some integrations, including exchange listing flows, expect an Ethereum-style address they can poll with eth_getBalance.
  • Canopy pools are native protocol state, not EOAs, so this adds the smallest compatibility layer needed without broadening the ETH wrapper into a full pool-address model.
  • The custom methods remain available as the explicit integration path for native stake/pool reads.

Implementation notes

  • The DAO alias is scoped to a single reserved pseudo-address only.
  • Normal eth_getBalance behavior for standard account addresses is unchanged.
  • Missing validators in canopy_getStake return 0x0 to match eth_getBalance expectations.

Files changed

  • cmd/rpc/eth.go
  • cmd/rpc/README.md
  • fsm/ethereum.md

@andrewnguyen22 andrewnguyen22 added the RPC Plugin or 3rd party chain module label Jun 17, 2026
@andrewnguyen22 andrewnguyen22 self-assigned this Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RPC Plugin or 3rd party chain module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant