PancakeSwap
Launch App
Portuguese/Brazilian
Portuguese/Brazilian
  • Introdução à PancakeSwap
    • Início (BSC)
      • Crie uma Carteira
      • Obtenha Tokens BEP20
      • Usando PancakeSwap sem Corretoras Centralizadas
      • Conecte sua Carteira na PancakeSwap
    • Início (Aptos)
      • Crie uma Carteira
      • Obter Aptos Coins
      • Tutorial para fazer bridge de CAKE
      • Conecte Sua Carteira na PancakeSwap
      • Perguntas Frequentes sobre Aptos
    • Migração V3/V2
      • Como migrar
      • Como o APR v3 é calculado
      • Perguntas Frequentes
      • 2️⃣Migração V2
        • Migre seus Stakes
        • MasterChef v2
          • List dos Farms
        • Pool de Syrup de CAKE
    • Auditorias
    • Roadmap
    • Clique Aqui para Ajuda
      • Soluções de Erros e Problemas
      • Perguntas Frequentes
      • Corrigindo transações presas na MetaMask
      • Tutorial da Binance Academy
  • Produtos
    • 🔄Exchange
      • Swap de Tokens
      • Como Fazer Trade
      • Taxas e Roteamento
      • Pools de Liquidez
      • Como Adicionar/Remover Liquidez
      • Perguntas Frequentes
      • Integração com Market Maker
      • Smart Router (V2)
        • Como negociar usando o Smart Router
      • Zap
      • 🔄StableSwap
        • Como fazer StableSwap?
      • Ordens Limite (V2)
        • Perguntas Frequentes sobre Ordens Limite
    • 🚜Farm de Rendimento
      • Como Usar os Farms
      • Calculadora de APR/ROI/IL
      • Perguntas Frequentes
      • Farmando na Aptos
        • Perguntas Frequentes
      • Farm Crosschain
        • Perguntas Frequentes
      • bCAKE
        • Como usar o novo bCAKE?
        • Guia de Migração
        • Perguntas Frequentes
        • V2 (descontinuado)
          • Como usar o bCAKE?
    • 🔷veCAKE
      • O que é veCAKE?
      • Como obter veCAKE?
      • Migre da Pool de CAKE
      • Medidores de Votação
        • Perguntas Frequentes
      • Ganhe CAKE Semanalmente
        • Perguntas Frequentes
      • Subornos (Incentivos de Votos)
      • Gerenciadores de veCAKE
      • Incentivando a Liquidez
      • Perguntas Frequentes
    • 🍯Pools de Syrup - Stake de CAKE
      • Nova Pool de Syrup de CAKE
        • Como usar a opção de Stake Flexível
        • Como usar a opção de Stake com Prazo Fixo
        • FAQ da Pool de Syrup de CAKE
      • Outras Pools de Syrup
        • Syrup Pool FAQ & Troubleshooting
    • 🧑‍⚖️Leilões de Farm
    • 💹Compartilhamento de Receita
      • Como participar?
      • Perguntas Frequentes
    • 🛍️IFO (Oferta Inicial de Farm)
      • Como participar de um IFO
      • iCAKE
      • Detalhes do Contrato
    • 🌉Bridge de CAKE
      • Entre EVMs
      • Entre EVM e Aptos
      • Perguntas Frequentes
      • Guia da Bridge Wormhole
      • Perguntas Frequentes da Bridge Wormhole
    • 🤝Staking Simples
      • Como começar o Staking Simples
      • Perguntas Frequentes
      • Termos & Condições
    • 💧Integração de Staking Líquido
      • Como Fazer Stake Líquido
      • WBETH
        • Perguntas Frequentes
      • SnBNB
        • Perguntas Frequentes de SnBNB
    • 🟪Trade de Perpétuos
      • O que é Trade de Perpétuos?
      • Trade de Perpétuos V2
        • Como usar isso?
        • MADBTCUSD
          • Perguntas Frequentes do MADBTCUSD
        • Modo Degen
          • Taxa Dinâmica no Modo Degen
        • Glossário dos Perpétuos V2
        • Forex
        • Perguntas Frequentes de Trade no V2
          • Arbitrum
            • Pool de Syrup de ALP (Arbitrum)
              • Taxas de Compra e Venda de ALP
        • Programa de Recompensas de Trade
          • Arbitrum
      • Trade de Perpétuos V1
        • Glossário do Perpétuos
        • Como posso usar isso?
        • Perguntas Frequentes sobre o Trade de Perpétuos V1
    • 🎮Plataforma de Games
      • 🎓Pancake Mayor
      • 🛡️Pancake Protectors
        • Perguntas Frequentes
    • 🧈Recompensas de Trading
      • Como Participar
      • Perguntas Frequentes
    • 🔮Previsão
      • Como Usar a Previsão
      • Perguntas Frequente Da Previsão
      • Soluções de Problemas na Previsão
    • 🎟️Loteria
      • Como Jogar a Loteria v2
      • Perguntas Frequentes da Loteria
    • 🍯Pottery
      • Como jogar Pottery
      • Perguntas Frequentes do Pottery
    • 🖼️NFT
      • 🖼️Sistema de Perfis de NFT
        • Como configurar um perfil de NFT
        • Equipes
    • 💳Compre Cripto
    • 🌐Mini-Programa da PancakeSwap
      • Como usar o Mini-Programa da PancakeSwap?
      • Perguntas Frequentes sobre o Mini-Programa
      • ⛓️Integração CEDEFI da PancakeSwap
    • 📈Análise (Info)
      • Análise
    • 🖥️RPC Privado da PancakeSwap
    • 🔔Notificações
    • PancakeSwap v4
      • Perguntas Frequentes do v4
    • 💸Opções
      • Cartilha de Opções
      • Opções CLAMM
      • Perguntas Frequentes de Opções
  • Governança & Tokenomics
    • Tokenomics de CAKE
      • Controlando o fornecimento de CAKE
    • Governança
      • Como votar
      • Como Votar com a Carteira SafePal
    • veCAKE
  • Multichain
    • Expansão na Ethereum
    • Implantação na Aptos
  • Ecossistema & Parcerias
    • Programa de Afiliados
      • Dashboard & Link
      • Estrutura Comissão e Pagamento
      • Regras do Programa & Diretrizes
      • Termos & Condições
    • Programa de Embaixadores
      • 👥 Página da Moderação da Comunidade
      • 🌎Página da Tradução da Comunidade
      • ❓ Página das Perguntas Frequentes
    • Marca & Logos
    • 💼Parceria de Negócios
      • ⛽veCAKE/Medidores
      • 🧑‍🌾Oferta Inicial de Farm - IFOs
      • 🥞Pool de Syrup e Farms
      • 🖼️Mercado de NFT
      • ❓Perguntas Comuns Sobre Parcerias de Negócios
  • Desenvolvimento
    • Contribuindo
      • Visão Geral do Código Base
    • Recompensa por Bug
    • Smart Contracts BSC
      • PancakeSwap Exchange
        • Factory v2
        • Router v2
      • Main Staking/Syrup Pool/MasterChef Contract
      • Auto CAKE Syrup Pool (CakeVault)
      • Prediction V2
      • Lottery v2
      • Lottery
        • Lottery Contract
      • Syrup Pools
        • SmartChefInitializable
        • PoolDeployer
  • Equipe
    • A Equipe da Cozinha
    • Torne-se um Chef
      • Frontend Engineer
      • Solidity Engineer
      • DevOps Engineer
      • Blockchain QA Engineer
      • Business Development Manager
      • Communications/Public Relations Manager
      • Social Media Marketing Manager
      • Community Manager - PTBR
  • Fale Conosco
    • Suporte ao Cliente
    • Redes Sociais & Comunidades
  • Archive
    • Antigo Tokenomics
      • CAKE Tokenomics v1
      • Controlling CAKE supply v1
    • How to Use Farms with BscScan
  • Distribuição Token (🚧)
Powered by GitBook
On this page
  • Finding Farm process identifier
  • Depositing LP Tokens through BscScan
  • Making an emergency withdrawal

Was this helpful?

  1. Archive

How to Use Farms with BscScan

PreviousControlling CAKE supply v1NextDistribuição Token (🚧)

Last updated 1 year ago

Was this helpful?

Since it requires several steps, using Farms with PancakeSwap can seem intimidating at first. This guide will walk you through using the Farms contract directly through BscScan.

Please understand that using BscScan to interact with contracts is not recommended for beginners. If you're not feeling confident, we suggest using the

instead.

Finding Farm process identifier

To interact correctly with the farming smart contract, you’ll need the matching process identifier (PID) for your LP pair. For now, the easiest way to locate this is to check GitHub.

2. Control/command + F and search for your pair by ticker (not project name). For example, 'CAKE-BUSD'.

3. Write down or copy the PID number—in this case 389—somewhere you can access it easily. You'll need this later.

Depositing LP Tokens through BscScan

There are a few things involved in depositing LP Tokens using BscScan. We've broken it down into steps to make it easier to follow along.

Getting the Main Staking Contract address

The address for the main staking contract is: 0x73feaa1eE314F8c655E354234017bE2193C9E24E

Open the contract for your LP Token

You'll need to approve the smart contract for the LP Token you wish to commit to a farm before you can spend it.

2. Control/command + F and search for your pair by ticker (not project name). For example, 'CAKE-BNB'

3. When you have the code for the LP pair you're looking for up, find the address after "56:". This will be your contract address.

1. First, visit the

and search for your chosen pair using the "SEARCH" field in the top right. We're using CAKE-BUSD for this example.

2. Click Details to expand the row to show more information.

3. Click View Contract to open the smart contract on BscScan.

Giving permission to the LP Token contract

Now that you have your LP Token's contract open on BscScan, you're going to approve the spending of your LP Tokens into the Farm.

1. On the LP Token's contract page, go to Contract, and then Write Contract.

2. Click Connect to Web3 to connect MetaMask.

3. Under function 1, “approve”, you’ll see “spender:address”. Paste in the Main Staking Contract’s contract address you copied to clipboard earlier.

5. You’re also going to need to approve the amount of LP Tokens the contract can spend. In the value field, you’ll need to enter the amount in Wei. You can use the

to easily change your amount into Wei. Here we'll use 5 CAKE-BUSD LP Tokens.

You can also use -1 as the value to give unlimited spend approval. This does not mean you will spend everything by default, but only that a transaction of any size using this contract will be allowed by your wallet.

6. Click Write and accept the action in your MetaMask wallet. You’re now able to commit LP Tokens to the Farm up to the amount you’ve approved.

Deposit LP Tokens with the Main Staking Contract smart contract

With the Main Staking Contract now approved to spend your LP Tokens, it's time to make a deposit.

2. Click Connect to Web3 to connect MetaMask.

3. Scroll to function 2, "deposit", and type your PID into the "_pid" field.

If you didn't copy down your PID earlier, you can learn how to get it in the Finding Farm process identifier section higher up this page.

4. Underneath _pid you'll see "_amount". Enter the amount for the LP contract to spend that you approved earlier.

5. Check the information and click Write. Confirm your action in MetaMask.

6. You can confirm your deposit worked by clicking View your transaction.

Withdrawing your LP Tokens from a Pool is very similar to making a deposit. The difference is which function you'll interact with.

2. Click Connect to Web3 to connect MetaMask.

3. Scroll all the way down to function 15, "withdraw", and type your PID into the "_pid" field.

If you didn't copy down your PID earlier, you can learn how to get it in the Finding Farm process identifier section higher up this page.

4. Underneath _pid you'll see "_amount". Enter the amount of LP you'd like to withdraw from the Pool.

5. Check the information and click Write. Confirm your action in MetaMask.

6. You can confirm your withdrawal worked by clicking View your transaction.

Making an emergency withdrawal

‌Using the emergency withdraw function allows you to draw all your funds out of a pool when no other way is working.

Using the emergency withdraw function will forfeit your CAKE rewards!

The PancakeSwap team strongly suggests avoiding this function unless advised to do so officially by the PancakeSwap team, or if you are very comfortable interacting with smart contracts and understand the underlying code.

2. Click Connect to Web3 to connect MetaMask.

‌3. Scroll down to function 4, "emergencyWithdraw", and type your PID into the "_pid" field.

If you didn't copy down your PID earlier, you can learn how to get it in the Finding Farm process identifier section higher up this page.

5. Check the information and click Write. Confirm your action in MetaMask.

6. You can confirm your withdrawal worked by clicking View your transaction.

PancakeSwap Farms page
BscScan Unit Converter
How to Use Farms guide