The Rent is Too Damn High Part II
In the previous article, I was discussing this transaction (as presented by the TrueBlocks front end in US dollars at the time of the transaction):
We were discussing the fact that, once one starts looking at one’s own transactions in US dollars, it becomes very obvious where one’s money is disappearing. (I mean going.) What is not so clear, however, is into which tiny spider holes that money falls.
In this article, we explore this issue more deeply using a really helpful aspect of TrueBlocks software: our command line.
Getting Started with the TrueBlocks Command Line
This article is not the place for instruction on how to use a Linux command line. Nor how to download and install TrueBlocks. We’ll assume you follow these instructions: https://docs.trueblocks.io/docs/prologue/installing-trueblocks/. Do so now and return when you’re ready…
Assuming you’ve completed the above installation instructions, let’s try the following command:
chifra names -c trueblocks
You should get results similar to these (please help us improve our software by opening up an issue if you don’t).
tags address name
00-Active 0xf50...79b TrueBlocks Wallet 0xf503
Copy and paste the address (
0xf503017d7baf7fbc0fff7492b751025c6a78179b) and type this command:
chifra transactions 13071849.239 --reconcile \
0xf503017d7baf7fbc0fff7492b751025c6a78179b --fmt json
You’ll get a JSONish blob of reconciliation information as we presented in the previous article:
There’s so much to notice here, it’s embarrassing…but…
You’ll notice the transactionIndex shows this transaction to be the 239th transaction of block 13,071,849. Note this, we will need it below.
You’ll notice the last item in each record says
reconciled: true. This is where the green reconciliation dot we show on the front end comes from.
You’ll notice each record has a field called
priceSource and for all but one of those records, that value says,
uniswap. This records the source from which we get our pricing of the given token in US dollars — the other value for
stable-coin which means we can (if our users wish) peg this value to $1.00, thereby avoiding a query to the node. We will write a future article discussing exactly how we use UniSwap and stable coins soon.
You’ll question pegging DAI to 1.00 US dollar is legitimate. (We think it is, and if our users don’t they can always disable this optimization.) Do so, greatly speeds up the pricing calculations. So, for our purposes in this article, it’s fine.
You’ll notice we calculate
spotPrice only to five decimal points — we figure what’s the point of going further when the final reporting is in US dollars anyway?
You’ll notice that the data actually denominates the values in their own native token. For example, the wETH reconciliation (the third record), says we transacted 5.0000 wETH. We do this to provide maximum flexibility to the consumer of the reconciliation. Think of these values as count of the number of tokens transacted.
Getting US Dollars from SpotPrice and Token Count
So, how do we get US dollars?
Simple — for each data item we multiply the
spotPrice per token by the
nTokens, which is the value in the data itself.
5.000 wETH times a
spotPrice of 3,240.70642 = 16203.5321 which is the amount of wETH denominated in US dollars that we wanted to swap.
16,003.446778836992430933 DAI times 1.00 US dollar per DAI is the number of DAI we received from the swap.
And, finally, you’ll notice that there is an ‘unaccounted for’ difference between what we sent and what we got in return.
Some people call this slippage. This is not surprising, but it’s annoying and…“The rent is too high!”
I’m incredulous — it cost me 200.085321163007569 US dollars to swap money with myself in a completely programmatic way?
“The freaking rent is too damn high!”
Where Exactly Did the Money Go?
Being anal retentive, like my father, it wasn’t enough for me to know that I had spent $200.00. I wanted to know exactly where it went.
Let’s go back to the command line. Do this command:
chifra transactions 13071849.239 --uniq
This will return all the unique addresses that appear in the given transaction. You should get these results (we’ve cleaned this up, your result may vary):
Let’s see if we can name them. Run
chifra names against each address to get these results:
0x11ededebf63bef0ea2d2d071bdf88f71543ec6fb Metamask Fees
0x6b175474e89094c44da98b954eedeac495271d0f Dai Stablecoin
0x60594a405d53811d3bc4766596efd80fd545a270 Uniswap V3: DAI
0x881d40237659c251811cec9c364ef91dc08d300c Metamask Swap Router
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 Wrapped Ether
0xdef1c0ded9bec7f1a1670819833240f027b25eff 0x Exchange Proxy
0xf503017d7baf7fbc0fff7492b751025c6a78179b TrueBlocks WalletNo results for 0x74de5d4fcbf63e00296fd95d33236b9794016631
No results for 0x3d1d55c23dfc759c5ae48500ca88ddf477b3c9e5
No results for 0x47f01db18a38261e4cb153bae6db7d3743acb33c
No results for 0xfffd8963efd1fc6a506488495d951d5263988d25
You’ll notice that four of the addresses are un-named. That’s not a problem. Obviously, TrueBlocks can’t know every name of every address. Also, just be aware that some of these “addresses” may not even be addresses — they may just appear to be addresses. This is why we frequently speak of appearances instead of addresses. Sometimes, during creation of our index, we simply cannot tell if something is an address or if it just appears to be an address, so we include it anyway. No harm. No foul.
If you look more closely at the named addresses, you’ll see that all but one make sense.
Obviously, the TrueBlocks wallet is present in the transaction.
Obviously also, DAI and wETH are present — this is what we were swapping.
The three routers and/or proxies also make sense (Uniswap, Metamask Swap Router, 0x Exchange). One must complete the swap somewhere, after all.
But, let’s start with the first item in the list: MetaMask Fees.
Let’s see what we can see. Run this command:
chifra transactions 13071849.239 --reconcile \
0x11ededebf63bef0ea2d2d071bdf88f71543ec6fb --fmt json
This is the same command we ran above, but now we’re showing the reconciliation for the MetaMask Fee wallet address. This command returns results similar to these:
You’ll notice that the
spotPrice is the same as the previous data. This is to be expected as this is the same transaction.
The amount the MetaMask Fee address took in during this transaction equals the
spotPrice (3,240.70642 US dollars per ETH) multiplied by 0.043750000000000000 ETH which equates to 141.780905875 US dollars.
I don’t know about you, but that feels like a lot of money to me. My wife, after some Stephen Colberic finger tapping,
tells me that’s 87.5 basis points (we confirmed this number on MetaMask’s website).
She says she would have advised her clients to find a cheaper solution.
We did a quick and dirty calculation on the web to see how much it would cost us to exchange US dollars to Euro in the regular, old-fashioned, 200 year old FAIT system, and it was much lower. WTF!
We are in the process of writing a companion article to this series where we look at how much income the MetaMask Fees contract makes in a single day. Look for that.
What About the Rest?
The above calculations leave 58.304415288007569 still unaccounted for. Where did money that go? Looking at the above image, you can see we paid $13.30 to the miner in gas fees, leaving 45.004415288007569 that went to UniSwap and its liquidity providers. I’ll leave it as an exercise for the interested reader to dig deeper.
In any case, “The rent is too damn high!”
Alright, we admit it we punted on the final resolution above, but you get the idea: TrueBlocks is amazing.
Okay. I’m done. This article is too damn long.
Support Our Work
If you like this article or you simply wish to support our work go to our GitCoin grant https://gitcoin.co/grants/184/trueblocks. Donate to the next matching round. We get the added benefit of a larger matching grant. Even small amounts have a big impact.
If you’d rather, please send ETH or any other token to our public Ethereum address
Thanks for reading…stay tuned for more.
Join Coinmonks Telegram Channel and learn about crypto trading and investing
Best crypto exchange | Top 10 cryptocurrency exchanges in 2021
Crypto trading on the cryptocurrency exchanges requires knowledge about the market, which can help you gain profit…
9 Best Crypto Lending Platforms in 2021
When it comes to cryptocurrency lending, tons of factors equate to a good earning profile. Also, the borrowing part of…
Best Crypto Trading Bots (FREE and Paid) in 2021
Best crypto trading bots for Binance, Coinbase, Kucoin, and other crypto exchanges in 2021. Quadency, Bitsgap…
Best 4 Crypto Trading Signals Telegram Channels
It is tedious to find the right crypto trading signals provider. So, in this article, we will be talking about the best…
BlockFi Review 2021: Pros, Cons and Interest Rates
Today, we came up with a comprehensive BlockFi review, a crypto lending platform founded in 2017 and has its…
How to Buy Bitcoin in India? 7 Best Apps to Buy Bitcoin 2021 [Mobile Version]
How to buy Bitcoin India using a Mobile App
Crypto Tax Software — Top 5 Best Bitcoin Tax Calculators 
Whether you’re new to crypto or if you have been in the space for a while, you’ll need to pay taxes.
Pionex Review - Simple trading bots for passive traders
In this article, we will review Pionex, which provides crypto trading bot automation tools integrated with an…