decentdao / decent-contracts

Your Safe, Superpowered
https://app.fractalframework.xyz
MIT License
3 stars 3 forks source link

Add ERC-165 support to all Fractal contracts #73

Closed adamgall closed 1 month ago

adamgall commented 7 months ago

Some Fractal contracts, but not all, support ERC-165, Standard Interface Detection.

All contracts, (most importantly the Azorius contract and all Strategy contracts) should support this functionality.

Adding this support will allow third party consumers of these contracts (either other contracts, or most importantly the Fractal UI) to ask instances of these contracts if they support different functionalities.

This is important because currently, for example, the only way to know if a strategy address (which is a proxy) on an Azorius contract is LinearERC20Voting or LinearERC721Voting is by scraping the event history of a Factory contract, looking for events that include given proxy address, then taking the "master copy" address property from that event log and comparing it to our master copy addresses of LinearERC20Voting and LinearERC721Voting.

This is a very expensive operation that most RPC nodes choke on.

It also doesn't allow any DAOs to customize / tweak / make-their-own any strategy contracts. Strategy contracts must have been created and deployed by Fractal in order for our UI to recognize them.

Shutter DAO 0x36 is questioning why our implementation of Quorum doesn't include "against" votes. A valid question! Their DAO might want to tweak their strategy to allow for that. But in our current setup, it's not possible for their DAO to deploy a new strategy and have our UI work.

By implementing ERC-165, we'll be able to greatly simplify our "determination" logic in the Fractal UI to understand what kind of strategies are installed on a Fractal DAO, and as a happy consequence also break the requirement that strategies need to be official Fractal strategies.

tomstuart123 commented 3 months ago

@adamgall - customisation of strategies feels important as we scale to more users... but also feels like a big lift.

Even if we can't move this to ready yet, should we try and define it so a dev can pick it up once we do have bandwidth.

Whats your take?

adamgall commented 3 months ago

Oof, yeah, this is a big undertaking. But it would improve our ability to be more dynamic in-app regarding our ability to recognize different flavors of contracts.

I don't necessarily think this needs more definition, it can be picked up now. Moving to Ready.

adamgall commented 1 month ago

Stale, closing