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

WIP: Feature/protocol-fee #41

Closed
wants to merge 13 commits into from
Closed

Conversation

karczuRF
Copy link
Collaborator

Summary

Closes #39
The goal is to upgrade FeeReceiver contract to fix swap issue and add fee split feature.

New features

  • change DXswapFeeReceiver contract to protect from situation where takeProtocolFee function tries to swap token in pair with too small liquidity
  • allow to control fee split and recipient for each pair
  • supports max one external recipient address
  • no deadline to claim protocol fee
  • modify another contracts accordingly

@@ -28,6 +28,9 @@ contract DXswapPair is IDXswapPair, DXswapERC20 {
uint256 public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event
uint32 public swapFee = 25; // uses 0.25% fee as default

address public externalFeeRecipient; // if needed set address of external project which can get % of total earned protocol fee
Copy link
Collaborator

Choose a reason for hiding this comment

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

revert changes in this contract in favor of keeping this information mapping in FeeReceiver

@karczuRF karczuRF closed this May 11, 2022
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