Skip to content

feat: Add Oracle-Verified KPI Vesting Triggers #189

Merged
JerryIdoko merged 1 commit intoVesting-Vault:mainfrom
JojoFlex1:main
Mar 28, 2026
Merged

feat: Add Oracle-Verified KPI Vesting Triggers #189
JerryIdoko merged 1 commit intoVesting-Vault:mainfrom
JojoFlex1:main

Conversation

@JojoFlex1
Copy link
Copy Markdown
Contributor

  • kpi_engine.rs: write-once idempotent KPI flag, oracle config storage, verification log, ComparisonOperator reused from existing oracle.rs
  • kpi_vesting.rs: vault-level gate, attach_kpi_gate, require_kpi_gate_passed
  • kpi_test.rs: 14 tests covering idempotency, gate enforcement, log, config
  • lib.rs: DataKey variants (KpiConfig/KpiMet/KpiLog), module declarations, 5 public contract fns (attach_kpi_gate, verify_kpi_gate, get_kpi_status, get_kpi_threshold, get_kpi_log)

close #145

- kpi_engine.rs: write-once idempotent KPI flag, oracle config storage,
  verification log, ComparisonOperator reused from existing oracle.rs
- kpi_vesting.rs: vault-level gate, attach_kpi_gate, require_kpi_gate_passed
- kpi_test.rs: 14 tests covering idempotency, gate enforcement, log, config
- lib.rs: DataKey variants (KpiConfig/KpiMet/KpiLog), module declarations,
  5 public contract fns (attach_kpi_gate, verify_kpi_gate, get_kpi_status,
  get_kpi_threshold, get_kpi_log)

KPI flag is write-once: once verified true it can never be unset.
Gate is opt-in per vault. No clock dependency - metric-based only.
Pre-existing lib.rs parse errors (duplicate slash_unvested_balance,
unclosed for loop) are unrelated and should be tracked separately.
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 27, 2026

@JojoFlex1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@JerryIdoko JerryIdoko merged commit b85b735 into Vesting-Vault:main Mar 28, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#92. Add Oracle-Verified_KPI_Vesting_Triggers

2 participants