# LEH Ops

## Program Upgrade Authority&#x20;

The upgrade authority for the LEH on-chain program is the LEH DAO. That means the program can only be upgraded through a LEH DAO vote.&#x20;

## Group Admin&#x20;

The parameters and operation of the primary LEH group are controlled by the LEH DAO. They can be changed by a LEH DAO vote.&#x20;

## Security Admin and Security Council

The group admin can assign a security admin. The security admin has the following powers:&#x20;

* Disable any LEH instruction. For example, if an exploitable bug is discovered in a part of the code, the security admin can disable the affected instructions.&#x20;
* Bring tokens or markets to reduce-only mode. In reduce-only mode, borrows can be closed and withdraws can be made, but new deposits or new borrows are disabled.&#x20;
* Set init\_asset\_weight to zero for a token or perp market. This action prevents users from making new borrows using the token or perp position as collateral.&#x20;

The security admin is supposed to use its limited powers to quickly restrict group operation in emergencies, where waiting for a full DAO vote would take too long. Examples are an exploitable bug being found in the program or exceptional situations relating to specific tokens or markets. The DAO decides what address shall hold the security admin authority and can revise that decision via vote at any time. Currently, the DAO assigned the security admin role to the security council, a realms 3 of 5 multisig.

## Delisting Process&#x20;

Force closing a token&#x20;

* Move token to reduce only and make init asset weight 0 via a DAO proposal (security admins can also bring tokens to reduce only), Note: use value of 2 and not 1, so that borrows are prevented but deposits are valid, this is required for liquidators who are forced to have token deposits before they can liquidate liabilities in same token.&#x20;
* After some buffer period, make maint asset weight 0 via a DAO proposal. This should force users to deposit alternative collateral if needed.&#x20;
* Move token to force close via a DAO proposal.&#x20;
* Liquidation fee can be optionally considered for change via a DAO proposal.&#x20;
* Anybody can then run the dedicated script force-close-token-borrows.ts to force close any borrows and earn liquidation fee.

Force closing a market&#x20;

* Move token to reduce only and make init asset weight 0 via a DAO proposal (security admins can also bring tokens to reduce only).&#x20;
* After some buffer period, make both init and maint assets weights 0 via a DAO proposal. This should force users to deposit alternative collateral if needed.&#x20;
* Move market to force close via a DAO proposal. Liquidation fee can be optionally considered for change via. DAO proposal.&#x20;
* Anybody can then run the dedicated scripts force-close-serum3-market.ts or force-close-perp-positions.ts to cancel all existing spot and/or perp orders and liquidate open perp positions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://leh.gitbook.io/leh/leh-ops.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
