Repository navigation
Release KZP Mini 0.2.0 - #1
Merged
Merged
Conversation
Keep comparison-only IDE project data out of version control before starting the hardening lifecycle.
Track each hardening case through documentation, test, implementation, verification, and commit so the branch can progress in atomic green slices.
Bound pool names to the PDA seed limit and use checked arithmetic for member counts. Adds validation coverage plus a maximum-length initialization test. Verification: - cargo test -p kzp-mini pool_name_validation - cargo test -p kzp-tests initialize_pool_accepts_max_length_name
Track pending borrower loans on member state so nonce-based loan history cannot bypass the one-unresolved-loan rule. Clear the reservation on cancel or activation, recheck activation eligibility, and block pool exit while a borrower loan is pending. Verification: - NO_DNA=1 anchor build --ignore-keys - cargo test -p kzp-mini operations:: - cargo test -p kzp-tests request_loan - cargo test -p kzp-tests cancel_loan - cargo test -p kzp-tests co_sign_loan_fails_when_guarantor_now_has_active_loan - cargo test -p kzp-tests exit_pool_fails_with_pending_borrower_loan - cargo test -p kzp-tests
Reserve each guarantor's fixed 50/50 liability from their savings before loan disbursement, release it on repayment/default, and block exits while reserved savings remain. Verification: - cargo fmt - NO_DNA=1 anchor build --ignore-keys - cargo test -p kzp-mini operations:: - cargo test -p kzp-tests co_sign_loan - cargo test -p kzp-tests repay_loan_full_nominal - cargo test -p kzp-tests settle_default_nominal - cargo test -p kzp-tests exit_pool_fails_with_active_guarantees - cargo test -p kzp-tests
Store a due timestamp on each loan request and reject admin default settlement before that timestamp. Default settlement now uses the liability reserved at activation and no longer requires fresh guarantor signatures or token transfers. Verification: - cargo fmt - NO_DNA=1 anchor build --ignore-keys - cargo test -p kzp-mini operations:: - cargo test -p kzp-tests settle_default - cargo test -p kzp-tests request_loan - cargo test -p kzp-cli - cargo test -p kzp-tests - git diff --check
Reject pool and loan accounts not owned by this program before the CLI deserializes them. This keeps follow-up account derivation from trusting arbitrary RPC account data. Verification: - cargo fmt - cargo test -p kzp-cli owner_check - cargo test -p kzp-cli - cargo test -p kzp-tests - git diff --check
Add regression coverage for rejecting co-sign withdrawal after activation and for non-nominated members attempting to withdraw a co-sign. Verification: - NO_DNA=1 anchor build --ignore-keys - cargo test -p kzp-tests withdraw_cosign - cargo test -p kzp-tests - git diff --check - user-aikido-mcp scan: issues=[]
Keep Solana crate patch versions coherent so workspace metadata and focused hardening tests resolve cleanly.
Add synthetic-state tests for borrower active-loan drift and underfunded vault activation failure, keeping loan and member state pending on rejection.
Verify odd default liability splits reconcile exactly and drifted borrower state only clears when it still references the settled loan.
Verify exit rejects an underfunded vault before mutating pool counters, member state, or token balances.
Align the workspace with stable host Rust, Anchor 1.1 crates, and Solana 4.x dependencies while documenting the SBF compiler caveat for local tests.
Ensure member accounts consistently prove both owner and pool membership before loan request and default settlement state changes.
Collapse thin handler modules into their matching instruction modules so account constraints and orchestration live together without changing program behavior.
Make guarantee lifecycle changes explicit through narrow transition helpers and replace positional loan request validation with named checks.
Add a shared integration assertion for vault coverage of liquid savings and apply it across representative pool lifecycle flows.
Replace per-member guarantee vectors with compact obligation counts while storing exact locked backing on each loan for release on repay or default.
Use Rust 2024 and unique instruction handler names so dispatch remains clean without ambiguous handler re-exports.
Move single-instruction invariants into their owning handlers so operations exposes only helpers shared across instruction flows.
Load activation and finalization accounts only when co-sign or repayment reaches the terminal path, reducing account locks for partial flows.
Allow any signer to settle due defaults and close terminal loan accounts so repayment and default lifecycles release rent and obligations together.
Update instruction, state, security, CLI, and use-case references for slim account flows, permissionless defaults, and closed terminal loans.
Keep the integration test coverage notes aligned with the due-date crank settlement model.
Update the releasable crates and lockfile metadata for the hardened 0.2 release while leaving the internal test crate unchanged.
Preserve the 0.1 bounty references while documenting the 0.2 upgrade, hardened lifecycle transactions, and demo script changes for reserved guarantor backing.
Align security, state, accounting, CLI, and use-case docs with unresolved-loan limits, slim account flows, and terminal loan closure semantics.
8000
div>
Owner
Author
|
Release review completed after the docs audit pause. Verified before merge:
Ready to merge into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release/0.1.0/v0.1.0and releases the hardened revision asrelease/0.2.0/v0.2.0.0.2.0, keeps the existing program ID, and refreshes README devnet proof with 0.2.0 lifecycle transactions.Verification
bash scripts/ci.shcargo fmt --all -- --checkgit diff --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspacecargo build-sbf --manifest-path programs/kzp-mini/Cargo.toml --sbf-out-dir /home/gmi/Deza/pkzp/target/deploybash scripts/deploy.sh devnetbash scripts/devnet-demo.shRelease refs
release/0.1.0,v0.1.0release/0.2.0,v0.2.0GsjUnBFvYtcxNwCrydPUjQTngGTqdx5v7APnWahnqwkx