Skip to content

Depth of Market: include all quoted rates, not just those with collateral#88

Closed
e35ventura wants to merge 1 commit into
testfrom
fix/depth-include-quoted-rates
Closed

Depth of Market: include all quoted rates, not just those with collateral#88
e35ventura wants to merge 1 commit into
testfrom
fix/depth-include-quoted-rates

Conversation

@e35ventura
Copy link
Copy Markdown
Collaborator

Summary

  • Depth of Market was collapsing to a single row whenever a miner's collateral was fully locked in an in-flight swap (their collateralRao reports as 0, so the entire row was filtered out). The Active Rates table kept showing the rate, so the two views disagreed.
  • Keep the rate level in the orderbook grouping regardless of collateral, and add the miner's actual capacity (zero if locked). Rows with real capacity still render a depth bar; locked-out rates show as a row with no bar.

Test plan

  • Open the dashboard against https://api.all-ways.io (two miners: one with active swap + 0 collateral, one with collateral).
  • Depth of Market now shows both rate levels in each direction instead of one.
  • Active Rates and Depth of Market reflect the same set of quoted rates.

…eral

Active miners whose collateral is fully locked in an in-flight swap show
collateralRao=0 in the miners feed. The depth chart was filtering those
out entirely, so the orderbook collapsed to a single row even when the
Active Rates table clearly listed more.

Keep the rate level in the depth groupings regardless of collateral, and
contribute the miner's actual capacity (zero if locked). Bars only fill
where there is real capacity; otherwise the row is still present so the
quoted rate is visible.
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 12, 2026
@e35ventura
Copy link
Copy Markdown
Collaborator Author

Closing — misread the data. Only one miner has non-zero collateral, so a single row is the correct depth representation. The original filter was right.

@e35ventura e35ventura closed this May 12, 2026
@e35ventura e35ventura deleted the fix/depth-include-quoted-rates branch May 12, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant