Author contributions M.K. co-designed and implemented the overall strategy for the creation of the knock-in fly lines, designed and implemented the bioassays, the RT-qPCR experiments and the RMO analysis, performed statistical analyses and co-wrote the manuscript. S.C.G. designed and implemented the overall strategy for the creation of the knock-in fly lines, prepared the sequence data and metadata for the phylogenetic analyses, co-designed all other experiments, and co-wrote the manuscript. F.S. performed the structural modelling and docking site analyses. J.N.P. performed the phylogenetic, ancestral state and co-evolutionary analyses. K.I.V. conducted crosses, genotyping, and feeding experiments, and co-designed the qPCR experiments. J.M.A. and S.L.B. conducted crosses and genotyping, and feeding and sequestration experiments. A.P.H. performed the in vitro physiological experiments and sequestration analyses. T.M. conducted feeding experiments M.A. performed the RMO analysis with M.K., and conducted genotyping and feeding experiments. G.G. completed the RMO and ouabain dietary survival analyses. F.R. supervised the structural modelling and docking site analyses. S.D. oversaw and interpreted in vitro cell line analyses, helped to design the overall project and co-wrote the manuscript. A.A.A. helped to design the overall project, oversaw the in vitro physiological and sequestration experiments, and co-wrote the manuscript. N.K.W. led the overall collaboration, the project design and its integration, creation of fly lines and statistical analyses, and co-wrote the manuscript. Peer review information Nature thanks Joseph W. Thornton and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.Online content Any methods, additional references, Nature Research reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at