Claim: The function burnReturn() in Moolyacoin’s smart contract can steal your tokens.
Source: YouTube video by Bitboy Crypto
My Stake: Back claim by 100 Cred
BitBoy Crypto was paid to do an ICO review on Moolyacoin. The agreed upon payment was 50,000 tokens; BitBoy received 833,333 instead of 50,000. In this video, BitBoy shows a confirmed transaction of 833,333 tokens and a second for 50,000 tokens, in his wallet.
After the second transaction, the total amount in BitBoy’s wallet from Moolyacoin was 50,000 tokens. The tokens transferred by mistake, somehow, were recalled by Moolyacoin. BitBoy doesn’t mention the company’s name in the video, but leaves enough data and clues for viewers to investigate the aforementioned series of events, including the snippet of code from Moolycoin’s smart contact that contains a function named burnReturn().
Bitboy decided to rescind his offer to complete the ICO review and even pay the gas cost to return the 50,000 tokens. Bitboy mentioned this situation to a friend, Keith. In turn, Keith not only reviewed Moolyacoin’s smart contact, he wrote a Medium article on his findings. I found the article and read it several times.
Keith Mukai is a Python/DApp Developer and creator of ethTweet.me In his Medium article the function burnReturn(function) is explained line-for-line.
The code in the screen capture below, is from lines 369 - 376 of Moolyacoin’s smart contract on Etherscan which is the same code that BitBoy Crypto displayed in his video.
||The function takes as inputs an Ethereum address _addr and an integer _value. And even though this is a public function, it has an access modifier onlyOwner. This means that only the contract owner has permission to execute the function
|370 & 371
||Require calls checking to make sure that the address provided isn’t a blank address
||Subtracts _value number of MOOLYA tokens from the provided address’ balance. The contract owner is literally taking _addr’s tokens away.
||The subtracted tokens from line 372 are added to msg.sender’s balance. Someone else gets _addr’s MOOLYA! Who is the msg.sender? It’s the address that called burnReturn. And the only person who can call that function is the contract owner.
Keith’s explaining of function burnReturn() is void of errors. After double-checking Keith’s assessment, I reviewed Moolyacoin’s smart contact in its entirety (386 lines of code).
I’ll refrain from mentioning all of my finding as they are beyond the scope of this post and I want to avoid making swift assumptions. However, there’s something I noticed while reading the contract that I found curious.
Lines 1 - 342 are paired with detailed comments; the code on lines 342 - 386 for the following functions, are not commented:
It’s important to note that functions burnReturn() and burn() aren’t synonymous.