Skip to content

Add rate field to GetQuoteResponse#158

Closed
arentant wants to merge 1 commit intodevfrom
dev-rateInQuote
Closed

Add rate field to GetQuoteResponse#158
arentant wants to merge 1 commit intodevfrom
dev-rateInQuote

Conversation

@arentant
Copy link
Copy Markdown
Contributor

  • Surface the gross pre-fee exchange rate from IRateProvider.GetRateAsync on
    the public quote response as rate (new proto field 14, domain
    QuoteWithSolverDto.Rate, decimal).
  • Matches Layerswap's SwapQuoteModel.Rate semantics — raw provider rate
    (product of per-hop route.Rate in their multi-hop path; single-hop in
    our case). NOT receive_amount / amount.
  • For SameAssetRateProvider this is 1.0; for TokenPriceRateProvider it is
    srcPriceUsd / dstPriceUsd. Purely informational — not consumed by fee
    or receive-amount math (the value was already fetched internally at
    QuoteService.cs:159; we just expose it now).

Surface the gross pre-fee exchange rate from IRateProvider on the
public quote response — matches Layerswap's SwapQuoteModel.Rate
semantics (raw provider rate, not receive/amount). For SameAsset
routes this is 1.0; for TokenPrice it is srcPriceUsd / dstPriceUsd.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@arentant arentant closed this Apr 22, 2026
@arentant arentant deleted the dev-rateInQuote branch April 22, 2026 15:23
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.

1 participant