This project won the 1st Place at the LatAm Algorand Hackathon 2021.
NFT Lending Auction allows the owners of NFTs to obtain collateralized loans. The lenders compete in an auction for best repayment terms. The winning lender gets to provide the loan.
The back end is using only the Algorand blockchain, and as such it does not need a separate installation. For each auction and resulting loan, a new Algorand smart contract is deployed. The contract is deleted by either cancelling the auction, repayment of the loan or liquidation.
The front end can be deployed as static content, prefferrably on IPFS, in order to avoid content modification hacks. Once served, it is running JavaScript code in the browser using React.js and the Algorand JavaScript API. It uses the MyAlgo Connect Wallet in order to sign the transactions.
Documentation in ENGLISH and ESPAÑOL
Before installing, node.js, npm, pytohon3 and pip3 have should be installed.
-
Clone this repository
-
Run the following command there (tested using bash): $ source ./install.sh
-
In the python environment just created, run:
$ ./compile.sh
-
Install the front end: For testing:
$ cd webapp $ npm install $ npm startFor production (it only uses Algorand testnet)
$ cd webapp $ npm install $ npm run build Then copy and pin the contents of the webapp/build directory to IPFS.
Create test NFTs by running the bash scripts in the test folder:
$ ./test/createHouseNFT.sh
-
Install sandbox: https://github.com/algorand/sandbox
-
Sandbox installation bug workaround: algorand/sandbox#85
-
Install Visual Studio Code extension: algorand
-
Install Algorand JavaScript SDK: https://github.com/algorand/js-algorand-sdk
-
Install Algorand Python SDK: https://github.com/algorand/py-algorand-sdk
-
Install PyTeal: https://github.com/algorand/pyteal
-
Install pipenv: sudo apt install python3 python3-pip python-is-python3 pipenv
- PyTeal: https://developer.algorand.org/docs/get-started/dapps/pyteal/
- Sample PyTeal DApp: https://github.com/algorand/auction-demo