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

Rearchitect a more granular authorization mechanism centered around the Module Registry #225

Open
leeren opened this issue Dec 7, 2023 · 0 comments · Fixed by #227
Open
Assignees

Comments

@leeren
Copy link
Contributor

leeren commented Dec 7, 2023

Currently, our protocol design centers around standardizing authorization logic of module executions and configurations by enforcing that all calls go through a single "StoryProtocol.sol" frontend which abi.encodes all calldata to be passed into a generic execute or configure function that then decodes the data and routes it accordingly. This current design is neither flexible nor optimized for dev-ex.

Instead, we should rearchitect our protocol so that the module registry acts as a granular authorization source for all frontends that register through it. Instead of enforcing encoding through a single generic function, the protocol should support "registering" authorized frontends ("gateways") with a list of module dependencies (module type + function selector) by authorized protocol admins. Then, all downstream modules can simply extend a base module that checks whether the caller for a targeted function was pre-approved.

This would simplify logic greatly, allow any authorized contracts to register as frontends to our data layer, and greatly optimize the developer experience.

@leeren leeren self-assigned this Dec 7, 2023
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 a pull request may close this issue.

1 participant