Magickbase / godwoken_explorer

Godwoken Explorer
https://v1.gwscan.com
18 stars 8 forks source link

Transaction history (ERC20 Transfers) bug #245

Open Keith-CY opened 2 years ago

Keith-CY commented 2 years ago

I am able to see the harvested transaction in YOK value under ERC20 Transfers. This is good news however some of the transactions are showing in very big number ( For Example. I highlighted in yellow color). I think that is bug. Can you ask your IT team to check this. I never did that kind of big transactions. image

I already contacted the Discord Nervos support. They asked me to create an issues here.

I am just giving another example...I harvested 752428.64 KOI coin from the FARM but it's showing this 752,428,644,318,517,289,424,985 number in ERC20 Transfers transactions.

Ref: original

Keith-CY commented 2 years ago

752428.64 KOI is displayed as 752,428,644,318,517,289,424,985 because KOI team has not registered their token (as YOKAI) so the source code is not verified.

Data of an ERC20 transfer in an unverified contract will be intact(raw transfer value without decimals and symbol), so the number of value could be extreme large, once KOI has registered their contract, the number will be treated as a valid ERC20 transfer.

I'll contact them and verify the contract ASAP.

Keith-CY commented 2 years ago

I've contacted with KOI team and they will register their token soon.

shilohusa commented 2 years ago

@Keith-CY Thanks for the KOI updates. But I do still see few transactions for the YOK as well.

One more thing. I need to file my tax. Because of that I manually prepared the CSV sheet for the December month which I harvested from the farm. Now my question is, is there a way to get a daily average price for the YOK coin in December month?

If not, what was the High price($) and low price ($) for the YOK coin in December month? Also, what was the IDO price in $?

Keith-CY commented 2 years ago

But I do still see few transactions for the YOK as well.

Please append those transactions in this issue so that we can locate the problem with on-chain information.

is there a way to get a daily average price for the YOK coin in December month?

Godwoken explorer now focuses on delivering on-chain data friendly, but fiat prices are not so necessary that won't be supported this year.

Yokai team may be helpful, and you can consult with them in discord, I think they should care about the price and have statistical and historical data.

shilohusa commented 2 years ago

@Keith-CY , Thanks. I have attached the screenshot. image

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

Please let me know, if you need anything.

shilohusa commented 2 years ago

@Keith-CY , Someone shared me this URL to check the price.

https://avedex.cc/token/0xb02c930c2825a960a50ba4ab005e8264498b64a0-nervos

Is this legit site?

Keith-CY commented 2 years ago

@Keith-CY , Thanks. I have attached the screenshot. image

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

Please let me know, if you need anything.

Thanks, @shilohusa. The to of this transaction is recognized as a smart contract but not registered yet. I'll try to contact its developer and update the token info soon.

Keith-CY commented 2 years ago

@Keith-CY , Someone shared me this URL to check the price.

avedex.cc/token/0xb02c930c2825a960a50ba4ab005e8264498b64a0-nervos

Is this legit site?

I'm checking it with yokai team

shilohusa commented 2 years ago

Thanks @Keith-CY

Keith-CY commented 2 years ago

@Keith-CY , Someone shared me this URL to check the price.

avedex.cc/token/0xb02c930c2825a960a50ba4ab005e8264498b64a0-nervos

Is this legit site?

Yokai team doesn't reply to me, but I've found that this link appeared many times in their discord while the administrator didn't refute it, so I think it should be advisable and yokai team doesn't want to specify it officially.

shilohusa commented 2 years ago

Thanks.

On Sun, Mar 6, 2022 at 3:56 AM Chen Yu @.***> wrote:

@Keith-CY https://github.com/Keith-CY , Someone shared me this URL to check the price.

avedex.cc/token/0xb02c930c2825a960a50ba4ab005e8264498b64a0-nervos

Is this legit site?

Yokai team doesn't reply to me, but I've found that this link appeared many times in their discord while the administrator didn't refute it, so I think it should be advisable and yokai team doesn't want to specify it officially.

— Reply to this email directly, view it on GitHub https://github.com/nervina-labs/godwoken_explorer/issues/245#issuecomment-1059921849, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYBE5A4IXKZLJLP6T6K5LATU6RXNTANCNFSM5PZGGICQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

Keith-CY commented 2 years ago

Hi @shilohusa , the KOI token has been registered as https://github.com/nervina-labs/godwoken_explorer/issues/264 and transfer records should be displayed correctly now.

I also checked this token with yokai team

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

It's a lp token minted by contract so the token info are derived from contract calls, I'm now learning their contract and will update those info soon.

shilohusa commented 2 years ago

Awesome, thanks for the update!

On Wed, Mar 9, 2022 at 10:23 PM Chen Yu @.***> wrote:

Hi @shilohusa https://github.com/shilohusa , the KOI token has been registered as #264 https://github.com/nervina-labs/godwoken_explorer/issues/264 and transfer records should be displayed correctly now.

I also checked this token with yokai team

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

It's a lp token that can derive token info from the contract, I'm now learning their contract and will update those info soon.

— Reply to this email directly, view it on GitHub https://github.com/nervina-labs/godwoken_explorer/issues/245#issuecomment-1063613021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYBE5A47LNRSBJEOZICYYEDU7FTLJANCNFSM5PZGGICQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

shilohusa commented 2 years ago

Hi @shilohusa , the KOI token has been registered as #264 and transfer records should be displayed correctly now.

I also checked this token with yokai team

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

It's a lp token minted by contract so the token info are derived from contract calls, I'm now learning their contract and will update those info soon.

@Keith-CY , Did you get a chance to check this (9,764,019,388,370,786)? For me this is the only item is pending to add this transaction to my tax filing. At least, if you give me the transaction details here that will be good. You can fix this issue later.

Keith-CY commented 2 years ago

Hi @shilohusa , the KOI token has been registered as #264 and transfer records should be displayed correctly now. I also checked this token with yokai team

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

It's a lp token minted by contract so the token info are derived from contract calls, I'm now learning their contract and will update those info soon.

@Keith-CY , Did you get a chance to check this (9,764,019,388,370,786)? For me this is the only item is pending to add this transaction to my tax filing. At least, if you give me the transaction details here that will be good. You can fix this issue later.

Sorry for replying late, as mentioned above, it's an lp token and I'm trying to decode its info, but it's kinda outside of our plan so the info won't be unveiled recently.

For this specific transaction, I'll check it with Yokai Team today and add it here ASAP.

Keith-CY commented 2 years ago

Hi @shilohusa , the KOI token has been registered as #264 and transfer records should be displayed correctly now. I also checked this token with yokai team

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

It's a lp token minted by contract so the token info are derived from contract calls, I'm now learning their contract and will update those info soon.

@Keith-CY , Did you get a chance to check this (9,764,019,388,370,786)? For me this is the only item is pending to add this transaction to my tax filing. At least, if you give me the transaction details here that will be good. You can fix this issue later.

Hi @shilohusa , I've confirmed that the lp token is YOK-CKB LP

shilohusa commented 2 years ago

Hi @shilohusa , the KOI token has been registered as #264 and transfer records should be displayed correctly now. I also checked this token with yokai team

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

It's a lp token minted by contract so the token info are derived from contract calls, I'm now learning their contract and will update those info soon.

@Keith-CY , Did you get a chance to check this (9,764,019,388,370,786)? For me this is the only item is pending to add this transaction to my tax filing. At least, if you give me the transaction details here that will be good. You can fix this issue later.

Hi @shilohusa , I've confirmed that the lp token is YOK-CKB LP

@Keith-CY , I understand, that is LP token. But I need to mention the actual number of coins (YOK,CKB) used to get that LP in my tax file. Can you please send me the number of YOK and number of CKB used in the LP conversion.

Keith-CY commented 2 years ago

Hi @shilohusa , the KOI token has been registered as #264 and transfer records should be displayed correctly now. I also checked this token with yokai team

Transaction number - 0xd58d34615dfcaf0f9ac74e5d60f24107aabfd80655e1c38d949d7ac369a04601 Timestamp - 2021/12/05 08:05:15 On the header pager (ERC20) - Value is showing as 9,764,019,388,370,786

It's a lp token minted by contract so the token info are derived from contract calls, I'm now learning their contract and will update those info soon.

@Keith-CY , Did you get a chance to check this (9,764,019,388,370,786)? For me this is the only item is pending to add this transaction to my tax filing. At least, if you give me the transaction details here that will be good. You can fix this issue later.

Hi @shilohusa , I've confirmed that the lp token is YOK-CKB LP

@Keith-CY , I understand, that is LP token. But I need to mention the actual number of coins (YOK,CKB) used to get that LP in my tax file. Can you please send me the number of YOK and number of CKB used in the LP conversion.

I'm afraid that you have to check the data manually. I consulted with Yokai but they don't have detailed orders, while data filters in GwScan are not in high priority too so we cannot export those desired transactions for now.

WhiteR4bbitt commented 1 year ago

Hey, I noticed this issue on testnet on a very basic contract deploy I did, testing out a few other things using pCKB. It has a custom Transfer embedded which is the one being way off, native transfer displayed correct. Method 4 (bugged): https://v1.testnet.gwscan.com/tx/0x07da19f290570d0f1287d43f5e562ab215125fd86c9bc1e901649949933e598f

Screenshot at the bottom for reference

I was looking to see if GW Scan could track when only .call is used or would an Event need to be added? I know I read about archive nodes being able to track this, but maybe its costly? Method 3 (just the .call): https://v1.testnet.gwscan.com/tx/0x593f386f03e63d1abf75a587c8832ce9aeb6415cc493be396b4fc635af3d0a6a

Part of this test was looking at gas costs (Native transfer has the lowest gas) Method 1 (no number): https://v1.testnet.gwscan.com/tx/0x16aabb1ce71daf3045a9d471908c3c590076dcc9e06a3dfb54e27a8d6143c195

Here is the basic contract with the wrong value as well: https://v1.testnet.gwscan.com/account/0x9AdA9b71207B4dDfaC9669816f2849D25FE227Cd?tab=erc20

Here is a screenshot of the code: image

This is the TX from method 2 https://v1.testnet.gwscan.com/tx/0xed95844b024fa66cba2fc9ff9aea268e8c4b9450b2c05e00b07b3d5197450263

Keith-CY commented 1 year ago

Hey, I noticed this issue on testnet on a very basic contract deploy I did, testing out a few other things using pCKB. It has a custom Transfer embedded which is the one being way off, native transfer displayed correct. Method 4 (bugged): v1.testnet.gwscan.com/tx/0x07da19f290570d0f1287d43f5e562ab215125fd86c9bc1e901649949933e598f

Screenshot at the bottom for reference

I was looking to see if GW Scan could track when only .call is used or would an Event need to be added? I know I read about archive nodes being able to track this, but maybe its costly? Method 3 (just the .call): v1.testnet.gwscan.com/tx/0x593f386f03e63d1abf75a587c8832ce9aeb6415cc493be396b4fc635af3d0a6a

Part of this test was looking at gas costs (Native transfer has the lowest gas) Method 1 (no number): v1.testnet.gwscan.com/tx/0x16aabb1ce71daf3045a9d471908c3c590076dcc9e06a3dfb54e27a8d6143c195

Here is the basic contract with the wrong value as well: v1.testnet.gwscan.com/account/0x9AdA9b71207B4dDfaC9669816f2849D25FE227Cd?tab=erc20

Here is a screenshot of the code: image

This is the TX from method 2 v1.testnet.gwscan.com/tx/0xed95844b024fa66cba2fc9ff9aea268e8c4b9450b2c05e00b07b3d5197450263

I get the points are as follows

the (bugged) method 4

payable(receiver).call{value}("")
emit Transfer(address(this), receiver, value)

is recognized as an unknown ERC 20 transfer

Ref: https://v1.testnet.gwscan.com/tx/0x07da19f290570d0f1287d43f5e562ab215125fd86c9bc1e901649949933e598f


while other methods

method 1

IERC20(pCKB_address).transfer(receiver, value)

is correct

Ref: https://v1.testnet.gwscan.com/tx/0x16aabb1ce71daf3045a9d471908c3c590076dcc9e06a3dfb54e27a8d6143c195


method 2

payable(receiver).transfer{value}("")

is not recognized as a native transfer Ref: https://v1.testnet.gwscan.com/tx/0xed95844b024fa66cba2fc9ff9aea268e8c4b9450b2c05e00b07b3d5197450263


method 3

payable(receiver).call{value}("")

does nothing

Ref: https://v1.testnet.gwscan.com/tx/0x593f386f03e63d1abf75a587c8832ce9aeb6415cc493be396b4fc635af3d0a6a


For the bugged method 4, it's not a bug, it's just confusing. ERC20 transfers are decoded from events, and events can be manufactured, so the ERC20 transfer can be manufactured.

In this case, method 4 declares a Transfer(address, address, value), the event signature matches ERC20 Transfer events, so it's considered an ERC20 transfer inside the contract. , even the contract is not an ERC20 one. It's a known issue so users should pay attention to which contract emits the event.

For method 2, it's an internal transfer of the native token, so it's not reflected in the transaction directly. Some services, such as etherscan, use a modified node that emits events of internal transfers so they can be detected. But it costs a lot, and we cannot afford it now.

For method 3, a call method didn't change the internal state of a contract, so nothing happened.