It was a bad night for #BSC
https://abs.twimg.com/hashflags... draggable="false" alt=""> #defi, but I wanted to share a tip. If you ever need to quickly get your staked LP liquidity tokens from a rug-pulled project like $SAFU, the Contract explorer on @bscscan can be your lifeline.
Let& #39;s review!
Let& #39;s review!
Most of these #defi projects use boilerplate from SushiSwap, so first thing is to locate the project& #39;s MasterChef Contract. You should know this address before staking in any new project, and devs should publish!
For our example, #SAFUSwap& #39;s Contract is https://bscscan.com/address/0x1C9F2AEB888de01C3fa8e2D7485a7f281FBc779a">https://bscscan.com/address/0...
For our example, #SAFUSwap& #39;s Contract is https://bscscan.com/address/0x1C9F2AEB888de01C3fa8e2D7485a7f281FBc779a">https://bscscan.com/address/0...
The Contract tab on BSCScan will allow you to interact with the contract that handles token pairs and rewards. You can read the Code (always a good idea), but what we really want to do is Read and Write.
Since most projects offer several liquidity pairs, you will need to do a little bit of digging to determine which pool ID (or & #39;pid& #39;).
To do this, you& #39;ll want to switch to the & #39;Read Contract& #39; section, and scroll down to the functions that deal with the pool details.
To do this, you& #39;ll want to switch to the & #39;Read Contract& #39; section, and scroll down to the functions that deal with the pool details.
First, we find the number of pools. Under & #39;poolLength& #39;, you see there are 8 pools (which will be referred to from 0 - 7).
You could get the PoolInfo from each one and match them to the LP Contract, but I think just mapping out which pids return values from Pending is fine.
You could get the PoolInfo from each one and match them to the LP Contract, but I think just mapping out which pids return values from Pending is fine.
Now that you know which pool(s) have your LP tokens, let& #39;s get them back! At the top of the section, switch to & #39;Write Contract& #39;, and authorize your wallet with "Connect to Web3".
This process should look familiar, as you& #39;re simply allowing the page to interact with your wallet.
This process should look familiar, as you& #39;re simply allowing the page to interact with your wallet.
The function you& #39;re looking for is & #39;emergencyWithdraw& #39;. You will lose any staking rewards this way, but in a rugpulled project, they& #39;ll be worthless.
For each pid that you recorded, enter it and click & #39;Write& #39; to tell the contract to return your LPs, which can then be liquidated.
For each pid that you recorded, enter it and click & #39;Write& #39; to tell the contract to return your LPs, which can then be liquidated.
If you want to try pulling the LPs *and* the associated rewards, you can try using the & #39;withdraw& #39; function, giving the exact amount from the pending call; but when you& #39;re scrambling to recover what you can, may not be as prudent.
Best of luck to everyone in the #BSC
https://abs.twimg.com/hashflags... draggable="false" alt=""> #defi space!
Best of luck to everyone in the #BSC