Design notes for a barter system that doesn't use a currency

This is something i wrote a couple weeks ago as the resultof a brainstorming for one of my pet projects, and i thought i should share it here.

This is basically a breakdown of an algorythm that allow npcs and payers to trade without having an actual currency.
I made this because we all knowabout money and greed and stashing wealth through this system simply makes it more delicate, subjective, and basically more interesting.

This algorythm only covers NPC traders, players have no such checks when doing their own exchanges.

anywy i’m pasting the link because there are a couple of tables on the page and i don’t know how to make tables on this forum.