feat: swap recent-activity state + MarketCapMetrics (v2 leaderboard) + swap fee_destination wiring - #1251
Merged
Merged
Conversation
…ion definitions - activity/v1: swapped-crypto notification metadata + swap state - currency/v1: MarketCapMetrics on mint metadata - transaction/v1: fee_destination on stateful swap server params
Add SwappedCryptoMetadata + SwapState to the activity feed: - service NotificationMetadata: SwappedCrypto + WithdrewCrypto carrying swap metadata - persisted MessageMetadata mirror + MetadataMapper translation - transaction-history direction handling (outgoing, no counterparty) - supersedes standalone bought/sold crypto states
…ring - MarketCapMetrics domain model + mapper, threaded through MintMapper - persist as tokens.market_cap_metrics JSON column (auto-migration v27->v28) - fee_destination threaded server params -> ExistingCurrency buy instructions; inert unless feeAmount > 0 && feeDestination != null (preserves tx bytes)
Implement the RankingSystem.MarketCap branch off the new marketCapMetrics: - headline shows current market cap, change shows the windowed market-cap delta - falls back to the bonding-curve estimate when metrics aren't populated yet Drive v2 (NewUi) leaderboard rows to MarketCap ranking; legacy rows stay on Holders.
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
Refreshes the vendored protobuf definitions and wires the three new contract changes end-to-end, then puts the swap recent-activity + market-cap data to work in the UI.
1.
chore(protos)— refresh definitionsMarketCapMetricson mint metadatafee_destinationon stateful swap server params2.
feat(activity)— swap recent-activity notification stateNotificationMetadata:SwappedCrypto+WithdrewCryptocarryingSwappedCryptoMetadata(from/to mint, amounts, fee,SwapState)MessageMetadatamirror +MetadataMappertranslation at the persistence boundary3.
feat(oc)— MarketCapMetrics + swap fee_destination wiringMarketCapMetricsdomain model (currentMarketCap+ windowedmarketCapDeltas) + mapper, threaded throughMintMapper(incl. the two hand-constructed sites)tokens.market_cap_metricsJSON column, mirroring the existingholder_metricspattern; nullable-column auto-migration v27 → v28 (schema28.jsonexported)fee_destinationthreaded server params →ExistingCurrencybuy instructions. Inert unlessfeeAmount > 0 && feeDestination != null, so the on-chain transaction bytes are unchanged until deliberately activated.4.
feat(discovery)— rank v2 leaderboard rows by market capRankingSystem.MarketCapbranch offmarketCapMetrics: headline = current market cap, change = windowed market-cap delta (signed, correct colour)FeatureFlag.NewUi) leaderboard rows now rank by market cap; legacy rows stay onHoldersPersistence
@Databaseversion bumped 27 → 28 via a nullable-columnAutoMigration(no spec class needed); schema JSON exported.Testing
services:flipcash,services:opencode,apps:flipcash:core,transaction-history, andpersistence:{db,sources}.+$1.43K this week, red-$210.18K this week) off real backendmarketCapMetrics.