subtensor icon indicating copy to clipboard operation
subtensor copied to clipboard

[EVM] Precompile extension - proxy pallet

Open camfairchild opened this issue 10 months ago • 1 comments

Is your feature request related to a problem? Please describe.

Use case: There is an existing system that can manage users' stake via proxy. In order to enable it, a user needs to add proxy for their account, and then the existing system will be able to add or remove stake on the user's behalf as needed. The EVM users (with H160 addresses) need to be able to use this system as well.

Describe the solution you'd like

For that reason we need the EVM H160 addresses to be able to add ss58 proxy addresses and allow them to call subtensorModule add_stake and remove_stake extrinsics.

Describe alternatives you've considered

No response

Additional context

This is also a security concern as adding proxy accounts in a non-transparent (to the user) way can be dangerous long-term. - Perhaps this can be resolved with block explorer that would show that an address has a proxy.

Implementation details

Add methods add_proxy and remove_proxy to the staking precompile. These methods should accept bytes32 public key of the proxy and call proxy pallet internally to add proxy address with permission to call add_stake and remove_stake extrinsics.

camfairchild avatar Dec 13 '24 17:12 camfairchild