President Trump has taken a keen interest in the relationship between the U.S. Postal Service and Amazon, though the facts he has presented on it are likely incorrect and based upon faulty assumptions.

The president has repeatedly fired off tweets castigating the federal mailing agency for maintaining what he views as a sweetheart deal to deliver packages for the online retail giant. He has accused the Postal Service of making Amazon “richer” and itself “dumber and poorer,” of being Amazon’s “delivery boy” and on Monday of losing “a fortune” in the agreement. The actual details of the USPS-Amazon arrangement are protected as a business secret, but the general outlines of such deals and oversight from the postal regulator virtually guarantee the Postal Service can make a profit.

Trump appears to be criticizing a “workshare discount” the Postal Service provides to Amazon as part of a negotiated service agreement. Large-scale mailers such as Amazon strike such deals to leverage their own networks to move packages and pre-sort them for delivery, allowing USPS simply to pick the parcels up at one location and drop them off in a process known as “last mile delivery.” This amounts to significant labor and delivery savings for the Postal Service, some of which are then passed on to the customer.

It is safe to assume that because Amazon is such a large postal customer, it has more leverage and therefore pays particularly beneficial rates. Amazon also maintains its own sort centers around the country, allowing the company to bypass the normal USPS collection and processing procedures by placing its packages in close proximity to their final destinations.

“The bigger the shipper, it’s fair to say, the better the deal they probably get because that’s how all companies work,” said Mike Plunkett, a former USPS vice president for pricing and classification and current president of PostCom, an association of large-scale private sector mailers, including Amazon.

The Postal Service must have all of its negotiated service agreements approved by its oversight body, the Postal Regulatory Commission, before they take effect. PRC ensures that in all agreements, the revenue generated will turn at least some profit compared to the associated costs USPS will incur. The regulators then review every agreement annually and before they are renewed to ensure ongoing compliance. PRC just released its annual compliance review for fiscal 2017 in March. The audit does not identify companies by name, but it found just four of its 846 agreements were out of compliance. USPS has already terminated three of them, and the fourth appeared to have no connection to Amazon.

“The commission’s role as it relates to the review of competitive Negotiated Service Agreements is to ensure that the revenue for each competitive product, including each NSA, exceeds its attributable costs,” said Gail Adams, a PRC spokeswoman. “The overwhelming majority of NSAs with the Postal Service have both covered their attributable costs and complied with the statutory requirements.”

USPS’ “competitive products” refer to its offerings in which private sector companies compete against it, as opposed to products such as regular mail, in which the agency enjoys a government-protected monopoly. PRC determined in 2006 that in addition to exceeding direct costs, revenue from competitive products must collectively also pay for at least 5.5 percent of the Postal Service’s institutional costs like rent or general administration.

Over the weekend, Trump said the “U.S. Post Office” would “lose $1.50 on average for each package it delivers for Amazon.” That appears to be in reference to a report from analysts at Citigroup, which found the Postal Service would have to raise the price of its packages by $1.46 if the 5.5 percent institutional cost contribution baseline were raised to a rate suggested by United Parcel Service, or 24.6 percent. That figure was amplified last year when it appeared in a Wall Street Journal op-ed that accused USPS of offering Amazon a $1.46 “subsidy.”

The Citigroup analysis neglected, however, to say that the 5.5 percent figure was the floor, not the actual rate, for competitive projects’ contribution. PRC’s fiscal 2017 compliance report found competitive products were required to contribute at least $1.6 billion toward fixed costs, but they exceeded that total by $5 billion. Those products ended up paying for 23 percent of institutional costs last year.

Citigroup created a second scenario in which the Postal Service would have to make good on defaulted payments that Congress required of the agency to prefund health care benefits for future retirees. USPS has neglected to make the payments for several years, which has consistently put the agency in the red. In order to make those payments, Citigroup suggested package costs would have to increase by $1.70. It appears unlikely USPS will at any point decide to make those payments, however, and Congress is currently considering legislation with bipartisan support to virtually eliminate the prefunding burden and amortize any remaining liabilities over the course of 40 years.

PostCom’s Plunkett said he was unsure of where Trump would be getting his information, as the secretive nature of the Postal Service’s agreements make such details unknown even to his group.

“It would be very difficult for someone to weigh in on that authoritatively,” Plunkett said.

Both USPS and Amazon declined to comment directly on their agreements or Trump’s tweets. Joe Corbett, the Postal Service’s chief financial officer, wrote a letter in response to the Wall Street Journal’s op-ed accusing its author of providing “an inaccurate and unfair account of the package delivery side of our business.”

“The PRC has also concluded every year that products covered by the letter monopoly do not cross-subsidize the Postal Service’s competitive products,” Corbett said. “The reason we continue to attract e-commerce customers and business partners is because our customers see the value of our predictable service, enhanced visibility, and competitive pricing.”

In a January op-ed in The Hill, USPS spokesman Dave Partenheimer spelled out in detail how the agency makes agreements and the role its regulator plays in setting prices and approving deals. He noted that “like any business,” USPS seeks “the optimal mix of price and volume to deliver the maximum revenue and return.”

Generally speaking, package delivery has been a rare bright spot for the Postal Service as mail volumes have declined precipitously. The agency’s overall losses—more than $1 billion for 11 consecutive years—have stemmed overwhelmingly from the prefunding mandate. Before a down year last year, USPS had seen four consecutive years of “controllabe” profits, a measure that does not account for losses stemming from the prefunding payments. Shipping and package revenue increased by 11 percent in fiscal 2017, and for years has seen double-digit growth.

President Trump promised the details of the USPS-Amazon agreement “will be changed,” though it is unclear what influence he has over the deal. The Postal Service operates as an independent agency with its own management team and regulatory body. The postmaster general is selected by a board of governors, who are nominated by the president and confirmed by the Senate. None of the nine presidentially appointed governor slots are currently filled, though three Trump nominees are currently awaiting Senate approval. The PRC has five commissioners, who serve six-year terms and are also presidentially nominated and Senate confirmed. The commission currently has one vacancy, but it statutorily must be filled by a Democrat.

The Fox News program “Fox and Friends,” which Trump watches and tweets along with regularly, aired a segment on Monday supporting privatization of the Postal Service.