A Reddit user found a Dapp called FomoSports and played it. He then saw that he was missing 80 TRX, that could not be justified in any way.
This is his address: TBhLhTP4Mscgj5gpMxfe6u1zsWQ3DzEGMi
How he explained it with his own words:
a) The deal is open a Tronlink wallet to receive 50 TRX to play, and after betting let person know to get another 100TRX.
b) My friend lost the 30TRX of the 50TRX then received another 100TRX. Then he played another 10×3 (30TRX) should have 90TRX left.
c) However, my friend told me that he only have 10TRX left in his Tronlink.
It is shown in these 3 screenshots below.
This is what happened:
This is because of the energy fees. The conversion values are listed below.
1 SUN = 0.000001 TRX
1 TRX = 1,000,000 SUN
Let’s break it down and look at the contract triggers on TronGrid.
Transaction 1: SUCCESSFUL(-20TRX) with Fee 2.869300 TRX
Transaction 2: SUCCESSFUL(-10TRX) with Fee 3.581450 TRX
Transaction 3: TIMED OUT with Fee 100TRX
Transaction 4: OUT OF ENERGY with Fee 3.549250 TRX
Transaction 5: OUT OF ENERGY with Fee 0TRX (no funds left)
Let’s sum it all up:
20 + 2.8693 + 10 + 3.58145 + 100 + 3.54925 = 140TRX
+10TRX still left in account = 150TRX (all accounted for)
The loss is mainly due to the 3rd contract trigger where the out of time exception occurred and this causes all the input energy to be spent as seen above. This seems very unfair because the actual running of said contract didn’t actually use that much energy (judging by the origin_energy_usage it should’ve been more like 4TRX charged).
The timed out with 100 TRX Fee was unexpected. This seems like a way for TRON to punish people for trying to run smart contracts that take too long to execute. Either that or it’s a bug in java-tron. You as a end user have no control over the smart contract and how it executes as it’s running on the Nodes of the super representatives.