Before us is Mishnah 6 in the sixth chapter of Maseches Shekalim. The Mishnah opens with the laws of vows: a person who vows to bring a certain item to the Beis HaMikdash - what is the minimum amount he must bring in order to fulfill his vow.
The amounts required for vows:
"Ha'omer harei alai eitzim - lo yifchos mishnei gezirin" - one who obligates himself to bring wood for the Mizbeach may not bring fewer than two logs of wood.
"Levonah - lo yifchos mikomeitz" - one who vows to bring frankincense may not bring less than a komeitz, which is a handful. This measure is the amount in which frankincense is brought together with a minchah offering, for frankincense is never brought on its own but only together with a minchah - and from here we learn that this is also the measure for one who vows.
"Zahav - lo yifchos midinar zahav" - one who donates gold to the Beis HaMikdash may not give less than a gold dinar, which is worth twenty five silver dinars, and apparently this is the smallest of the gold coins.
"Shishah linedavah" - the nedavah funds:
Here the Mishnah returns to the shofar shaped collection boxes that were listed in the previous Mishnah, six of which were designated for nedavah (voluntary donations), and it comes to teach us the law of this category: "Nedavah mah hayu osin bah?" - what was done with the nedavah funds? To this the Mishnah answers: "Lokchin bah olos" - with these funds they would purchase olah offerings. And as with every olah:
"Habasar laShem" - the meat of the offering is burned to Hashem upon the Mizbeach.
"Veha'oros lakohanim" - the kohanim receive the hide of the olah for themselves.
The derashah of Yehoyada the Kohen Gadol:
The Mishnah notes that this is a "midrash darash Yehoyada Kohen Gadol" - an exposition taught by Yehoyada the Kohen Gadol, who lived in the days of the first Beis HaMikdash. He derived it from the verse in Vayikra: "Asham asham laShem" - the meat of the asham offering is eaten by the kohanim, exactly like the chatas offering, and nevertheless the verse teaches "asham laShem," that it all goes to Hashem. From here he learned that funds left over from a chatas offering or from an asham offering should be used to bring olos.
And so he said: "Zeh haklal: kol shehu ba mishum cheit umishum ashmah - yilakach bo olos" - any offering that came on account of a sin or a guilt, and from which surplus funds remained, those funds should be used to purchase an olah.
In this way both aspects of the offering are fulfilled: there is a portion that goes to Hashem - the meat burned upon the Mizbeach, and there is a portion that goes to the kohanim - the hides. In this manner the resemblance to the case of chatas and asham, whose meat belongs to the kohanim, is also preserved, since here too the kohanim receive their share.
The verse in Sefer Melachim:
In Sefer Melachim, in the passage dealing with the deeds of Yehoyada, it says that asham funds and chatas funds are not to be brought into the funds of the treasury, but rather "they shall be for the kohanim." This verse cannot be understood literally, since these funds are used to purchase those very olos. Rather, this is its intent: surplus funds that were set aside for a chatas or an asham - the remainder does not enter the general treasury, but is handed over to the kohanim, and with it all those olos are purchased, and so in the end the kohanim receive their share in the form of the hides. In this way the concept of nedavah was fulfilled.
In summary: in this Mishnah we learned the minimum amounts for vows - two logs for wood, a komeitz for frankincense and a gold dinar for gold, and the law of the nedavah funds in the six shofar shaped boxes: they purchase olos with them, the meat to Hashem and the hides to the kohanim. This principle is derived from the derashah of Yehoyada the Kohen Gadol from the verse "Asham asham laShem," that whatever comes on account of a sin or a guilt is used to purchase olos, and thus both of its parts are fulfilled: the part that ascends to Hashem and the part that is given to the kohanim.