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

daoFeeShare functionality per KIP-33 #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShimonD-KlimaDAO
Copy link
Contributor

Follows existing 'fee' logic.
Set value to 80% per KIP-33.
Closes issue #32 .

@@ -73,9 +73,16 @@ contract RetireCarbonFacet is ReentrancyGuard {
retirementMessage
);

// Send any aggregator fees to treasury
uint256 daoFee;
Copy link
Collaborator

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;
Copy link
Collaborator

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%
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

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 this pull request may close these issues.

2 participants