What is the LogFeeTransfer event?

In the source code of the MATIC token, one can see the below event:

    event LogFeeTransfer(
        address indexed token,
        address indexed from,
        address indexed to,
        uint256 amount,
        uint256 input1,
        uint256 input2,
        uint256 output1,
        uint256 output2
    );

After searching through the Polygon codebase I could not find a single place where this is emitted, nor much information about the event itself.
It seems to appear as the first event in the logs of a lot of transactions on Polygon.
Does anyone know what each uint256 actually represent? Or when this is emitted?

The corresponding topic hash is: 0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63

Acutally by taking an example (go to the event at the bottom of the page) it seems that:

  • input2 + amount = output2
  • input1 - amount ~ output1 this is true modulo a factor of 1024 for the txs I had a look at (so 1024, 2048, 3072)
    Could it be that it prints the balance before and after a transfer and the small discrepancy between input - amountandouput1` are the fees?

But then, one question remains: why is this event never emitted in the contract? When would that get emitted?

1 Like

The logfretransfer is a standard event in the ethrum blockchain echoosystem, that is often used to track the transfer of fees from smart contract or decentralized application.