a lending protocol study, kinda like aave
- core defi logic: deposit, borrow, withdraw, repay, liquidations and flash loans.
- dynamic nfts: you get an nft when you deposit and it changes based on your position.
- zk-proof: a private pool using circom and snarkjs (wip).
- tests: covered with hardhat 3.
- frontend: a basic vue + wagmi interface to interact with the protocol.
- finalize the zk-proof system with merkle trees for the private pool.
- polish the frontend and add merkle tree support
- study https://github.com/tornadocash/tornado-core/blob/1ef6a263ac6a0e476d063fcb269a9df65a1bd56a/circuits/withdraw.circom
- study https://github.com/mjerkov/membership/blob/main/scripts/proof.sh
-
start a local node in one terminal:
npx hardhat node
-
deploy the contracts in another terminal:
npx hardhat ignition deploy --network localhost ./ignition/modules/MiniAave.ts
-
mint some test tokens to your wallet (the first account from the node):
npx hardhat run scripts/mintTokens.ts --network localhost
-
run the frontend:
cd frontend pnpm install pnpm dev