-
Notifications
You must be signed in to change notification settings - Fork 40
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
daoFeeShare functionality per KIP-33 #34
base: main
Are you sure you want to change the base?
Conversation
@@ -73,9 +73,16 @@ contract RetireCarbonFacet is ReentrancyGuard { | |||
retirementMessage | |||
); | |||
|
|||
// Send any aggregator fees to treasury | |||
uint256 daoFee; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can break this out into its own function with LibRetire
, perhaps LibRetire.sendFee(uint256 totalFee)
@@ -64,6 +64,7 @@ contract DiamondInit { | |||
|
|||
// Retirement convenience fee | |||
s.fee = 1000; | |||
s.daoFeeShare = 80000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should spin up a new init contract with only the changes and args needed for this diamond cut
@@ -52,6 +52,7 @@ struct AppStorage { | |||
mapping(address => Account.State) a; // Mapping of a user address to account state. | |||
uint256 lastERC721Received; // Last ERC721 Toucan Retirement Certificate received. | |||
uint256 fee; // Aggregator fee charged on all retirements to 3 decimals. 1000 = 1% | |||
uint256 daoFeeShare; // Share of 'fee' for the DAO wallet, per KIP-33. 3 decimals. 1000 = 1% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a feeDivisor
field and remove the magic numbers from the libraries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, definitely, I was thinking that as well as I was typing it in. I'll add it.
Follows existing 'fee' logic.
Set value to 80% per KIP-33.
Closes issue #32 .