Skip to content

feat: close #826 #827 #828 #829 — cross-chain identity, collateral baskets, boost curves, amortization schedules - #884

Merged
nanaf6203-bit merged 12 commits into
MettaChain:mainfrom
Spycall:main
Jul 29, 2026
Merged

feat: close #826 #827 #828 #829 — cross-chain identity, collateral baskets, boost curves, amortization schedules#884
nanaf6203-bit merged 12 commits into
MettaChain:mainfrom
Spycall:main

Conversation

@Spycall

@Spycall Spycall commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #826,
Closes #827,
Closes #828,
Closes #829

Changes

Issue #826 — Gate property issuance on cross-chain identity verification

  • Added identity_registry storage field + set_identity_registry setter to property-management
  • Added verify_onboarding_cross_chain — XCM-style mock calling ComplianceChecker trait
  • Added register_property message gated on cross-chain attestation
  • Test: register_property_fails_without_identity_registry covers unattested path

Issue #827 — Multi-token collateral baskets

  • Added collateral_basket: Vec<(TokenId, u128)> field to LoanListing
  • Updated create_loan_listing to accept collateral_basket parameter
  • Tests: create_loan_listing_with_collateral_basket, create_loan_listing_with_empty_basket

Issue #828 — Yield boosters for long-term staking

  • Added BoostCurve enum (Linear | Concave | Convex) with apply() method
  • Added sqrt_u128 helper for concave curve
  • Added multiplier_with_curve() + ratio() methods on LockPeriod
  • boost_curve storage field + governance parameter (ParamKind::BoostCurve)
  • Integrated into calculate_rewards and calculate_projected_rewards
  • 13 unit tests covering all curve shapes and edge cases

Issue #829 — Variable amortization schedules

  • Added Schedule enum (Bullet | Annuity | Linear | Custom) with installment() computation
  • Added schedule_type: Schedule field to PaymentSchedule
  • Added create_payment_schedule message + get_payment_schedule_by_loan query
  • Tests: Bullet, Annuity, Linear, Custom schedule types + unauthorized access check

Files Changed

  • contracts/lending/src/lib.rs — Schedule enum, PaymentSchedule integration, multi-token collateral
  • contracts/lending/src/test.rs — 8 new ink! tests for Support multi-token collateral baskets in loan marketplace #827 and Variable amortization schedules in lending #829
  • contracts/property-management/src/lib.rs — Identity registry, cross-chain verification, property registration gate
  • contracts/staking/src/lib.rs — BoostCurve storage, governance, reward calc integration
  • contracts/staking/src/types.rs — BoostCurve enum, multiplier_with_curve, ratio, 13 unit tests

Note: Cargo was unavailable in the dev environment — please run cargo check --workspace && cargo test --workspace before merging to confirm compilation and test pass.

… — cross-chain identity, collateral baskets, boost curves, amortization schedules
@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

Hey @Spycall! 👋 It looks like this PR isn't linked to any issue.

If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g., Closes #123), or by clicking a button below:

Issue Title
#827 Support multi-token collateral baskets in loan marketplace Link to this issue
#826 Gate property issuance on cross-chain identity verification Link to this issue
#828 Add yield boosters for long-term staking Link to this issue
#829 Variable amortization schedules in lending Link to this issue

ℹ️ Learn more about linking PRs to issues

@nanaf6203-bit nanaf6203-bit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nanaf6203-bit
nanaf6203-bit merged commit 0c93eca into MettaChain:main Jul 29, 2026
2 checks passed
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.

2 participants