Makos 4b how does Rabi Yehuda know lav she'ein bo maaseh lokin alav? The Gemara learns a meh matzinu from eidim zommemin and motzi shem ra, and the gemara rejects it because ma lehatzad hashava shebaheim shehein knas. The gemara ends up accepting it by saying Rabi Yehuda argues on Rabi Akiva and holds eidim zommemin is not knas. Let's understand this hava amina, and understand what knas is. Furthermore, the first tosfos in Makos has 2 opinions whether there is a kiyum kasher zamama in ben grusha. One answer in Tosfos, and also Rashi in Makos 2b remez, and also in Sanhedrin 10a s.v. remez, is that there is no kasher zamam in ben grusha. Do we know what the Rambam holds about this? Rabi Akiva Eiger, quoted in the Frankel rambam, says that the Rambam agrees with the shita of Rashi, but does not elaborate.
Kiddushin 3b, trying to learn source for kesef kiddushin belong to the father of the ketana tries to learn from ones umefateh, but rejects it because we can't learn mamon from knas. Then the gemara tries to learn from boshes ufegam, but rejects that also because "shani boshes ufegam d'avuha shayach begavayhu." My rebbi, Hagaon HaRav Ahron Halevi Soloveichik zt"l asked, but boshes ufegam are also knas, so why doesn't the gemara answer memona miknassa lo yalfinan? He answered that there are tweo types of knas - complete, pure knas, which is a set amount to pay. There is a second knas which is subjective. Boshes depends on who the person was, how much he or she was embarrased, so it's not a "pure" knas (these are my terms, not his). So mamon can be learned out from Knas of boshes, and the gemara can't answer "memona miknasa lo yalfinan." I think he brought as a rayah the Rambam Chovel uMazik 5:6-7, that modeh biknas patur but modeh about boshes where nobody saw the person got embarrassed, he pays because there is a new boshes when he's modeh in front of beis din.
Now, logically, eidim zommemin should be a knas - at least according to Rabi Akiv - like boshes; not pure knas, because the punishment depends on what the eidim tried to be mechayev. Then the gemara shouldn't have asked "ma lehatzad hashava shebahen she'hein knas" - because eidim zommemin is a knas from which we can learn mamon!
Rashi Makos 4b s.v. gamar explains this gemara as referring to ben grusha when it mentions eidim zommemin. Why ben grusha where there is no kasher zamam? Why not a regular case of kasher zamam? I think the Rambam will agree with Rashi. He holds ben grusha is NOT kasher zamam. Therefore there is a set punishment - 40 malkos - for eidim zommemin of ben grusha, so it is pure knas (even though we usually view knas as money, here it's malkos). Therefore I feel the Rambam holds the makos of ben grusha are not a kiyum of kasher zamam.