The project provides a decentralized platform allowing WVT holders to lend out their stable coins by keeping WVTs as collateral.
Enabling WVT holders with the ability to get P2P loans from the blockchain community.
The deployment script is written in the migrations file "1_initial_migration". This project has total of 4 contracts which are deployed in succession with multiple functions called in between.
Normal Deployment
const instanceVariable = await deployer.deploy(contractVariable, contructorArguments)
Deployment with proxy
const instanceVariable = await deployProxy(contractVariable, [args], { kind: 'uups' });
## Step 1
Importing the contracts
```javascript
const oracle = artifacts.require("Oracle");
const Master = artifacts.require("Master");
const LendNFT = artifacts.require("LendNFT");
const Lend = artifacts.require("Lend");
Gets the accounts to be used for deployment
const accounts = await web3.eth.getAccounts();
Deploys lendNFT contract using openzeppelin upgradable plugin.
let nftinstance = await deployProxy(LendNFT,[],{kind: 'uups'});
Deploys oracle contract using openzeppelin.
await deployer.deploy(oracle);
Deploys master contract using openzeppelin upgradable plugin.
let MasterInstance = await deployProxy(Master, [oracleInstance.address,"500"], { kind: 'uups' });
Deploys lend contract using openzeppelin upgradable plugin.
let lendInstance = await deployProxy(Lend, [MasterInstance.address, nftinstance.address], { kind: 'uups' });
truffle migrate
Subgraph | Query URL |
---|---|
Lend Subgraph | https://api.thegraph.com/subgraphs/name/shreyas3336/lend |
Subgraph | Query URL |
---|---|
Lend Subgraph | https://api.thegraph.com/subgraphs/name/shreyas3336/lend-bsc |
Subgraph | Query URL |
---|---|
Lend Subgraph | https://api.thegraph.com/subgraphs/name/shreyas3336/lend-matic |
Subgraph | Query URL |
---|---|
Lend Subgraph | https://api.thegraph.com/subgraphs/name/shreyas3336/lend-avax |
The Lend contract is the contract from which the user interacts with. This contract is responsible for lending, repayment and liquidation. For more details see Lend.md
The Master contract is the contract from which the lend contract gets calculated values and conversion according to current market prices. For more details see Master.md
The Oracle contract is the contract from which the master contract fetch current prices for calculation. For more details see Oracle.md
The LendNFT contract is the contract from which the lend contract uses to mint and burn lend NFTs which are essentially a proof of lend.