Allow verified humans to perform encrypted trades and retain privacy from any source chain.
This was made possible with the integration of Fhenix, Hyperlane and WorldCoin into a single all-encompassing, privacy-preserving solution.
- Verified Proof of personhood using WorldID on the Mytic DEX UI
- Cross-Chain transfers using custom Hyperlane Warp Routes
- End-to-End encrypted swaps using Fully Homomorphic Encryption (FHE) from Fhenix
In the end-to-end flow in Mystic DEX, the amounts swapped by the user is fully encrypted. This has a number of benefits such as MEV mitigation, on-chain privacy and user sovereignty.
This repo is comprised of three packages, foundry, hyperlane,nextjs foundry - contains all smart contracts and deployment scripts for application logic residing on Base Sepolia and Fhenix. This includes AMM and Yield Bearing Vaults. hyperlane - contains all the hyperlane configurations for the warp route and core contracts to interoporate between chains. This was generated from Hyperlane CLI nextjs - Contains the front end code to run the application including world ID integration
- Add Account Abstraction to source chain interactions
- Slippage improvements / customisability on Fhenix AMM
- Deploy entrypoint contracts to more supported chains
- Increase number of relayers / verifiers on Hyperlane warp routes
- Add zk entrypoint to obfuscate user interactions (e.g. Railgun)
- Add user address sanction screening to prevent bad actors (e.g. Chainalysis / Elliptic)
- WorldCoin
- todo
- Hyperlane
- Custom 4626 Vault
- HypERC20CollateralVaultDeposit
- Core contract deployments can be found under ./hyperlane/artifacts/
- Fhenix
To build and run:
npm install && npm run dev
install npm packages
npm install
re-map dependencies
forge remappings
re-build project
forge build
run all tests
forge test -v
deployment scripts can be found in ./script, shell scripts are used for changing state and deploying the custom vault contracts
- use hyperlane cli to generate and deploy hyperlane onto new chains.
- create a warpe route after successful deployment
Test a hyperlane transfer of USDC from orign to src, result of this test are
- funds deposit into vault
- usdc synthetic token minted
- sends encrypted token to end user
- end user reccieved yield bearing vault token
make sure to use the private key used to deploy the core contracts ie relayer, mailbox, router
command:
hyperlane send transfer
Every new commit is deployed to vercel