FL4G (FlashLoans4Good) is a liquidation protection platform built to serve mainstream borrowers.
One of the biggest problems in decentralised finance (DeFi) today is market volatility which can lead to costly liquidations and hence the loss of money. Flashloans4Good uses flash loans as a force for good to protect that money by minimising collateral losses from costly liquidations. These users want to utilise DeFi to borrow with the goal of improving their lives in some way. They take on good debt such as to pay for education, fund a business, or own a home. We strongly believe that by simplifying the user experience and by minimising collateral losses due to liquidations this can help to drive the mass adoption of DeFi.
- Solidity/Truffle/Infura/Netlify
- React/Javascript/CSS/HTML
cd packages/core/interface
npm install
npm start
npm install netlify-cli -g
Note: if fails with post-install error refer > https://answers.netlify.com/t/netlify-cli-fails-to-install/34508/4 or try using a different versionnpm i netlify-cli@10.3.3
npm run build
netlify deploy
- Install truffle with
npm install -g truffle
- Add matic network to truffle-config.js > refer https://docs.polygon.technology/docs/develop/truffle/
- Create .env file with INFURA and MNEMONIC info > refer https://forum.openzeppelin.com/t/testnet-deployment-error-could-not-create-addresses-from-your-mnemonic-or-private-key-s/4461
truffle migrate --network matic
FlashLoan Smart Contract https://mumbai.polygonscan.com/tx/0x61f5bec2f34c548a1fcf1f7b4e43233764f5e356222eb85912c1fa63482babcd
Gelato Resolver Contracts https://mumbai.polygonscan.com/address/0xA5F241e14e75e62390a310D3396421D5Dd85d313
- Install Ganache refer > https://trufflesuite.com/ganache/
- Once installed Launch (aka start) > create new workspace or quickstart (in this case, we have a workspace called ETH SHANGHAI 2022 HACKATHON)
- Ensure RPC server is pointing to port 8545 and that matches the development network port in truffle-config.js
cd packages/core
truffle test test/test-aave-flash-loan.js
- Mumbai V3: 0x5343b5bA672Ae99d627A1C87866b8E53F47Db2E6
- Mumbai V3: 0xc1eB89DA925cc2Ae8B36818d26E12DDF8F8601b0
- Mumbai V3: 0xB3f5503f93d5Ef84b06993a1975B9D21B962892F
- Mumbai V3: 0x527a819db1eb0e34426297b03bae11F2f8B3A19E
- Created at: ETH Shanghai 2022 Hackathon
- Demo day video: ETH Shanghai 2022 Hackathon Demo Video
- Slides: Presentation Slides
- Frontend: wallet integration, integrate new AaveV3 borrower subgraph and display
- Backend: Working with Aave, Gelato, and DeFiSaver teams to fix flash loan repayments
- Deploy to IPFS (workaround deployed to Netlify).