Skip to content

Conversation

@brunoguerios
Copy link
Member

Context

  • unwrapRates scaling is now reflected on the float point representation within the DB and no longer needs to be applied in the SOR side as well

Example for ghUSDC on SONIC:

previous implementation:

  • main token decimals -> 18
  • underlying token decimals -> 6
  • rate within DB -> 1.040198652125
  • unwrapRate decimals -> 12 (i.e. diff between main and underlying decimals)
  • rate within SOR -> 1040198652125

current implementation:

  • main token decimals -> 18
  • underlying token decimals -> 6
  • rate within DB -> 0.000001040198652125
  • unwrapRate decimals -> 18 (i.e. always 18 because diff between main and underlying is already factored in)
  • rate within SOR -> 1040198652125

@brunoguerios brunoguerios requested a review from franzns October 30, 2025 15:31
@brunoguerios brunoguerios self-assigned this Oct 30, 2025
@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2025

🦋 Changeset detected

Latest commit: 2a2ea8a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
backend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@franzns franzns merged commit 0fa691c into v3-canary Oct 30, 2025
1 check passed
@franzns franzns deleted the sor-fix-unwrap-rates-internally branch October 30, 2025 15:33
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.

3 participants