Safe
Last updated
Was this helpful?
Last updated
Was this helpful?
This object represents a GEB safe. It has the entire SAFE state and provides helper functions to calculate its liquidation price, collateralization ratio etc.
+ new Safe(contracts
: ContractApis, handler
: string, debt
: BigNumber, collateral
: BigNumber, collateralType
: string, isManaged
: boolean, safeId?
: number):
Defined in
Parameters:
Name
Type
contracts
ContractApis
handler
string
debt
BigNumber
collateral
BigNumber
collateralType
string
isManaged
boolean
safeId?
number
Returns:
• collateral: BigNumber
Amount of collateral locked in the SAFE (WAD)
• collateralType: string
SAFE collateral type
• debt: BigNumber
Amount of debt generated by the SAFE (WAD)
• handler: string
SAFE handler in the SAFE Engine
• isManaged: boolean
Whether the safe was opened using a SAFE manager
Optional
safeId• safeId? : number
Safe incremental ID, only for managed safes
▸ getCRatio(): Promise‹FixedNumber | null›
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(): Promise‹FixedNumber | null›
Price at which the SAFE will get liquidated.
Returns: Promise‹FixedNumber | null›
Liquidation price
Defined in
Defined in
Defined in
Defined in
Defined in
Defined in
Defined in
Defined in