1) Read data from an endpoint with loan states.
2) Compute health ratios using the existing code.
3) Create a table for storing the health ratios with the following structure:
block
timestamp
protocol (protocol name - zkLend, Nostra Mainnet, etc.)
user (wallet id)
health ratio
standardized health ratio
4) Save health ratios to the health ratios table.
5) Create an endpoint for reading health ratios from the health ratios db. Add the following parameters: protocol, user (optional), start block, end block, start datetime, end datetime, standardized health ratio lower bound, standardized health ratio upper bound. Set up rate limits - 10 requests per minute.
1) Read data from an endpoint with loan states. 2) Compute health ratios using the existing code. 3) Create a table for storing the health ratios with the following structure: