# FHE Validation

## Mind Network's Research Results:

* DeepSeek's FHE Validator: [Repo](https://github.com/mind-network/mind-sdk-deepseek-rust), [DeepSeek Official Link](https://github.com/deepseek-ai/awesome-deepseek-integration)
* Virtuals's FHE Validator: [Repo](https://github.com/mind-network/mind-virtuals-game-node-integration)
* Eliza's FHE Validator: [Repo](https://github.com/elizaOS/eliza/tree/main/packages/plugin-mind-network), [Eliza with FHE Tutorial](https://github.com/mind-network/mind-eliza-integration/blob/develop/docs/docs/advanced/eliza-with-fhe.md)
* Swarms' FHE Validator: [Swarm Rust](https://github.com/georgesheth/swarms-rust), [Swarm Shield](https://github.com/georgesheth/swarm-shield)<br>

## Mind Network's Research Details:

🔐 **Proof of Stake (POS)** is a consensus mechanism where stakeholder voting power determines validation results. POS is widely used in blockchain, AI, DePin and other decentralised worlds. For example, vote if [Ethereum](https://ethereum.org/en/developers/docs/consensus-mechanisms/) status is the longest chain to avoid unnecessary forks, can vote if [Bittensor](https://docs.bittensor.com/yuma-consensus) select the best performed models, can vote if [IoTex](https://docs.iotex.io/the-iotex-stack/iotex-staking/about-iotex-staking) conducts fair community governance, and so on.

🤝 **FHE Validation** focuses on preventing "collusion" risk, a dark shadow exists from day 1 of POS. Vitalik discussed it in [2016](https://vitalik.eth.limo/general/2016/12/29/pos_design.html), [2019](https://vitalik.eth.limo/general/2019/04/03/collusion.html), and [2024](https://www.ccn.com/news/crypto/vitalik-buterin-announces-ethereum-rainbow-staking/), echoed widely by others recently, for example [Ethereum](https://www.youtube.com/watch?v=dNJ5Tj2VDUo), [Polkadot](https://polkadot.network/blog/polkadot-consensus-part-1-enhanced-economic-security-via-npos), and [Binance](https://www.bnbchain.org/en/blog/a-guide-to-restaking). A short summary of "collusion" risk is caused by stakers who have "clue" with each other. For example, if a16z voted "no" in a proposal, it could influence other nodes who saw a16z's vote also to vote "no". To increase difficulty of "collusion" risk, the current used solution is to [randomise validators selection](https://www.coindesk.com/learn/what-is-the-merge-and-why-has-it-taken-so-long/). It is acceptable in super large networks like [Ethereum which has more than 8192 validators](https://ethresear.ch/t/sticking-to-8192-signatures-per-slot-post-ssf-how-and-why/17989), but not in small networks which [only have a few hundreds or even dozens of validators](https://solana.com/news/validator-health-report-august-2022) or even less. It is because a small number of validators could accumulate a significant amount of tokens and control a large portion of the network's decision-making power, which is called "[POS timebomb](https://www.immunebytes.com/blog/the-pos-timebomb-in-blockchain-networks)" and the communities have already seen in several networks.

🛡️ **FHE Validation** addresses "collusion" risk by encrypting votes, ensuring privacy while achieving consensus. It is due to the nature of FHE to enable computation directly on encrypted data without decryption. While the mathematical details of FHE are complex, its basics can be illustrated as follows:

1. Alice encrypts her value privately.
2. Alice sends the encrypted value to Bob for computation.
3. Bob computes the function on the encrypted data and returns the result.
4. Alice decrypts the result to obtain the final value.

\
🔒 With **FHE**, POS is developed into a consensus of mathematical production of stake by **encrypted** vote. Being different from classical POS, before and after voting, each validator node can not see what others have votes and is called "**private voting**", but their encrypted votes can reach consensus with FHE. Without "clue", validators are enforced to make independent decisions. You can see from the diagram below as an example.

🔍 In **Mind Network**, FHE validators are forced to do independent validators because their votes can not been seen. We've developed [SDKs](https://github.com/mind-network/Awesome-Mind-Network) in multiple languages to facilitate FHE Validation. FHE Validators encrypt their votes using a specified FHE Public Key and submit them to the FHE Validation Consensus. This has extremely useful in AI and Agents, and Mind is already adopted by the popular projects like DeepSeek, Virtuals, Eliza and Swarms.

<figure><img src="https://1430718782-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhJfyUe1I7P47fzKlldpK%2Fuploads%2FgriTZms5vpepgoxlRqM1%2Fimage.png?alt=media&#x26;token=a1425863-8c48-41eb-87ec-9729069dc3ca" alt=""><figcaption></figcaption></figure>

<br>
