Repository navigation
feat: pool_fail event, factory analytics, lock bonus in calculate_credits, compound function - #750
Merged
ritaifeoluwa merged 2 commits intoNov 23, 2026
Conversation
…culate_credits, compound function Closes SmartDropLabs#606 Closes SmartDropLabs#607 Closes SmartDropLabs#610 Closes SmartDropLabs#611 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
👷 Deploy request for sdcontracts pending review.Visit the deploys page to approve it
|
|
@Emeka-12 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! 🚀 |
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
factory: create_pool doesn't emit event on validation failure #606 —
soroban/contracts/factory/src/lib.rs: Emit a(factory, pool_fail)event with the error code whencreate_pool_innerreturns an error. Indexers can now observe rejected creation attempts without parsing diagnostic events from the transaction.farming-pool: calculate_credits doesn't account for lock period #607 —
soroban/contracts/farming-pool/src/lib.rs: Apply a 50% credit bonus incalculate_creditswhen the user's position is still within its lock period (current_ledger < unlock_ledger). Aligns the displayed credit value with the economic incentive for locking.farming-pool: no compound interest support #610 —
soroban/contracts/farming-pool/src/lib.rs: Add acompound(env, user)function that re-checkpoints the caller's position — banking accrued credits intototal_creditsand resettingcheckpoint_ledger— and emits a(pool, compound)event. Prevents integer-overflow drift on long-running positions.factory: no pool analytics query #611 —
soroban/contracts/factory/src/lib.rs: Add aget_pool_analytics(env, pool_id)function returning aPoolMetricsstruct with the pool's TVL, credit rate, global multiplier, deprecation status, snapshot count and last snapshot ledger from factory-owned storage only (no cross-contract calls).Closes #606
Closes #607
Closes #610
Closes #611
🤖 Generated with Claude Code