Giter Site home page Giter Site logo

pancake-farm's People

Contributors

acegilz avatar chefnomi avatar jishankai avatar pancake-cat avatar pancake-swap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pancake-farm's Issues

Error when Added LP and dosen't return coin

On Apr-24-2021 11:52:46 AM +UTC, We added the Nuls-busd LP and got error Fail with error 'TransferHelper: TRANSFER_FROM_FAILED' after that It returns only Nuls but doesn't return BUSD. We guessed gas not enough.

We expected to validate users able to process the transaction to success or reverted contact and return all coin when transaction break.

Address: 0xDC744F3d275AEE66BABDA02626DE83dae4783a9f

Transaction Hash:
0x2163302c0b964cac50ed1693e035d9be5acd6bdfb540e3311274870cd6f7ec1d

thank you

I'm getting this weird error when I try to run the master branch locally

Failed to compile.

src/Providers.tsx
Line 4:32: Unable to resolve path to module 'react-helmet-async' import/no-unresolved

Search for the keywords to learn more about each error.

I have tried to run "yarn install" and yarn add react-helmet-async
However when I look under the problems tab in vscode I see "initializer provides no value for this binding element and the binding element has no default value"

Can someone please help thanks.

image

A security vulnerability submission

Hello, I found a conditional competition vulnerability. I want to know how to submit vulnerability details and vulnerability reward rules. You can contact me through TG(@RedTeamPing).

Farming and pools seems not be working on testnet

We are tryting to make pancakeswap to work on bsc testnet. What we have done is as follows.

We have renamed the cake token to another token e.g BarToken with Symbol BARS
We have added liquidity using Router V2 and Factory V2 and we have added liquidity using pancakeswap swap interface and everything seems to be working fine on this side. We renamed the Lp tokens on factory contract.

Than we fork the pancake-swap frontend and deployed the contracts for.

  • SyrupBar (provided token address when deploying)
  • MasterChef (provided srypbar address and token address and change the ownership of syrupbar and caketoken)
  • Souchef
  • LP pair contract generated by factory after adding liquidity using pancakeswap-frontend core.

We have added these contracts in config files for contracts, pools, farms and tokens. We also updated wbnb bsc testnet contract.

The problem is that we are not able to approve pool and not able to farm which has pair BARS-BNB(we double check the address). The wallet address is also the contract owners for all these contract.

After some debugging we find that the allownaces are getting undefined for pools and farms.

Did we miss anything?

Cannot read property 'pid' of undefined

Having LP for PNT-PBTC

Steps to reproduce:

  • Load this account: 0x6Fb34001811396086299a42D49fa95ABB5D02F82
  • Navigate to Farm section: https://pancakeswap.finance/farms
  • Wait until the information get loaded (2 or 3 minutes)
  • Search for PNT-PBTC (if not loaded wait until this LP get loaded)

Actual result

The screen got blank and if you press F12 then you can see the following error: Cannot read property 'pid' of undefined

image

Expected result

The user should be able to see the PNT-PBTC LP tokens

NOTE: this is not a cache issue because I have cleared the cache and this error remains

Is the support here ? Stake LP tokens not working

Hi PancakeSwap, I am looking for some support. I connected PancakeSwap to a Binance wallet, I added some liquidity, but when I try to Stake LP tokens (DITTO-BNB LP) the popup window blocks on "Pending Confirmation" after I confirmed the operation on the Binance popup. Am I doing something wrong (and is it the correct place for asking) ?

Is there any plan to have these contracts audited?

Not an issue but im unsure where to ask this to the correct people.

Is there any plan to have the smart contracts audited by an external third party? It would go a long way in providing confidence to trade on the BSC and pancakeswap.

Have a problem with cake-bnb stake v2

Yesterday, I was stake in cake-bnb (may be I misremember) but I see total staked is 0 .

Here is my transaction, what does it do?

0x32071da305c8ccbdb7c71c89701c774ebe4471fd4760f393e1da3e1d3ec837fc
image

I was track it and know that it sent to 0x73feaa1ee314f8c655e354234017be2193c9e24e Chief Master
The problem is how i can get it back or I just can't see it temporally(I will see it show in the pancakeswapV.2 farm) ?

emergencyWithdraw did not burn the syrup

enterStaking mint the syrup, leaveStaking burn the syrup, but emergencyWithdraw did not burn the syrup

// Stake CAKE tokens to MasterChef
function enterStaking(uint256 _amount) public {
    PoolInfo storage pool = poolInfo[0];
    UserInfo storage user = userInfo[0][msg.sender];
    updatePool(0);
    if (user.amount > 0) {
        uint256 pending = user.amount.mul(pool.accCakePerShare).div(1e12).sub(user.rewardDebt);
        if(pending > 0) {
            safeCakeTransfer(msg.sender, pending);
        }
    }
    if(_amount > 0) {
        pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
        user.amount = user.amount.add(_amount);
    }
    user.rewardDebt = user.amount.mul(pool.accCakePerShare).div(1e12);

    syrup.mint(msg.sender, _amount);
    emit Deposit(msg.sender, 0, _amount);
}

// Withdraw CAKE tokens from STAKING.
function leaveStaking(uint256 _amount) public {
    PoolInfo storage pool = poolInfo[0];
    UserInfo storage user = userInfo[0][msg.sender];
    require(user.amount >= _amount, "withdraw: not good");
    updatePool(0);
    uint256 pending = user.amount.mul(pool.accCakePerShare).div(1e12).sub(user.rewardDebt);
    if(pending > 0) {
        safeCakeTransfer(msg.sender, pending);
    }
    if(_amount > 0) {
        user.amount = user.amount.sub(_amount);
        pool.lpToken.safeTransfer(address(msg.sender), _amount);
    }
    user.rewardDebt = user.amount.mul(pool.accCakePerShare).div(1e12);

    syrup.burn(msg.sender, _amount);
    emit Withdraw(msg.sender, 0, _amount);
}

// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
    PoolInfo storage pool = poolInfo[_pid];
    UserInfo storage user = userInfo[_pid][msg.sender];
    pool.lpToken.safeTransfer(address(msg.sender), user.amount);
    emit EmergencyWithdraw(msg.sender, _pid, user.amount);
    user.amount = 0;
    user.rewardDebt = 0;
}

The attacker can attack like this:

function attack() external {
    masterChef.enterStaking(100);
    masterChef.emergencyWithdraw(0);
}

vulnerability

i Would suggest removing!

   // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good.
    function migrate(uint256 _pid) public {
        require(address(migrator) != address(0), "migrate: no migrator");
        PoolInfo storage pool = poolInfo[_pid];
        IBEP20 lpToken = pool.lpToken;
        uint256 bal = lpToken.balanceOf(address(this));
        lpToken.safeApprove(address(migrator), bal);
        IBEP20 newLpToken = migrator.migrate(lpToken);
        require(bal == newLpToken.balanceOf(address(this)), "migrate: bad");
        pool.lpToken = newLpToken;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.