Borrowing Aggregator
Fuji is a protocol that aims to optimize loan expenses for DeFi users. It achieves this by monitoring the borrowing markets and whenever there is a better rate, it refinances the debt its users. More details could be found here.
Create a file .env
and set at least one of the following:
ALCHEMY_ID=<your-key>
INFURA_ID=<your-key>
yarn install
yarn fork
# core markets
npx hardhat run scripts/mainnet/00_initial_deploy.js
# fuse markets
npx hardhat run scripts/mainnet/01_deploy_fuse.js
# fantom markets
npx hardhat run scripts/fantom/00_initial_deploy.js
npx hardhat test --network localhost test/<file-with-tests>.js
- node: 14.17.1
- yarn: 1.22.10
We use solhint as a linter and prettier as a code formatter.
A non-exhausitve list with some synthax rules:
- Contract names must be CamelCase, so the file containg it.
- Public and external functions name must be in camelCase.
- Private and internal functions name must be in _camelCase.
- Getter functions must be in getCamelCase.
- Setter functions must be in setCamelCase.
- Function parameters must be in _camelCase.
- Event names must be in CamelCase.
- Modifier name must be in mixedCase.
- Private and internal variables must be in _camelCase.
- Public variables must be in camelCase.