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

Calculate Profit on Each Swap Transaction for DEX #7

Open
Akshola00 opened this issue Nov 3, 2024 · 0 comments
Open

Calculate Profit on Each Swap Transaction for DEX #7

Akshola00 opened this issue Nov 3, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed onchain Implement contract or testing

Comments

@Akshola00
Copy link
Owner

Goal

Implement a function to calculate the profit earned by the DEX on each swap transaction. This will help track earnings and provide insights into trading activity.

Requirements

  • Define a profit calculation function to be executed after each swap.
  • The profit calculation should consider:
    • Swap fees charged on each transaction.
    • The difference between the input and output token values
@martinvibes martinvibes added enhancement New feature or request help wanted Extra attention is needed onchain Implement contract or testing labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed onchain Implement contract or testing
Projects
None yet
Development

No branches or pull requests

2 participants