LagoonSettlementEvent
Documentation for eth_defi.lagoon.analysis.LagoonSettlementEvent Python class.
- class LagoonSettlementEvent[source]
Capture Lagoon vault flow when it is settled.
Use to adjust vault treasury balances for internal accounting
Shows the Lagoon vault status after the settlement at a certain block height
We do not capture individual users
The cycle is - Value vault - Settle deposits (USD in) and redeemds (USDC out, shares in) - Because valuation is done before the settle, you need to be careful what the values reflect here - We pull some values from receipt, some values at the end of the block
Attributes summary
Chain we checked
settleDeposit() transaction by the asset managre
When the settlement was done
When the settlement was done
Vault address
Number of deposit event processed (0..1)
Number of deposit event processed (0..1)
How much new underlying was added to the vault
How much was redeemed successfully
Shares added for new investor
Shares burned for redemptions
Vault latest settled valuation.
Outstanding shares.
Share price in the underlying token, after the settlement
Amount of redemptions we could not settle (USD), because the lack of cash in the previous cycle.
Amount of redemptions we could not settle (share count), because the lack of cash in the previous cycle.
Balance of the underlying token (treasuty/reserve) at the end of the block
Get USDC.
Get USDC.
Methods summary
__init__
(chain_id, tx_hash, block_number, ...)JSON serialisable diagnostics data for logging
How much of treasury we are holding after this update
How much the underlying asset changed in the vault treasury
- tx_hash: hexbytes.main.HexBytes
settleDeposit() transaction by the asset managre
- timestamp: datetime.datetime
When the settlement was done
- vault: eth_defi.lagoon.vault.LagoonVault
Vault address
- deposited: decimal.Decimal
How much new underlying was added to the vault
- redeemed: decimal.Decimal
How much was redeemed successfully
Shares added for new investor
Shares burned for redemptions
- total_assets: decimal.Decimal
Vault latest settled valuation.
This does not include the newly settled deposits, as they were not part of the previous share valuation cycle.
- total_supply: decimal.Decimal
Outstanding shares.
Vault latest issued share count
Share price in the underlying token, after the settlement
- pending_redemptions_underlying: decimal.Decimal
Amount of redemptions we could not settle (USD), because the lack of cash in the previous cycle.
This much of cash needs to be made available for the next settlement cycle.
Amount of redemptions we could not settle (share count), because the lack of cash in the previous cycle.
- underlying_balance: decimal.Decimal
Balance of the underlying token (treasuty/reserve) at the end of the block
- property underlying: eth_defi.token.TokenDetails
Get USDC.
Get USDC.
- get_serialiable_diagnostics_data()[source]
JSON serialisable diagnostics data for logging
- Return type
- get_underlying_diff()[source]
How much the underlying asset changed in the vault treasury
- Return type
- __init__(chain_id, tx_hash, block_number, timestamp, vault, deposit_events, redeem_events, deposited, redeemed, shares_minted, shares_burned, total_assets, total_supply, share_price, pending_redemptions_underlying, pending_redemptions_shares, underlying_balance)
- Parameters
chain_id (int) –
tx_hash (hexbytes.main.HexBytes) –
block_number (int) –
timestamp (datetime.datetime) –
vault (eth_defi.lagoon.vault.LagoonVault) –
deposit_events (int) –
redeem_events (int) –
deposited (decimal.Decimal) –
redeemed (decimal.Decimal) –
shares_minted (decimal.Decimal) –
shares_burned (decimal.Decimal) –
total_assets (decimal.Decimal) –
total_supply (decimal.Decimal) –
share_price (decimal.Decimal) –
pending_redemptions_underlying (decimal.Decimal) –
pending_redemptions_shares (decimal.Decimal) –
underlying_balance (decimal.Decimal) –
- Return type
None