Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegations Dashboard #188

Open
rkalis opened this issue Jan 26, 2024 · 2 comments
Open

Delegations Dashboard #188

rkalis opened this issue Jan 26, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rkalis
Copy link
Member

rkalis commented Jan 26, 2024

This suggestion came from WiiMee:

There are several services used for "wallet delegations", such as Delegate.xyz and Warm.xyz. It would be useful to have a "Delegations" tab next to Approvals and Signatures which displays a list of delegations for a wallet with the option to revoke the delegations.

I don't know enough about how these delegations work in particular to know how viable this is, but I think it is definitely a good idea to explore it.

@rkalis
Copy link
Member Author

rkalis commented Aug 19, 2024

Delegate.xyz v1 has contract view functions that return lists of given delegations (cold -> hot wallet):
https://etherscan.io/address/0x00000000000076a84fef008cdabe6409d2fe638b#readContract

Delegate.xyz v2 has view functions that return lists of given and received delegations (cold <> hot wallet):
https://etherscan.io/address/0x00000000000000447e69651d841bd8d104bed493#readContract

Warm.xyz has view functions that return a single given delegation or a list of received delegations (cold <> hot wallet):
https://etherscan.io/address/0xc3aa9bc72bd623168860a1e5c6a4530d3d80456c#readProxyContract

So it looks like we can definitely display given delegations for all of these platforms with just a few smart contract calls. We should also be able to display received delegations for Delegate v2 and Warm easily, but not for Delegate v1. From a security perspective, inspecting / revoking given delegations is the important part in any case.

If we wanted full support for given + received delegations and/or if we wanted to display delegations/revokals in a future "History" tab, then we may need to look at Delegation events as well.

@rkalis rkalis added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Aug 19, 2024
@rkalis
Copy link
Member Author

rkalis commented Aug 19, 2024

My idea around implementation for this would be that we create a "DelegationsPlatform" class similar to the "Chain" class, which can be instantiated with a "name" and a "getter" function. Alternatively we could also create it in a way that looks closer to the PriceStrategy, where each platform gets its own subclass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant