Skip to content

curation: add a withdrawal fee #205

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

Merged
merged 1 commit into from
May 28, 2020
Merged

Conversation

abarmat
Copy link
Contributor

@abarmat abarmat commented May 22, 2020

Changes:

  • Add a withdrawalFeePercentage parameter only set by governor.
  • When a curator redeems shares for tokens, part of the tokens are kept as withdrawalFee and burned.

@abarmat abarmat requested a review from davekay100 May 22, 2020 14:15
@abarmat abarmat self-assigned this May 22, 2020
Copy link
Contributor

@davekay100 davekay100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only one small comment , otherwise looks good

await this.curation.stake(this.subgraphId, this.curatorTokens, { from: curator })
// Set new value
await this.curation.setWithdrawalFeePercentage(0, { from: governor })
await this.curation.setWithdrawalFeePercentage(1, { from: governor })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we setting it three times?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's wrong to set it three times, I will delete one of those.

It should set two times, one to check that zero is allowed and other one to a non-zero number.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will address this fix in the PR that uses Typescript

@abarmat abarmat force-pushed the ariel/curation-withdrawal-fee branch from 50978a7 to 633631e Compare May 28, 2020 15:06
@abarmat abarmat merged commit a12ab77 into master May 28, 2020
@abarmat abarmat deleted the ariel/curation-withdrawal-fee branch May 28, 2020 15:11
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