Fix: precision loss and add quote/solver endpoints - #155
Open
Macnelson9 wants to merge 1 commit into
Open
Conversation
- Rework quote() math to use BigInt instead of Number() for srcAmount - Apply variance as scaled integer multiplier (992-1000/1000) instead of decimal - Add precision test for 18-decimal token amounts (1e24) feat: persist quotedDstAmount when a quote is requested for an intent - Add optional intentId to QuoteRequestDto - Update quote() to persist best quote to intent record when intentId provided - Add test verifying quotedDstAmount persists and is queryable feat: add endpoint to retrieve an intent's last quote - Add GET /api/v1/intents/:id/quote endpoint - Returns 404 if no quote has been persisted for the intent - Add tests for quote retrieval and not-found case feat: add POST endpoint for solver registration - Create RegisterSolverDto with validation (address, name, bondAmount, avgFillTime, supportedChains, supportedTokens) - Add POST /api/v1/solvers handler in SolversController - Initialize new solvers as active with zero fills and volume - Add tests for successful registration and validation failures closes stellar-vortex-protocol#67 closes stellar-vortex-protocol#68 closes stellar-vortex-protocol#69 closes stellar-vortex-protocol#70
|
@Macnelson9 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
Solves all 4 remaining issues in the quote and solver registration flow:
Issues Closed
closes #67
closes #68
closes #69
closes #70
Testing
✅ All lint checks pass
✅ Type checking passes
✅ Unit tests pass (18/18)
✅ E2E tests pass (29/29 - includes new tests for large amounts, quote persistence, and solver registration)
Changes
intentIdto QuoteRequestDto; quote() now persists best quote to intent when intentId provided