Decentralized finance (DeFi) protocols are crypto projects developed on the
blockchain to manage digital assets. Attacks on DeFi have been frequent and
have resulted in losses exceeding \77billion.However,detectionmethodsformaliciousDeFieventsarestilllacking.Inthispaper,weproposeDeFiTail,thefirstframeworkthatutilizesdeeplearningtodetectaccesscontrolandflashloanexploitsthatmayoccuronDeFi.SincetheDeFiprotocoleventsinvolveinvocationswithmulti−accounttransactions,whichrequiresexecutionpathunificationwithdifferentcontracts.Moreover,tomitigatetheimpactofmistakesinControlFlowGraph(CFG)connections,wevalidatethedatapathbyemployingthesymbolicexecutionstack.Furthermore,wefeedthedatapathsthroughourmodeltoachievetheinspectionofDeFiprotocols.ExperimentalresultsindicatethatDeFiTailachievesthehighestaccuracy,with98.39accesscontroland97.43enhancedcapabilitytodetectmaliciouscontracts,identifying86.67fromtheCVEdataset.