The ImportanceUpdatingAgent handles the exchange of currency between atoms. Every thought cycle It pays out wages in the form of Short Term Importance (STI) and Long Term Importance (LTI) to atoms that are currently in use, and also collects rent from an atoms STI and LTI.
As atoms are used in mind processes they are endowed with stimulus. MindAgents should explicit grant atoms stimulus when they make use of them, although it's left up to the MindAgent to decide how best to do this.
The ImportanceUpdatingAgent takes this stimulus and pays wages to atoms. So in a sense, the stimulus is a record of how much work the atom has been involved in. The currency of the wages that the ImportanceUpdatingAgent pays to an atom is in the form of both STI and LTI. The amount of STI and LTI conferred is based both on the total stimulus of the atom, and two internal multipliers that indicate the rate that stimulus is converted into STI and LTI. Atoms also have to pay LTI rent to exist in the the AtomSpace and STI rent to exist in the Attentional focus.
For example, say atom A1 has 0 STI and 0 LTI, during some cognitive process it is given 10 stimulus. Now it comes time for the ImportanceUpdatingAgent to run. It's internal conversion rate for stimulus into STI is 10 and for LTI the conversion rate is 3. At this stage a lower conversion rate for LTI is thought to be of more use because we want LTI to respond slower than the short term importance (rent for LTI is also lower, see below), for example, things flit in and out of your attention as you go through the day, but the things you remember long term are the things that you've spent more time thinking about. When the ImportanceUpdatingAgent pays wages, it gives the atom A1 100 STI and 30 LTI.
STI rent is charged from atoms that are above the Attentional focus boundary and LTI rent for all atoms in the system (conceptually at least, once atoms start being swapped to disk, LTI rent for these atoms might only be charged periodically due to the expense involved in updating them). So, if the attentional focus boundary was set at s_AF, i.e. all atoms with STI larger than s_AF are in the attention span of the OpenCog instance, then for our atom A1, it would be charged both STI and LTI rent. If STI was < s_AF then atom A1 would not be charged STI rent, but would still be charged LTI rent regardless of the STI or LTI of A1.
Updating rent to maintain AtomSpace funds
Now, since both STI and LTI currency are conserved, the funds that the ImportanceUpdatingAgent uses to pay wages has to come from somewhere. In an ideal situation, this would be balanced by the rent charged to atoms. However, the number of atoms in the AtomSpace and in the attentional focus will be constantly changing. In fact, an OpenCog instance may even have some method of controlling the attentional focus boundary depending on how focussed or quick thought and reaction needs to be (More atoms in the attentional focus mean more atoms to consider during reasoning, although reasoning methods can and do use atoms outside of the attentional focus if the those in attention are insufficient to come up with suitable results.)
To manage the variable number of atoms in attention and in the AtomSpace, the ImportanceUpdatingAgent draws STI and LTI from a pool of funds managed by the AtomSpace. These pools have a homeostatic range that the ImportanceUpdatingAgent tries to keep the AtomSpace funds within. If, at the end of an update cycle, the pools are outside of this range, then the agent taxes all atoms to bring the pools back to the middle of the range (Note that although it's called a tax, it can actually result in a refund if the agent has been charging too much tax... just like real life... if you're lucky). The agent then recalculates the optimal rent based on time averages of the AtomSpace size and number of atoms in the attentional focus.