My understanding is that after a user provides liquidity to a farm on pancakeswap they are given a Liquidity Pool token (which is added to their wallet) but once they stake this LP token it is no longer in their procession thus trying to read their balance using the smart contract of that LP token would render 0.

So my question is, after a user has staked their LP token, is it possible to find their balance just from using blockchain data / web3 directly?


After spending some time looking into other projects that show this information I discovered the way to find it is by executing a function called userInfo on the main PancakeSwap Staking contract: 0x73feaa1eE314F8c655E354234017bE2193C9E24E. The additional info you'll need is the ID of the pool you are trying to get information about.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.