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

Implement protocol fees #207

Closed
PaulRBerg opened this issue Dec 18, 2022 · 0 comments
Closed

Implement protocol fees #207

PaulRBerg opened this issue Dec 18, 2022 · 0 comments
Assignees

Comments

@PaulRBerg
Copy link
Member

PaulRBerg commented Dec 18, 2022

As agreed in #145, we should implement protocol fees. The idea is to have a mapping that maps token addresses to UD60x18 numbers , which would be used in the create functions to calculate a fee amount that gets accrued as protocol revenues. Consequently, there will also have to be a new mapping for storing the protocol revenues (mapping token addresses to revenue amounts), and another function that permits the contract owner to claim the revenues. Speaking of which, the owner should be implemented via the PRBContracts implementation of Ownable, because this implementation is faster than OpenZeppelin's (it doesn't inherit from Context and it uses custom errors instead of revert reason strings).

Note that the protocol fees should be stored in the comptroller.

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

No branches or pull requests

1 participant