# Terminology

#### **Archcontroller**

* Smart contract which doubles up as a registry and permission gate. [Borrowers](#borrower) are added or removed from the archcontroller by the operators of the protocol itself (granting/rescinding the ability to deploy [hooks](#hook) and/or [markets](#market)), and the addresses of any factories, hooks instances or markets that get deployed through the protocol are stored here.

#### **Base APR**

* The interest rate that lenders receive on [assets](#underlying-asset) that they have deposited into a particular [market](#market), in the absence of the [penalty APR](#penalty-apr) being enforced.

#### **Borrow**

* To withdraw [assets](#underlying-asset) from a [market](#market) that has a non-zero [supply](#supply) and [reserve ratio](#reserve-ratio) less than 100%, with the intent of repaying the assets (plus any accrued interest) to the market either when the required purpose of using the assets has concluded or as a response to [withdrawal requests](#withdrawal-request).

#### **Borrower**

* Both:
  * The counterparty that wishes to make use of a credit facility through a Wildcat [market](#market), and
  * The blockchain address that defines the parameters of a market and deploys the [hook instances](#hooks-instance) and market contracts that use them.

#### **Capacity**

* Parameter required of [borrower](#borrower) when creating a new [market](#market).
* The `maxTotalSupply` field in the state.
* The *maximum* amount of an asset that a borrower is looking to source via a market - the threshold for `totalSupply` after which the market will stop accepting [deposits](#deposit).
* Can be exceeded by the market's `totalSupply` due to interest accrual.

#### **Claim**

* Removing [assets](#underlying-asset) from the [unclaimed withdrawals pool](#unclaimed-withdrawals-pool) that were requested for withdrawal by a [lender](#lender).
* Can only occur after a [withdrawal cycle](#withdrawal-cycle) expires.
* Note that retrieving your [deposits](#deposit) from a Wildcat market requires a [withdrawal request](#withdrawal-request) and *then* a claim - it is a two transaction process with the conclusion of one withdrawal cycle in between.

#### Collateral Obligation

* The minimum amount of [assets](#underlying-asset) that the borrower is obligated to keep in the market in order to avoid [delinquency](#delinquency).
* The sum of:
  * The [reserves](#required-reserves) needed to meet the [reserve ratio](#reserve-ratio) for the [outstanding supply](#outstanding-supply),
  * The market's [unclaimed withdrawals pool](#unclaimed-withdrawals-pool),
  * The normalized value of the market's [pending](#pending-withdrawal) and [expired](#expired-withdrawal) withdrawals, and
  * The unclaimed [protocol fees](#protocol-apr).

#### **Delinquency**

* A [market](#market) state wherein there are insufficient [assets](#underlying-asset) in the market to meet the market's [collateral obligations](#collateral-obligation).
* Arises via the passage of time through interest if the borrower borrows right up to their reserve ratio.
* Can also arise if a [lender](#lender) makes a [withdrawal request](#withdrawal-request) that exceeds the market's available liquidity.
* A market being delinquent for an extended period of time (as specified by the [grace period](#grace-period)) results in the [penalty APR](#penalty-apr) being enforced in addition to the [base APR](#base-apr) and any [protocol APR](#protocol-apr) that may apply.
* 'Cured' by the borrower [depositing](#deposit) sufficient assets into the market as to reattain the required collateral obligation.

#### **Deposit**

* Both:
  * The act of sending [assets](#underlying-asset) as a [lender](#lender) to a [market](#market) for the purposes of being [borrowed](#borrow) by the [borrower](#borrower),
  * The act of sending assets as a borrower to a market for the purposes of being [withdrawn](#withdrawal-request) by lenders,
  * A term for the lenders' assets themselves once in a market.

#### Deposit Credential

* Permission granted to a [lender](#lender) through a [role provider](#role-provider) in order to [deposit](#deposit) into a [market](#market).
* The set of requirements for receiving a deposit credential from a given role provider are arbitrary, determined by the [borrower](#borrower) according to their needs.
* May be associated with a TTL (Time-To-Live) configured by the borrower, after which the deposit credential expires and a new one must be acquired from a role provider in order to make any further deposits.
* Depositing into a market while holding a valid deposit credential (or receiving [market tokens](#market-token) while in possession of one) marks lender as a [known lender](#known-lender).

#### **Escrow Contract**

* An auxiliary smart contract that is deployed in the event that the [sentinel](#sentinel) detects that a [lender](#lender) address has been added to a sanctioned list such as the OFAC SDN: this check is performed through the [**Chainalysis oracle**](https://go.chainalysis.com/chainalysis-oracle-docs.html).
* Used to transfer the debt (for the [lender](#lender)) and obligation to repay (for the [borrower](#borrower)) away from the [market](#market) contract to avoid wider contamination through interaction. Interest ceases to accrue upon creation and transfer.
* Any [assets](#underlying-asset) relating to an attempted claim by the affected lender as well as any market tokens tied to their remaining [deposit](#deposit) are automatically transferred to the escrow contract when blocked (either through an attempt to withdraw or via a call to a 'nuke from orbit' function found within the market).
* Assets can only be released to the lender in the event that a) they are no longer tagged as sanctioned by the Chainalysis oracle, or b) the borrower specifically overrides the sanction.

#### Expired Withdrawal

* A [withdrawal request](#withdrawal-request) that could not be fully honoured by [assets](#underlying-asset) in the [unclaimed withdrawals pool](#unclaimed-withdrawals-pool) within a single [withdrawal cycle](#withdrawal-cycle).

#### Fixed Term

* Parameter configured by a [borrower](#borrower) when creating a new [market](#market).
* Determines the length of time after market deployment in which [withdrawal requests](#withdrawal-request) and reductions in [base APR](#base-apr) will be rejected by the market.
* After this time has elapsed, the market converts into an '*open term*' market where the above are permitted. Once a market has converted to open term, it cannot be moved back into a fixed term.
* Default value is zero (immediately open term).
* Associated with two distinct market configuration flags that allow a borrower to either prematurely close a market or bring the maturity/conversion time closer to the present.
* Cannot be extended once a market is deployed.

#### **Force Buyback**

* Permission toggled by a [borrower](#borrower) when creating a new [market](#market).
* If enabled, permits the borrower to purchase [market tokens](#market-token) directly from a [lender](#lender), subverting the market by swapping the market tokens for an equivalent amount of [underlying assets](#underlying-asset) sourced from the borrower.
* Cannot be used if a market is [delinquent](#delinquency) or currently in a [fixed term](#fixed-term) state.
* If performed for the first time on a market, marks the borrower as a [known lender](#known-lender).
* Immediately forces the market tokens into a [withdrawal request](#withdrawal-request) on behalf of the borrower.
* Can be permanently disabled for a market at the borrower's discretion.
* **Note**: if a market has both force buyback enabled *and* open [token transferability](#token-transferability), a borrower is capable of force rebuying market tokens from LP contracts that hold market tokens such as Uniswap or Curve pools. Despite there being a warranty in the (optional) template Master Loan Agreement related to this point, the potential for substantial damage exists here.

#### **Grace Period**

* Parameter required of [borrower](#borrower) when creating a new [market](#market).
* Rolling period of time for which a market can be [delinquent](#delinquency) before the [penalty APR](#penalty-apr) of the market activates.
* Note that the grace period does not 'reset' to zero when delinquency is cured. See [grace tracker](#grace-tracker) below for details.

#### **Grace Tracker**

* Internal [market](#market) parameter associated with the [grace period](#grace-period).
* `timeDelinquent` in the market state.
* Once a market becomes [delinquent](#delinquency), begins counting seconds up from zero - when the value of the grace tracker exceeds the grace period, the [penalty APR](#penalty-apr) activates.
* Once a market is cured of delinquency, begins counting seconds down to zero - the penalty APR continues to apply *until the grace tracker value is below the grace period value*.
* Enforces the rolling nature of the grace period.

#### **Hook**

* A function on a [hook instance](#hook-instance) which is executed when a particular action occurs on a [market](#market).
* Corresponds to a specific market action, such as the `onCloseMarket` hook which is called when `closeMarket` is called on a market during termination.

#### **Hook Instance**

* Contract that defines the [hook functions](#hook) for a market.
* Deployed by an approved borrower as an instance of a particular [hooks template](#hooks-template).
* Configured in the market parameters at market deployment.

#### **Hooks Template**

* A base contract defining behaviour for a kind of [hook contract](#hook-instance) approved by factory operators.
* Copied when borrowers deploy hook instances.

#### **Known Lender**

* A state marked within the [market](#market) contracts for any [lender](#lender) that either [deposited](#deposit) [assets](#underlying-asset) into a market or received [market tokens](#market-token) while holding a valid [deposit credential](#deposit-credential).
* Any known lender is always capable of making a [withdrawal request](#withdrawal-request) unless i) the market is in a [fixed term](#fixed-term) or ii) the known lender is marked as sanctioned by the [sentinel](#sentinel).

#### **Lender**

* Both:
  * A counterparty that wishes to provide a credit facility through a Wildcat [market](#market), and
  * The blockchain address associated with that counterparty which [deposits](#deposit) [assets](#underlying-asset) to a market for the purposes of being [borrowed](#borrow) by the [borrower](#borrower).

#### Liquid Reserves

* The amount of [underlying assets](#underlying-asset) currently counting towards the [market](#market)'s [required reserves](#required-reserves).
* Comprises the liquidity that can be made available for new [withdrawals](#withdrawal-request).
* Is equal to the total assets in the market minus the [unclaimed withdrawals](#unclaimed-withdrawals-pool), [pending withdrawals](#pending-withdrawal), [expired withdrawals](#expired-withdrawal) and accrued [protocol fees](#protocol-apr).

#### **Market**

* Smart contract that accepts [underlying assets](#underlying-asset), issuing [market tokens](#market-token) in return.
* Deployed by [borrower](#borrower) through the factory.
* Holds assets in escrow pending either being [borrowed](#borrow) by the borrower or [withdrawn](#withdrawal-request) by a [lender](#lender).
* Permissioned: only lenders that have been obtained a credential authorising them to deposit (either through explicit whitelisting or another access provider via hooks) can interact.

#### **Market Token**

* ERC-20 token indicating a [claim](#claim) on the [underlying assets](#underlying-asset) in a [market](#market).
* Issued to [lenders](#lender) after a [deposit](#deposit).
* [Supply](#supply) rebases after every non-static call to the market contract depending on the total current APR of the market.
* Can only be redeemed by authorised lender addresses (not necessarily the same one that received the market tokens initially).
* Name and symbol prefixes are customisable in market creation, prepending to the name and symbol of the underlying asset.

#### Minimum Deposit

* Parameter required of [borrower](#borrower) when creating a new [market](#market).
* Determines the amount of [assets](#underlying-asset) below which any attempts by a [lender](#lender) to [deposit](#deposit) in a single transaction will be rejected.
* Defaults to zero, can be configured after launch by the borrower.

#### Outstanding Supply

* The amount of [market tokens](#market-token) not currently queued for [withdrawal](#withdrawal-request).
* Equal to the market's [supply](#supply) minus its [pending](#pending-withdrawal) and [expired](#expired-withdrawal) withdrawals.

#### **Penalty APR**

* Parameter required of [borrower](#borrower) when creating a new [market](#market).
* Additional interest rate (above and beyond the [base APR](#base-apr) and any [protocol APR](#protocol-apr)) that is applied for as long as the [grace tracker](#grace-tracker) value for a market is in excess of the specified [grace period](#grace-period).
* Encourages borrower to responsibly monitor the [reserve ratio](#reserve-ratio) of a market.
* No part of the penalty APR is receivable by the Wildcat protocol itself (does not inflate the protocol APR if present).

#### Pending (State)

* An alias for [delinquency](#delinquency) that is used on the frontend while a [market](#market) has insufficient [reserves](#required-reserves).
* It was observed that several lenders expressed concern about the loaded meaning of the word 'delinquent' (which is purely technical within the protocol itself).
* As a result, 'Pending' is used on the frontend to emphasise that this state does not *necessarily* imply a failure on the part of the borrower: typically delinquency is fallen into as soon as a large withdrawal request is made, and remains until repayments are made.
* A market that is pending/delinquent for longer than the specified grace period subsequently enters the Penalty state, where the [Penalty APR](#penalty-apr) applies.

#### **Pending Withdrawal**

* A [withdrawal request](#withdrawal-request) that has not yet [expired](#expired-withdrawal) (i.e. was created in the current [withdrawal cycle](https://docs.wildcat.finance/miscellaneous/deprecated-documentation/component-overview/wildcat-market-overview/wildcatmarketwithdrawals.sol#processunpaidwithdrawalbatch)).

#### Policy

* Another term for a [hook instance](#hook-instance).

#### Protocol APR

* Percentage of [base APR](#base-apr) that accrues to the Wildcat protocol itself.
* Parameter configured by the factory operator for each [hooks template](#hooks-template), applying to all [markets](#market) deployed with an instance of said template.
* Can be zero.
* Does not increase in the presence of an active [penalty APR](#penalty-apr) (which only increases the APR accruing to [lenders](#lender)).
* Example: market with base APR of 10% and protocol APR of 20% results in borrower paying 12% when penalty APR is not active.

#### Required Reserves

* Amount of [underlying assets](#underlying-asset) that must be made available for new withdrawals according to the configured [reserve ratio](#reserve-ratio).
* Equal to the reserve ratio times the [outstanding supply](#outstanding-supply).

#### **Reserve Ratio**

* Parameter required of [borrower](#borrower) when creating a new [market](#market).
* Percentage of current [outstanding supply](#outstanding-supply) that must be kept in the market (but still accrue interest).
* Intended to provide a liquid buffer for [lenders](#lender) to make [withdrawal requests](#withdrawal-request) against, partially 'collateralising' the credit facility through lenders' deposits.
* Increases temporarily when a borrower reduces the [base APR](#base-apr) of a [market](#market) (fixed-term increase).
* A market which has insufficient assets in the market to meet the reserve ratio is said to be [delinquent](#delinquency), with the [penalty APR](#penalty-apr) potentially being enforced if the delinquency is not cured before the [grace tracker](#grace-tracker) value exceeds that of the [grace period](#grace-period) for that particular market.

#### Role Provider

* A smart contract registered to an access [hook instance](#hook-instance) for a [market](#market) which grants [deposit credentials](#deposit-credential) to would-be [lenders](#lender) according to a specific set of requirements (i.e. lender has a Coinbase Verification, and/or lender is not marked as sanctioned by the Chainalysis oracle).
* Two variants: 'pull' providers which are contracts that can be queried by wallet address to determine suitability, or 'push' providers that explicitly tell the market *which* addresses are suitable.
* Deployed by the [borrower](#borrower) (either from a template or constructed themselves).
* Can be arbitrarily added and removed to a market after deployment by the borrower.
* **Note:** the removal of all role providers from a hook instance for a market means that no more deposit credentials can be granted. However, all [known lenders](#known-lender) will always be able to make [withdrawal requests](#withdrawal-request) provided the market is not in a [fixed term](#fixed-term) and they are not sanctioned.

#### **Sentinel**

* Smart contract that ensures that addresses which interact with the protocol are not flagged by the [**Chainalysis oracle**](https://go.chainalysis.com/chainalysis-oracle-docs.html) for sanctions.
* Can deploy escrow contracts to excise a [lender](#lender) flagged by the oracle from a wider [market](#market).
* Facilitates the deployment of [escrow contracts](#escrow-contract).

#### **Supply**

* Current amount of [underlying asset](#underlying-asset) [deposited](#deposit) in a [market](#market).
* Tied 1:1 with the supply of [market tokens](#market-token) (rate of growth APR dependent).
* Can only be reduced by burning market tokens as part of a [withdrawal request](#withdrawal-request) or [claim](#claim).
* [Reserve ratios](#reserve-ratio) are enforced against the supply of a market, *not* its [capacity](#capacity).
* Capacity can be reduced below current supply by a [borrower](#borrower), but this only prevents the further deposit of assets until the supply is once again below capacity.

#### Token Transferability

* Parameter required of [borrower](#borrower) when creating a new [market](#market).
* Determines whether [market tokens](#market-token) can be transferred from their holders to arbitrary wallets.
* Three configurations options (default is Open):
  * **Open**: market tokens can be transferred anywhere at any time.
  * **Restricted**: market tokens can only be transferred to either [known lenders](#known-lender) or addresses holding a valid (unexpired) [deposit credential](#deposit-credential).
  * **Disabled**: market tokens can only be sent back to the market as part of a [withdrawal request](#withdrawal-request).

#### **Unclaimed Withdrawals Pool**

* A sequestered pool of [underlying assets](#underlying-asset) which are pending their [claim](#claim) by [lenders](#lender) following a [withdrawal request](#withdrawal-request).
* Assets are moved from market reserves to the unclaimed withdrawals pool by burning [market tokens](#market-token) at a 1:1 ratio (reducing the [supply](#supply) of the market).
* Assets within the unclaimed withdrawals pool do not accrue interest, but similarly cannot be [borrowed](#borrow) by the [borrower](#borrower) - they are considered out of reach.

#### **Underlying Asset**

* Parameter required of [borrower](https://docs.wildcat.finance/onboarding#borrowers) when creating a new [market](#market).
* The asset which the borrower is seeking to [borrow](#borrow) by deploying a market - for example DAI (Dai Stablecoin) or WETH (Wrapped Ether).
* Can be *any* ERC-20 token (however, rebasing tokens break the underlying interest model).

#### **Withdrawal Cycle**

* Parameter required of [borrower](#borrower) when creating a new [market](#market).
* Period of time that must elapse between the first [withdrawal request](#withdrawal-request) of a 'wave' of withdrawals and [assets](#underlying-asset) in the [unclaimed withdrawals pool](#unclaimed-withdrawals-pool) being made available to [claim](#claim).
* Withdrawal cycles do not work on a rolling basis - at the end of one withdrawal cycle, the next cycle will not start until the next withdrawal request.
* In the event that the amount being claimed in the same cycle across all lenders is in excess of the reserves currently within a market, all [lenders](#lender) requests within that cycle will be honoured *pro rata* depending on overall amount requested.
* Intended to prevent a run on a given market (mass withdrawal requests) leading to slower lenders receiving nothing.
* Can have a value of zero, in which case each withdrawal request is processed - and potentially added to the [withdrawal queue](#withdrawal-queue) - as a standalone batch.

#### **Withdrawal Queue**

* Internal data structure of a [market](#market).
* All [withdrawal requests](#withdrawal-request) that could not be fully honoured at the end of their [withdrawal cycle](#withdrawal-cycle) are batched together, marked as [expired](#expired-withdrawal) and added to the withdrawal queue.
* Tracks the order and amounts of [lender](#lender) [claims](#claim).
* FIFO (First-In-First-Out): when [assets](https://docs.wildcat.finance/using-wildcat/day-to-day-usage/lenders) are returned to a market which has a non-zero withdrawal queue, assets are immediately routed to the [unclaimed withdrawals pool](#unclaimed-withdrawals-pool) and can subsequently be claimed by lenders with the oldest expired withdrawals first.

#### Withdrawal Request

* An instruction to a [market](#market) to transfer reserves within a market to the [unclaimed withdrawals pool](#unclaimed-withdrawals-pool), to be [claimed](#claim) at the end of a [withdrawal cycle](#withdrawal-cycle).
* A withdrawal request made of a market with non-zero reserves will burn as many [market tokens](#market-token) as possible 1:1 to fully honour the request.
* Any amount requested - whether or not it is in excess of the market reserves - is marked as a [pending withdrawal](#pending-withdrawal), either to be fully honoured at the end of the cycle, or marked as [expired](#expired-withdrawal) and added to the [withdrawal queue](#withdrawal-queue), depending on the actions of the [borrower](#borrower) during the cycle.
