PPSwap is an extension of Tornado Cash Nova which adds on Shielded Swaps to the existing Shielded Transfers, Arbitrary Amount Withdrawals, and Deposits within the the contracts.
To improve accountability PPSwap pools uses Worldcoin and Lens as an optional reputation scoring mechanism for reputation gated pools.
With Worldcoin and Lens at the moment it will be possible to offer a reasonable level of privacy and compliance if needed.
In future more onchain identity and reputation mechanisms could be added into the reputation mechanism.
circuits
: The circom circuits adapted from Tornado Nova to support Shielded Swaps. Updated to circom 2.0.contracts
: Solidity contractsinterfaces
: Interfaces usedutils
: Utility contractsPPFactory.sol
: Factory contract for PPPoolsPPPool.sol
: Implementation of pool clone contracts that are initialized by PPFactoryReputation.sol
: Optional reputation gating mechanism using Lens and WorldID
scripts
: Scripts used to generate circuits and deploy contractstest
: Smart contract testsutils
: Cryptography utility functions
Interestingly, this might have been Tornado V3 if the devs didn't get arrested. Free Alex Pertsev.
"Can the Dev do something?"
Dev got arrested bruh
-
Install Circom 2. It's recommended that you install the binaries instead of building from source. Once downloaded add the package to path. Rename the file as
circom
so you can call it directly. -
Install packages
npm i
-
Compile the hasher
npx hardhat run scripts/compileHasher.js
-
Compile the circom circuits
sh scripts/compileCircuite.sh
-
You should now be able to run tests
npx hardhat test
-
To deploy use
npx hardhat run scripts/deploy.js
This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract.
Try running some of the following tasks:
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.js