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

As a user I want to collect fee earnings in THX #18

Open
peterpolman opened this issue Dec 8, 2020 · 0 comments
Open

As a user I want to collect fee earnings in THX #18

peterpolman opened this issue Dec 8, 2020 · 0 comments
Assignees

Comments

@peterpolman
Copy link
Member

peterpolman commented Dec 8, 2020

TODO

  • Set the factory address with contractor
  • Get the quickswap factory
  • Create method deposit()
  • In method call factory.getPair(maticAddr, ethAddr) for MATIC/ETH
  • See if the pair exists
  • If not create the pair factory.createPair(maticAddr, ethAddr)

Flow

  • Deposit ERC20 in pool
  • Transfer fee to erc20-swapper contract (collector)
  • Call swapper.collect()
  • Call swapper.swap()
  1. Get pair for ERC20/ETH from quickswap factory
  • Swap ERC20 for ETH
  • Swap ETH for THX
  • Transfer THX to balancer pool
  1. Create pair for ERC20/THX from quickswap factory if ERC20/ETH pair is not found
  • Provide liquidity (THX) for new pair
  • Swap ERC20 for THX
  • Transfer THX to balancer pool
@peterpolman peterpolman self-assigned this Apr 26, 2021
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

No branches or pull requests

1 participant