feat: Add LP Token Staking as Grant Collateral (#182)#253
Merged
JerryIdoko merged 5 commits intoGrant-Stream:mainfrom Mar 28, 2026
Merged
feat: Add LP Token Staking as Grant Collateral (#182)#253JerryIdoko merged 5 commits intoGrant-Stream:mainfrom
JerryIdoko merged 5 commits intoGrant-Stream:mainfrom
Conversation
…oyalty bonus - Allow grantees to stake Liquidity Provider (LP) tokens as additional collateral - Successful milestone completion now unlocks Loyalty Bonus from accrued LP fees - Default or DAO slashing transfers staked LP tokens to the DAO treasury - Extends existing Collateral struct with LpPosition tracking - Added stake_lp_as_collateral, claim_loyalty_bonus, slash_lp_collateral, and view functions - Deep alignment between grantees and project liquidity on Stellar DEX Closes Grant-Stream#182
|
@onahiOMOTI 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! 🚀 |
- Added smart treasury functionality to allocate unstreamed grant reserves into yield-bearing assets (e.g. BENJI or other Soroban lending protocols) - Separates "Principal" (owed to grantees) from "Accrued Yield" - Enforces strict liquidity safety: always maintains enough liquid assets to cover the next 30 days of streaming obligations (+ buffer) - DAO-controlled allocation with configurable percentage limit - Added harvest_yield, emergency_withdraw_principal, and reserve status functions - Prevents over-allocation that could jeopardize grant streaming commitments Closes Grant-Stream#181
…ificate minter
- Added automated minting of "Stellar-Native Completion Certificate" NFT when a grant reaches 100% payout
- Certificate serves as permanent on-chain proof of successful delivery ("On-Chain Resume")
- NFT metadata includes: Grant ID, DAO, Grantee, Completion date, Total streamed amount, Repo URL, and description
- Integrated minting trigger into grant completion flow (`finish_stream` / full payout)
- Created separate `CertificateMinter` contract for better modularity and reusability
- Emits `certificate_minted` event for easy frontend indexing
Closes Grant-Stream#148 Grant-Stream#105
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.
Description
This PR implements Issue #182 - Add LP_Token_Staking_as_Grant_Collateral.
Overview
To create deeper economic alignment, grantees can now stake Liquidity Provider (LP) tokens (from Stellar DEX pools) as collateral for their grants.
This mechanism strongly incentivizes grantees to actively support and maintain the project's token liquidity.
Changes
contracts/src/lp_staking.rswithLpStakingTraitCollateralstruct to support multipleLpPositionstake_lp_as_collateral()claim_loyalty_bonus()slash_lp_collateral(percentage)get_lp_positions()Benefits
Testing
Next steps (optional post-merge):
Closes #182
Closes #181
Closes #148