feat: add optional referrer to TransferMetadata - #566
Open
nd-roy wants to merge 3 commits into
Open
Conversation
Optional because Solana swap transfers store the zero address and legacy transfer documents may not carry the field at all. Claude-Session: https://claude.ai/code/session_014TsG1HvsSBcd3RkJPZun9j
The field is address-shaped only on bridge transfers; generic swaps carry an opaque integrator-supplied string, and it is absent when the transfer recorded no referrer. Claude-Session: https://claude.ai/code/session_014TsG1HvsSBcd3RkJPZun9j
The neighbouring integrator field carries no comment; the doc block was out of step with the density of the surrounding types. Claude-Session: https://claude.ai/code/session_014TsG1HvsSBcd3RkJPZun9j
nd-roy
marked this pull request as ready for review
August 18, 2026 14:59
nd-roy
requested review from
CallumGrindle,
IvanSokalskyi,
callMeTheQA and
konstantinabl
August 26, 2026 17:15
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.
What
Adds an optional
referrertoTransferMetadata, so the field can be surfaced in themetadataobject returned by/v1/status,/v1/analytics/transfersand/v2/analytics/transfers.Why
Integrators already pass
referreron/quoteand it is persisted on every transfer, but the read endpoints only ever returnedintegrator. A partner asked for it back on the read side.referreris not new public data: it is emitted on-chain in theLiFiTransferStartedevent on every transfer, so exposing it in read responses reveals nothing that is not already visible on a block explorer.Why optional
Two cases can leave it absent, so a required field would be a lie:
metadatawithlodash.pick, which simply drops missing keys.Consumer
Backend side is lifinance/lifi-backend#8813.
Note for whoever releases this: the backend catalog currently pins
18.3.0-beta.0, which was published fromfeat/gasless-quote-surface-typesand is not onmain. This branch is based onmainand deliberately does not carry those commits, so a release that reaches the backend needs to include both.Linear: https://linear.app/lifi-linear/issue/CORE-779/expose-referrer-in-transfer-metadata-on-status-and-analytics-read
https://claude.ai/code/session_014TsG1HvsSBcd3RkJPZun9j