For the complete documentation index, see llms.txt. This page is also available as Markdown.

GEB Basics

Examples of querying the GEB contracts

SAFE Engine

Log the current global debt and the global debt ceiling:

>>> geb.safe_engine.global_debt()
Rad(5208615869764014400330809431631271622010234720384)
>>> geb.safe_engine.global_debt_ceiling()
Rad(10200000000000000000000000000000000000000000000000)

Get the total debt available to generate:

>>> str(geb.safe_engine.global_debt_ceiling() - geb.safe_engine.global_debt())
'4991.375324317972058031697987632361257179694960552'

Get a SAFE's status:

>>> from pyflex import Address
>>> collateral_type = geb.collaterals['ETH-A'].collateral_type
>>> safe = geb.safe_engine.safe(collateral_type, Address('0xdD1693BD8E307eCfDbe51D246562fc4109f871f8'))
>>> safe.locked_collateral
Wad(550000000000000000)
>>> safe.generated_debt
Wad(85000000000000000000)

Get updated CollateralType info:

Oracle Relayer

Get the redemption_price and theredemption_rate . Note that fetching the latest redemption price requires you to first update it and then return the value:

Tax Collector

Get the per-second stability fee applied to SAFEs :

Liquidation Engine

Check if a SAFEcan be liquidated:

If the SAFE is underwater, you can also liquidate it:

These are just a few examples. To see all supported functions, view the source code:

Last updated

Was this helpful?