Skip to content

Instantly share code, notes, and snippets.

@merlox
Created April 19, 2021 20:39
Show Gist options
  • Save merlox/466dd89edf16c4783580f737b19e99a1 to your computer and use it in GitHub Desktop.
Save merlox/466dd89edf16c4783580f737b19e99a1 to your computer and use it in GitHub Desktop.
Steps to earn money by closing expired or under-collateralized loans.
1. Clone the repository https://github.com/merlox/cdl-loans-expirer by executing this command:
`git clone https://github.com/merlox/cdl-loans-expirer`
2. Install dependencies with `yarn install` or `npm install` note that you must have node.js installed https://nodejs.org/en/
3. Then create a file inside the project folder called `.secret` and paste your mnemonic phrase inside.
This will be used to give you the rewards to your address.
4. To start earing loan defaulting fees, run the script check-expired-loans.mjs with the following command:
`node check-expired-loans.mjs`
As long as the script is running you'll earn fees from closed loans since it checks for defaultable loans every 5 minutes.
Feel free to check the source code of `check-expired-loans.mjs` to understand what it's doing and maybe even improve it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment