I understand that to start collecting fees you need to add liquidity to a pool e.g. BNB/BUSD Liquidity pool.

So I have a smart contract that uses the uniswapv2 interface to add liquidity to the BNB/BUSD pool.

How would I check how much fees has been generated and what functions / order of functions would I need to collect these fees without removing liquidity.? I don't know if removing liquidity collects fees. Any examples you guys can share / provide? There isn't much learning material for this. Any learning resource, documentation or easy to follow tutorials would be great.

Also do you get fees in the Token A provided (as seen in the code below)?

function addLiquidity(address _tokenA, address _tokenB, uint256 _amountA, uint256 _amountB) external

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.