Skip to content

Add transparent AlfredPay quote pricing metadata - #1323

Merged
ebma merged 3 commits into
stagingfrom
codex/alfredpay-quote-pricing-metadata
Aug 7, 2026
Merged

Add transparent AlfredPay quote pricing metadata#1323
ebma merged 3 commits into
stagingfrom
codex/alfredpay-quote-pricing-metadata

Conversation

@ebma

@ebma ebma commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Persist separate source-labelled Vortex reference, AlfredPay gross/net provider rates and fee breakdown, and customer all-in rate.
  • Keep the existing quote calculations unchanged; the AlfredPay rate remains diagnostic and does not become the general price source.
  • Bump the AlfredPay offramp metadata schema and flow version, strengthen provider response validation, and document the pricing observations.

Testing

  • bun lint
  • bun typecheck
  • 58 focused API unit tests
  • 21 AlfredPay shared-schema tests
  • 8 MXN offramp corridor scenario tests

Deployment note

Drain pre-v3 AlfredPay offramp quotes and in-flight ramps before deployment. Persisted older flow identities intentionally fail closed.

@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for vortex-sandbox ready!

Name Link
🔨 Latest commit 71edfe7
🔍 Latest deploy log https://app.netlify.com/projects/vortex-sandbox/deploys/6a76069cfd7643000807bccd
😎 Deploy Preview https://deploy-preview-1323--vortex-sandbox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for vortexfi ready!

Name Link
🔨 Latest commit 71edfe7
🔍 Latest deploy log https://app.netlify.com/projects/vortexfi/deploys/6a76069cd649ba0007857768
😎 Deploy Preview https://deploy-preview-1323--vortexfi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for vrtx-dashboard canceled.

Name Link
🔨 Latest commit 71edfe7
🔍 Latest deploy log https://app.netlify.com/projects/vrtx-dashboard/deploys/6a76069defa6960007b77517

@ebma
ebma requested a balanced review from Copilot August 7, 2026 16:14
@ebma ebma changed the title feat(api): add AlfredPay quote pricing metadata Add transparent AlfredPay quote pricing metadata Aug 7, 2026

Copilot AI 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.

Pull request overview

Adds diagnostic AlfredPay offramp pricing metadata while preserving existing quote arithmetic.

Changes:

  • Persists reference, provider gross/net, fee, and customer all-in pricing observations.
  • Adds source-aware fiat-rate snapshots and stricter AlfredPay response validation.
  • Bumps the offramp flow to v3 with tests and security documentation.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/shared/src/services/alfredpay/schemas.ts Validates provider rate and fee type.
packages/shared/src/services/alfredpay/schemas.test.ts Tests required pricing fields.
docs/security-spec/05-integrations/alfredpay.md Documents pricing invariants.
docs/security-spec/03-ramp-engine/ramp-phase-flows.md Documents flow v3.
apps/api/src/tests/corridors/mxn-offramp.scenario.test.ts Verifies persisted pricing metadata.
apps/api/src/test-utils/fake-world/fake-prices.ts Fakes source-aware rate snapshots.
apps/api/src/api/services/priceFeed.service.ts Adds fiat-rate snapshot metadata.
apps/api/src/api/services/priceFeed.service.test.ts Tests source, timestamp, and caching.
apps/api/src/api/services/phases/blocks/phases/alfredpay-offramp/simulation.ts Calculates pricing observations.
apps/api/src/api/services/phases/blocks/flows/alfredpay-offramp.ts Advances the flow to v3.
apps/api/src/api/services/phases/blocks/__tests__/alfredpay-offramp.registration.test.ts Updates registration fixtures.
apps/api/src/api/services/phases/blocks/__tests__/alfredpay-offramp.flow.test.ts Verifies v3 fail-closed identity handling.

Comment thread apps/api/src/api/services/phases/blocks/flows/alfredpay-offramp.ts
@ebma
ebma merged commit 9e8a932 into staging Aug 7, 2026
6 checks passed
@ebma
ebma deleted the codex/alfredpay-quote-pricing-metadata branch August 7, 2026 16:28
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