TBD54566975 / tbdex

56 stars 26 forks source link

Should region data be added to Offerings? #324

Open frankhinek opened 6 months ago

frankhinek commented 6 months ago

How does a consumer web/mobile App determine which Offerings are valid to display to a user based on the data contained within the offerings returned by 1 or more PFIs?

An Offering's payin and payout fields contain a currencyCode but you can't always infer the country based solely on this information:

The issue being highlighted is that a given PFI may only be about payout a particular currency in certain countries. How could an Offering indicate this so that the app can filter out offerings that don't support a given (sender, payin method, payout method) combination?

For example:

It seems like the tbDEX protocol should provide a consistent way to determine which country(ies) a payin or payout method is supported in to improve the user experience. In other words, provide Apps a consistent method of filtering Offerings that don't make sense given what the end user is attempting to accomplish

Supported countries could be included in the requiredPaymentDetails of the offering -- and then submitted in an RFQ's privateData.paymentDetails, but I'm still wondering if we would want to change anything about the protocol to encourage inclusion of country data if we want to support filtering Offerings based on the location/residence of the sender/recipient or the payin/payout method selected.

Suggestion

It seems beneficial to have region/country information at the PayinMethod and PayoutMethod level (and not at the top-level offer) since a particular PFI may operate in 10 countries, but still can't serve a particular RFQ if the combination of (sender, payin method, payout method) is not supported.

michaelneale commented 6 months ago

in cases where the user has accumulated VCs which can be re-used across PFIs - and has preferences, then sorted offerings may make sense and be much easier to do. In fact, given most of the work from the users PoV would be IDV, right, then that would drive perhaps some behavior? (in cases of a blank slate - not sure, was more thinking the re-entrant case). In some ways the blank slate is more urgent/important as that would act as the obstacle.

nburgess48 commented 6 months ago

I think what you're saying makes sense Frank, and would enable a better UX for wallet users. Since otherwise a Sender may go through a PFI's entire flow only to be rejected after KCC application (un-supported Sender country) or after providing the Recipient's payout information (un-supported Receiver country)

If we go this approach though, would we need to move the relevant PD(s) into the PayinMethods to make sure the Sender gets pushed to the right KCC issuance/prez flows given their region?

michaelneale commented 6 months ago

thinking a bit more about this based on experiences I have had with remittance providers as well:

Scenario 1) USD to AUD: (self remittance)

Scenario 2) AUD to USD: I need to pay back someone in USD to their cashtag

Not sure if any of this informs what sort of regional information; but to me it seems heavily around selection of the PFI more so than selection of offering (but then knowing what offerings they have can be done before I have added them). So I really want to know can it accomodate first me as a customer, and secondly payin/payout pairs of currencies and mediums that I need (payout is usually determined by whom I owe money to, payin is fairly static).

Any help?

mistermoe commented 6 months ago

i've been thinking about this using the following concrete examples:

  1. USD -> USDC on-ramp
  2. USDC -> USD to U.S. bank account off-ramp
  3. USDC -> USD to PK bank account off-ramp (legitimately possible using Roshan Digital Accounts)
  4. USD -> MXN to MX bank account (traditional remittance)
  5. USD -> MXN to Swiss bank account (traditional remittance)

Examples 1-3

Examples 1-3 are effectively self to self. by that i mean there is no recipient which can also be technically thought of as: the sender is the recipient. in these scenarios, where you're on or off-ramping from or to has a direct correlation to the KYC requirements that PFI bears in order to provide a financial service in that respective region. For example, a USDC -> USD to PK bank account off-ramp would necessitate PK KYC.

Given this, i think region as a top-level property of an offering makes an individual offering simpler to not only filter but also represent required claims for. The requiredClaims for USDC -> USD (pakistan) will certainly be different than USDC -> USD (usa)

Examples 4-5

These traditional remittance offerings is where i can see each payment method having a region being useful. If i'm looking to remit MXN to be received in a Swiss bank account (actually don't know if this is possible), and a PFI happens to offer MXN remittances to Mexico and Switzerland, presumably the offering would look like:

{
  "payin": {
    "currency": "USD"
    "methods": [{
      "kind": "PAYMENT_LINK"
    }]
  },
  "payout": {
    "currency": "MXN",
    "methods": [{
      "kind": "SPEI",
      "region": "MX"
    }, {
      "kind": "BANK_ACCOUNT",
      "region": "CH"
    }]
  },
}

Practical Considerations

I didn't see a region selector when looking at the websites of well-known traditional remittance providers. here's wise's homepage as an example:

image

notice i can select my own reigion up at the top in the status bar but the remittance form only has currencies. not currency + region.

my only personal experience holding multiple currencies in a single bank account was using Roshan Accounts which make it appear as if i'm holding (and can send) USD directly to Pakistan. while advertised as such, the banking infrastructure under the hood is a Nostro Account. turns out the USD is actually held in a U.S. correspondent bank. That said, Nostro accounts are often internal details and used for internal forex. i haven't really seen examples of "i need to send actual MXN to be received as MXN in Switzerland" as a prevalent feature.

nburgess48 commented 6 months ago

Another data point: Interestingly Wise does let users hold multiple currencies and receive money into those accounts. But similar to what Moe describes above the accounts they create on your behalf to facilitate these payments are all "local".

Screenshot 2024-05-29 at 10 20 59 AM

So from the perspective of a PFI collecting requiredPaymentDetails for a Remittance: these accounts would look no different from a US-based account holding USD. Or an EU-based account holding Euros. (the region the account is located in matches the currency).

I imagine then the only reason a PFI might reject these Remittances due to Recipient region would be due to the recipient's address (assuming the PFI requires collection of that field) falling outside a region they support (not necessarily due to information gleaned from the requiredPaymentDetails.

That said, I'm not sure if this practice holds true across the board. But it's one additional data point nonetheless

michaelneale commented 6 months ago

@nburgess48 yeah good point - I have used it like that too, but all in wise.

jiyoonie9 commented 5 months ago

notes out of tbdex discussion