Skip to main content
Schema: canton.core Table: ez_amulet_lock_lifecycle Type: View

What

Description

Comprehensive EZ view showing the complete lifecycle of locked amulets from initial lock through unlock or expiration. Joins lock and unlock events to provide a full picture of staking activity including durations, status, and outcomes.

Key Use Cases

  • Analyzing complete amulet locking/staking patterns
  • Calculating average lock durations
  • Identifying locks that expired vs were actively unlocked
  • Tracking which locks were unlocked after expiry
  • Understanding staking behavior and timing
  • Monitoring currently active locks

Important Relationships

  • Combines core__fact_amulet_locks and core__fact_amulet_unlocks via locked_amulet_contract_id
  • Links to validators and staking through amulet_owner and lock_holders

Commonly-used Fields

  • locked_amulet_contract_id: Unique identifier for the locked amulet
  • amulet_owner: Party who owns the locked amulet
  • lock_status: Current status (locked, unlocked, or expired)
  • locked_at: When the lock was created
  • unlocked_at: When it was unlocked (NULL if still locked)
  • locked_amount: Amount locked
  • days_locked_before_unlock: Duration for completed locks
  • days_locked_current: Duration for active locks
  • was_unlocked_after_expiry: Whether unlock happened after expiration time

Columns

Column NameData TypeDescription
LOCKED_AMULET_CONTRACT_IDTEXTLOCKED_AMULET_CONTRACT_ID column
AMULET_OWNERTEXTAMULET_OWNER column
LOCK_HOLDERSVARIANTLOCK_HOLDERS column
LOCKED_ATTIMESTAMP_NTZLOCKED_AT column
LOCK_EXPIRES_ATTIMESTAMP_NTZLOCK_EXPIRES_AT column
UNLOCKED_ATTIMESTAMP_NTZUNLOCKED_AT column
LOCKED_AMOUNTNUMBERLOCKED_AMOUNT column
UNLOCKED_AMOUNTNUMBERUNLOCKED_AMOUNT column
AMOUNT_CREATED_AT_ROUNDNUMBERAMOUNT_CREATED_AT_ROUND column
RATE_PER_ROUNDNUMBERRATE_PER_ROUND column
UNLOCK_ACTIONTEXTUNLOCK_ACTION column
UNLOCK_REASONTEXTUNLOCK_REASON column
TX_KINDTEXTTX_KIND column
UNLOCK_AMULET_PRICENUMBERUNLOCK_AMULET_PRICE column
UNLOCK_ROUND_NUMBERNUMBERUNLOCK_ROUND_NUMBER column
CREATED_AMULET_CONTRACT_IDTEXTCREATED_AMULET_CONTRACT_ID column
LOCK_EVENT_IDTEXTLOCK_EVENT_ID column
UNLOCK_EVENT_IDTEXTUNLOCK_EVENT_ID column
LOCK_STATUSTEXTLOCK_STATUS column
DAYS_LOCKED_BEFORE_UNLOCKNUMBERDAYS_LOCKED_BEFORE_UNLOCK column
DAYS_LOCKED_CURRENTNUMBERDAYS_LOCKED_CURRENT column
WAS_UNLOCKED_AFTER_EXPIRYBOOLEANWAS_UNLOCKED_AFTER_EXPIRY column
MOST_RECENT_ACTIVITYTIMESTAMP_NTZMOST_RECENT_ACTIVITY column
CREATED_ATTIMESTAMP_NTZCREATED_AT column
SIGNATORIESVARIANTSIGNATORIES column
OBSERVERSVARIANTOBSERVERS column
EZ_AMULET_LOCK_LIFECYCLE_IDTEXTEZ_AMULET_LOCK_LIFECYCLE_ID column
INSERTED_TIMESTAMPTIMESTAMP_NTZINSERTED_TIMESTAMP column
MODIFIED_TIMESTAMPTIMESTAMP_NTZMODIFIED_TIMESTAMP column