For the purpose of desinging ODU, inflation can be viewed as too much money that can be spent. This topic is not covered here, it's only excluded to concentrate on ODU's very own problem: collateral values.
It means that different address lengths exist, and values of units in a small address space are taken and given from payees who did not take part in a transaction. So a client has to consider collateral values as bein there involuntarily. Consequently it has to evaluate the intrinsic, displayed value by minifying these shares that everyone gets.
In other words, the client will only show a balance it can control and judge. It loweres values when collateral received money will lower the need for it and by this the intrinsic value. It doesn't show the difficulty_value accumulated in the graph, but a "share".
Although it's possible that not everything of a balance can succesfully be routed, the client estimates the statistically valuable amount, which does not consider the routing.
The calculation
The share of a unit, of that the client knows no preimage, is zero, because it cannot be spent.
Shares of units with known preimage are calculated by adding the lowered difficulty_value of each connected and spent unit:
For each connected unit that was spent:
double get_worth() const
{
return std::pow(2, (double) get_address_length() - (64-8) / 2);
}
root_unit->worth += source->get_worth()
This encourages a client to make use of the cooperative routing system, because easy to route units with a short address length are of too low value. The average of input and output address length encourages both payer and payee to do so.
Deriving address length and addresses
{
uint8_t a = 123;
for(int i = 0; i < 16; ++i)
{
a = a*31 ^ name[i];
}
return 8 + (a/256.0) * 57;
}
uint64_t get_input_address() const
{
return ((uint64_t*)name)[0] & (1<
uint64_t get_output_address() const
{
return ((uint64_t*)name)[1] & (1<
All address data is taken from the public name (identity), which itself is the result of a relatively slow hash (15ms here, 128 bit output, if longer *was ok Equihash would be the better option.) No fixed address length is predefined, instead the client tries to evaluate its impact. Ideally, mining power goes into the unit value, without allowing for other approaches that could change the intrinsic value compared to the value displayed in the client.
For this to work, a seperate mechanism may be necessary, which determines the preferable address length.
Here's compiling (MinGW g++) pseudo code covering the ideas for the unit structure and the evaluation: https://pastebin.com/z4m1dbSZ
It mines 3 valid (but not necessarily usable) units and displays their estimated intrinsic value. In short: Hard to route units are worth more. What's still missing is the routing.