mev-explore-public icon indicating copy to clipboard operation
mev-explore-public copied to clipboard

Misclassified txs with Aave liquidations

Open obadiaa opened this issue 4 years ago • 1 comments

We classified this Aave liquidation as $837k revenue https://etherscan.io/tx/0xa72072f5041bcde89c560ba12cc00b22a87779ee369dbff81a78bba26d35e989 when it's a (828.6k - 797.7k) DAI 'true' revenue. It seems we overlook the 'Liquidator Repay' step of the liquidation process

Other examples of the same issue: https://etherscan.io/tx/0xa6069cc7b53fb471fe6e27eec7aa3517cd28abe1fad5e031d8f5311013d854f0 (this is a 0 true revenue) and here: https://etherscan.io/tx/0x48d735b2dedcdc67ced30995b367c114221060f8bc2b0c1b85a6ee5513fe584d this is a (418k-398k)DAI true revenue

obadiaa avatar Feb 19 '21 04:02 obadiaa

Currently the first transaction has the following trace:

ActionTrace {
        action: Liquidation(
            Liquidation {
                sent_token: "DAI",
                sent_amount: 797740101413717113923069,
                received_token: "ETH",
                received_amount: 745789670529453028029,
                liquidated_user: "0x208b82b04449cd51803fae4b1561450ba13d9510",
                from: "KNOWN BOT",
            },
        ),
        trace_address: [
            0,
            6,
        ],
    },
    ActionTrace {
        action: Transfer(
            Transfer {
                from: "KNOWN BOT",
                to: "AAVE: Lending Pool Core",
                amount: 797740101413717113923069,
                token: "DAI",
            },
        ),
        trace_address: [
            0,
            6,
            0,
            3,
            17,
            0,
            0,
        ],
    },
    ActionTrace {
        action: WethDeposit(
            Deposit {
                from: "KNOWN BOT",
                amount: 745789670529453028030,
            },
        ),
        trace_address: [
            0,
            7,
        ],
    },
    ActionTrace {
        action: Trade(
            Trade {
                t1: Transfer {
                    from: "KNOWN BOT",
                    to: "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
                    amount: 745789670529453028030,
                    token: "WETH",
                },
                t2: Transfer {
                    from: "0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
                    to: "KNOWN BOT",
                    amount: 828665198429135509307125,
                    token: "DAI",
                },
            },
        ),
        trace_address: [],
    },
]

what exactly should change? Should the trade be added to the liquidation action in some way? Or is there something wrong with the evaluation?

ThomasdenH avatar Jan 19 '22 23:01 ThomasdenH