I may have made at least 2 mistakes so far in the work I did above 3 weeks ago:
- I looked at only 1 record type
- I overlooked that units can be parked (not on the move, not in flow)
After rework (details shown lower down and in the amended digraph included), I now hypothesize:
On Explorer main page at the top,
Instead of
Minting (The sum of all transfer amounts from Emission to non-Root accounts)
minus Redemption (The sum of all transfer amounts from Hot wallet to Emission or Root account)
I suggest:
Minting (The sum of all transfer amounts from Emission to user accounts)
minus Redemption (The sum of all transfer amounts from Hot wallet to Emission account)
or even simpler:
Minting = Outbound (E)
Redemptions = Flow (H, E)
Using CI's CSV extract flat file from DEC-2022 for no other reason than that's
what I used for my KAG EPD forensic analysis a few days ago:
Minting
outbound (E) =
7431860.37
from result file in ZIP OUTBOUND-CI-sums-both-record-types
KAG_EmissionAccount
7431860.37
Redemptions
flow (H, E) =
4462596.98
from result file in ZIP K5-CI-all-flows-type-payment
KAG_HotWalletAccount
KAG_EmissionAccount
4462596.98
bc <<< "7431860.37 - 4462596.98"
2969263.39
That
might correspond to
Total Coin in Circulation (Minting minus Redemption)
Previously I was focussed on
1) records of Type 1 ("payment")
not Type 0 ("create_account")
2)
flows along the arcs aka
transfers
Not on
stocks
I included my updated KAG digraph.
K5?
=
complete graph on 5 vertices
(in practice, that means
no user accounts aka
no user vertices)
I deduce the traffic to and from user accounts by subtracting out the flows measured on the K5 from the INBOUND and OUTBOUND totals to each system account (vertex). Where relevant.
My Epson printer/ scanner writes to a PDF:
Code:
pdftoppm 'Scanned Document.pdf' KAG-digraph-Version-2
convert -resize 50% KAG-digraph-Version-2-1.ppm KAG-digraph-Version-2.png
eog KAG-digraph-Version-2.png
My code for this batch of forensics:
Set up environment:
(nothing new)
Code:
linux> echo $KAG_CI_extract
../CI-dat/kag-raw.csv
linux> cat KAG-set-main-account-symbols.sh
KAG_EmissionAccount=GCGTMT2X6NUV6ABEOAOSDI2YQ7FXQOQYKYA7KVZQ5ID67GQU3C6AIUGU
KAG_HotWalletAccount=GBTYCT2VVWURNU23ZSR3IPSXU6BRWT3ELIOQJAJOKGIHCLLE6YDX4A7E
KAG_InflationAccount=GBBVUAMR3CYNQKMNHVWCMUQVE3XQIL3WM5GSP5D6SCECKIZNNBT6FT7I
KAG_RootAccount=GAUCIFE37F4KQ5F6QPNSZ75QKRQTNRCF32FZNUXMCXUFSKRMWGF76LTI
KAG_GAPSAccount=GAPS3KZ4YVEL4UYFAGTE6L6H6GRZ3KYBWGY2UTGTAJBXGUJLBCYQIXXA
. ./KAG-set-main-account-symbols.sh
set | grep KAG | sort -t= -k2 | cut -d= -f2 > Vertices
linux> cat Vertices
GCGTMT2X6NUV6ABEOAOSDI2YQ7FXQOQYKYA7KVZQ5ID67GQU3C6AIUGU
GAPS3KZ4YVEL4UYFAGTE6L6H6GRZ3KYBWGY2UTGTAJBXGUJLBCYQIXXA
GBTYCT2VVWURNU23ZSR3IPSXU6BRWT3ELIOQJAJOKGIHCLLE6YDX4A7E
GBBVUAMR3CYNQKMNHVWCMUQVE3XQIL3WM5GSP5D6SCECKIZNNBT6FT7I
GAUCIFE37F4KQ5F6QPNSZ75QKRQTNRCF32FZNUXMCXUFSKRMWGF76LTI
Work:
($3=="payment")
Code:
for i in `cat Vertices`
do
for j in `cat Vertices`
do
grep $i KAG-set-main-account-symbols.sh | cut -d= -f1
grep $j KAG-set-main-account-symbols.sh | cut -d= -f1
sed '1d' $KAG_CI_extract | sed 's/"//g' | awk -F, -v x="$i" -v y="$j" '( ($3=="payment") && (($5==x) && ($6==y)) ) {sum_7 += $7} END {printf "%-10.2f\n", sum_7 }'
sleep 5
done
done > K5-CI-all-flows-type-payment
($3=="create_account")
Code:
for i in `cat Vertices`
do
for j in `cat Vertices`
do
grep $i KAG-set-main-account-symbols.sh | cut -d= -f1
grep $j KAG-set-main-account-symbols.sh | cut -d= -f1
sed '1d' $KAG_CI_extract | sed 's/"//g' | awk -F, -v x="$i" -v y="$j" '( ($3=="create_account") && (($5==x) && ($6==y)) ) {sum_7 += $7} END {printf "%-10.2f\n", sum_7 }'
sleep 5
done
done > K5-CI-all-flows-type-create_account
All traffic (flows). Not only system accounts. Totals.
($3 == "create_account") || ($3 == "payment")
Code:
echo "INBOUND"
for j in `cat Vertices`
do
grep $j KAG-set-main-account-symbols.sh | cut -d= -f1
sed '1d' $KAG_CI_extract | sed 's/"//g' | awk -F, -v y="$j" '( ($3 == "create_account") || ($3 == "payment") ) && ($6==y) {sum_7 += $7} END {printf "%-10.2f\n", sum_7 }'
sleep 5
done > INBOUND-CI-sums-both-record-types
All traffic (flows). Not only system accounts
($3 == "create_account") || ($3 == "payment")
Code:
echo "OUTBOUND"
for i in `cat Vertices`
do
grep $i KAG-set-main-account-symbols.sh | cut -d= -f1
sed '1d' $KAG_CI_extract | sed 's/"//g' | awk -F, -v x="$i" '( ($3 == "create_account") || ($3 == "payment") ) && ($5==x) {sum_7 += $7} END {printf "%-10.2f\n", sum_7 }'
sleep 5
done > OUTBOUND-CI-sums-both-record-types
Create the ZIP (attached)
Code:
zip -j KAG-digraph-Version-2-with-results.zip \
K5-CI-all-flows-type-payment \
K5-CI-all-flows-type-create_account \
INBOUND-CI-sums \
OUTBOUND-CI-sums \
pix/KAG-digraph-Version-2.png
Check ZIP:
Code:
linux> zip -sf KAG-digraph-Version-2-with-results.zip
Archive contains:
K5-CI-all-flows-type-payment
K5-CI-all-flows-type-create_account
INBOUND-CI-sums
OUTBOUND-CI-sums
KAG-digraph-Version-2.png
Total 5 entries (617836 bytes)
My
ultimate goal:
- to understand how this animal works
- to provide simple linux tools available to everybody to hit a flat-file extract of the blockchain in an automated manner from the command line
-
to create our own digital audits