In recent years, the decentralized finance (DeFi) sector has witnessed exponential growth, fundamentally altering financial transactions through the innovative application of blockchain technology, which facilitates decentralized operations such as borrowing, lending, and trading on autonomous protocols. Our study seeks to deepen the understanding of lending protocols, a cornerstone in the DeFi ecosystem, by unraveling their complexities and identifying potential risks, alongside proposing mitigation strategies. We introduce a method to obtain and manage on-chain data from decentralized lending protocols, enhancing the transparency and facilitating intuitive data analysis for users. Furthermore, we propose two novel metrics to calculate the leverage of lending protocols, aiming to equip users with critical insights for informed decision-making, thereby fostering a safer and more efficient DeFi ecosystem.