PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, July 28, 2022

[FIXED] How can I reward addresses with who add liquidity to the pool? (ERC20 token)

 July 28, 2022     blockchain, cryptocurrency, erc20, ethereum, solidity     No comments   

Issue

If an address swaps ETH for my_token, I wanna reward them with free my_tokens (calculated as a % of the transaction). Would it be possible to implement it in the solidity code or are there any built-in solutions on uniswap, pancakeswap etc.


Solution

This is how it is usually done with liquidity mining.

  • When you add liquidity you receive LP token of the pool (liquidity provider token(
  • Then you lock these LP tokens to a vault
  • As long as the LP tokens are locked, the user is receiving rewards

One of the most well-known contracts for such liquidity mining is MasterCher from Sushiswap.

I suggest

  • You try liquidity mining yourself by buying some token subject to liquidity mining
  • Then see how MasterChef could be applied for your project


Answered By - Mikko Ohtamaa
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing