# Wildcat

The Wildcat Protocol is a hands-off credit facilitation protocol that enables the deployment of markets by pre-authorised (KYC’d through protocol) borrowers. Market parameters are arbitrarily parameterisable subject to these parameters falling within the bounds of controllers registered with the protocol registry. Borrowers must - at present - select their own lender lists explicitly.

### Collateral Deposit

<table><thead><tr><th width="300">Invariants</th><th width="60" align="center">O/X</th><th>Description</th></tr></thead><tbody><tr><td>Collateral deposits must not be allowed when the protocol is in a paused state.</td><td align="center">X</td><td>The protocol is designed with complete decentralization in mind, so a pause feature has not been implemented.</td></tr><tr><td>The block state of the market where collateral is deposited must be updated to the latest status.</td><td align="center">O</td><td>-</td></tr></tbody></table>

### Collateral Withdraw

<table><thead><tr><th width="300">Invariants</th><th width="60" align="center">O/X</th><th>Description</th></tr></thead><tbody><tr><td>Users can withdraw collateral only within the limits that do not exceed the set Loan-to-Value (LTV) ratio.</td><td align="center">O</td><td>-</td></tr><tr><td>The block state of the market where collateral is withdrawn must be updated to the latest status.</td><td align="center">O</td><td>-</td></tr></tbody></table>

### Borrow

<table><thead><tr><th width="300">Invariants</th><th width="60" align="center">O/X</th><th>Description</th></tr></thead><tbody><tr><td>Loans must not be allowed when the protocol is in a paused state.</td><td align="center">X</td><td>The protocol is designed with complete decentralization in mind, so a pause feature has not been implemented.</td></tr><tr><td>The borrower must be registered in the relevant market.</td><td align="center">O</td><td>-</td></tr><tr><td>After executing the loan, the market's total borrow amount must not exceed the set borrow cap.</td><td align="center">O</td><td>-</td></tr><tr><td>Borrowers cannot exceed the Loan-to-Value (LTV) ratio relative to their collateral.</td><td align="center">-</td><td>Since it is a credit-based loan, there is no concept of Loan-to-Value (LTV).</td></tr><tr><td>Before executing a loan, the target market's block state must be updated to the latest status.</td><td align="center">O</td><td>-</td></tr></tbody></table>

### Repay

<table><thead><tr><th width="300">Invariants</th><th width="60" align="center">O/X</th><th>Description</th></tr></thead><tbody><tr><td>The block state of the repayment market must be updated to the latest status.</td><td align="center">O</td><td>-</td></tr><tr><td>Repaying more than the borrowed amount is not allowed.</td><td align="center">O</td><td>When closing the market, any excess amount is refunded.</td></tr></tbody></table>

### Liquidation

<table><thead><tr><th width="300">Invariants</th><th width="60" align="center">O/X</th><th>Description</th></tr></thead><tbody><tr><td>The liquidator can only liquidate borrowers whose Loan-to-Value (LTV) ratio exceeds the limit, resulting in a liquidity shortfall.</td><td align="center">-</td><td>Since loans are issued based on credit, there is no liquidation.</td></tr><tr><td>The liquidator's repayment amount must not exceed the close factor relative to the borrower's total borrow amount.</td><td align="center">-</td><td>Since loans are issued based on credit, there is no liquidation.</td></tr><tr><td>Both the market for the borrowed asset and the collateral asset must be updated with the latest block information.</td><td align="center">-</td><td>Since loans are issued based on credit, there is no liquidation.</td></tr><tr><td>The liquidator and the borrower cannot be the same account.</td><td align="center">-</td><td>Since loans are issued based on credit, there is no liquidation.</td></tr><tr><td>The amount of collateral the liquidator receives cannot exceed the total collateral balance of the borrower.</td><td align="center">-</td><td>Since loans are issued based on credit, there is no liquidation.</td></tr><tr><td>The collateral and borrowed assets involved in the liquidation must be under the same administrative entity.</td><td align="center">-</td><td>Since loans are issued based on credit, there is no liquidation.</td></tr></tbody></table>

### Interest and Reward

<table><thead><tr><th width="300">Invariants</th><th width="60" align="center">O/X</th><th>Description</th></tr></thead><tbody><tr><td>The borrow interest rate must not exceed the set maximum value.</td><td align="center">O</td><td>-</td></tr><tr><td>During interest calculation, related state variables like total reserves, total borrows, and market indices must be updated to their latest statuses.</td><td align="center">O</td><td>-</td></tr><tr><td>For fixed-point arithmetic, steps should be taken to prevent rounding issues in low decimal places, such as using correct operation order or a fixed-point library.</td><td align="center">O</td><td>-</td></tr></tbody></table>

### Oracle

<table><thead><tr><th width="300">Invariants</th><th width="60" align="center">O/X</th><th>Description</th></tr></thead><tbody><tr><td>The price of the underlying asset retrieved from the oracle must not be zero; if the price is zero, the transaction should be halted.</td><td align="center">-</td><td>The concept of the oracle is different.</td></tr><tr><td>The interest calculation must reflect the most up-to-date state.</td><td align="center">-</td><td>The concept of the oracle is different.</td></tr></tbody></table>

***
