> For the complete documentation index, see [llms.txt](https://richpig.gitbook.io/rich-pig/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://richpig.gitbook.io/rich-pig/security.md).

# Security

### No migrator code

**Rich Pig smart contracts DO NOT use the migrator code** which is known from PancakeSwap.

In theory PancakeSwap can take all your tokens within 6 hours if they decide so. Although they might not do it, the code is still present in their smart contract and this code is exactly how all rug pulls were done.

You can see the following migrator code is still present in the following link:

{% embed url="<https://github.com/pancakeswap/pancake-farm/blob/master/contracts/MasterChef.sol>" %}

### Emergency withdraw

In case that something happened to our front-end (website) like DDoS attack, site is unavailable etc. and you need to withdraw your tokens, you can:

1. Go to vfat.tools (if we are listed there already) and operate your pool from this site
2. Go to Rich Pig MasterChef smart contract on BSCScan page and use emergency withdraw

### Maximum allowed pool fee

Maximum allowed pool fee is set to 4%. MasterChef smart contract denies the owner to set highier fee than 4% from deposit. This is an unique security element that probably no other DeFi farm has implemented.

### Maximum token emission

Maximum token emission that owner of smart contract can set is 1 PIG per block. This is also limited the same way as in previous case (maximum allowed pool fee) by denying it in smart contract. Smart contract owner can only lower it down.

### No timelock needed

Timelock was designed to ensure that the owner of a smart contract will not be able to change pool fees, token emission rate and run a migrator code before a certain period of time. Since Rich Pig MasterChef has a limited maximum emission rate and limited maximum pool fees by constant values, which even a smart contract owner cannot increase above the maximum values and no migrator code, it makes no sense to have any timelock. This solution is much more safe than having the values unlimited and using a timelock.

### Removed dev address from MasterChef

We do not use the dev address in MasterChef as other farms like Goose Finance do. They use it as a 10% reward added to all the minted tokens which goes developer's wallet. This makes them whales in the project (owning 10% of the overall emission). Our MasterChef contract is much more fair - we don't take any rewards!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://richpig.gitbook.io/rich-pig/security.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
