Kylix-Finance / kylix-finance-substrate

Kylix Finance is a substrate lending app that connects borrowers and lenders, enabling them to supply and borrow assets across the Polkadot chain.
MIT No Attribution
4 stars 0 forks source link

Clarification on Collateral Calculation and Borrow Eligibility #66

Open kylixfinance opened 1 week ago

kylixfinance commented 1 week ago

The current system requires the frontend to calculate the necessary collateral for a loan, which is not optimal. The backend should be responsible for determining if the user has deposited sufficient collateral and is eligible to borrow a certain amount. The frontend's role should be limited to attempting the loan transaction, with the backend providing a simple approval or rejection response.

Additionally, for the repayment process, the user should repay a specified amount of the loan's underlying asset. Subsequently, the backend should automatically release the proportionate amount of the user's frozen collateral based on the repayment value.

This ticket aims to discuss and implement the necessary changes to streamline the borrowing and repayment process, ensuring that responsibilities are correctly assigned to the frontend and backend systems.

Related story #60