> For the complete documentation index, see [llms.txt](https://docs.reflexer.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reflexer.finance/geb-js/api-reference/safe.md).

# Safe

This object represents a GEB safe. It has the entire SAFE state and provides helper functions to calculate its liquidation price, collateralization ratio etc.

## Constructors

\+ **new Safe**(`contracts`: ContractApis, `handler`: string, `debt`: BigNumber, `collateral`: BigNumber, `collateralType`: string, `isManaged`: boolean, `safeId?`: number): [*Safe*](/geb-js/api-reference/safe.md)

*Defined in* [*packages/geb/src/schema/safe.ts:8*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L8)

**Parameters:**

| Name             | Type         |
| ---------------- | ------------ |
| `contracts`      | ContractApis |
| `handler`        | string       |
| `debt`           | BigNumber    |
| `collateral`     | BigNumber    |
| `collateralType` | string       |
| `isManaged`      | boolean      |
| `safeId?`        | number       |

**Returns:** [*Safe*](/geb-js/api-reference/safe.md)

## Properties

### collateral

• **collateral**: *BigNumber*

*Defined in* [*packages/geb/src/schema/safe.ts:23*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L23)

Amount of collateral locked in the SAFE (WAD)

### collateralType

• **collateralType**: *string*

*Defined in* [*packages/geb/src/schema/safe.ts:27*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L27)

SAFE collateral type

### debt

• **debt**: *BigNumber*

*Defined in* [*packages/geb/src/schema/safe.ts:19*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L19)

Amount of debt generated by the SAFE (WAD)

### handler

• **handler**: *string*

*Defined in* [*packages/geb/src/schema/safe.ts:15*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L15)

SAFE handler in the SAFE Engine

### isManaged

• **isManaged**: *boolean*

*Defined in* [*packages/geb/src/schema/safe.ts:31*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L31)

Whether the safe was opened using a SAFE manager

### `Optional` safeId

• **safeId**? : *number*

*Defined in* [*packages/geb/src/schema/safe.ts:35*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L35)

Safe incremental ID, only for managed safes

## Methods

### getCRatio

▸ **getCRatio**(): *Promise‹FixedNumber | null›*

*Defined in* [*packages/geb/src/schema/safe.ts:42*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L42)

Ratio used to calculate the amount of debt that can be drawn. Returns null is ratio is +Infinity. !! Uses unsafe division that can lead to precision loss.

**Returns:** *Promise‹FixedNumber | null›*

Promise CRatio

### liquidationPrice

▸ **liquidationPrice**(): *Promise‹FixedNumber | null›*

*Defined in* [*packages/geb/src/schema/safe.ts:70*](https://github.com/reflexer-labs/geb.js/blob/30c41df/packages/geb/src/schema/safe.ts#L70)

Price at which the SAFE will get liquidated.

**Returns:** *Promise‹FixedNumber | null›*

&#x20;Liquidation price


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.reflexer.finance/geb-js/api-reference/safe.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
