I'm not a broker, nor have I ever worked for one, but I'll answer based on my understanding of the industry (which includes some of this stuff.) It would be great if a broker rep might be able to chime in with their thoughts.
Broker has to put up capital to finance overnights with the LP's, and the LPs charge/pay interest according to the exposure (what you call swaps, I just don't like calling them swaps since currency "swap" contracts are technically something different..)
Anyway, the broker marks this overnight rate up, and passes it along to the trader. (That means when you get a positive role, it's likely the broker is getting slightly better and keeping part of it before passing the rest along to you, or they charge you slightly more than they were charged.
I say "likely" since many brokers go whitelabel or use a technology provider or liquidity feed aggregator to get them up and running, and sometimes this means they miss out on this side of the business as it gets absorbed by another part of the vertical.)
So yeah, it all relates to interest and borrowing rates, and that you're putting up margin instead of covering the full position in cash.