arXiv ScienceSearch

arXiv subjects

Tao

Publications and source records attributed to Tao.

3 recordsLinked to original sources

CONTRACTFIX: A Framework for Automatically Fixing Vulnerabilities in Smart Contracts

The increased adoption of smart contracts in many industries has made them an attractive target for cybercriminals, leading to millions of dollars in losses. Thus, deploying smart contracts with detected vulnerabilities (known to developers) are not acceptable, and fixing all the detected vulnerabilities is needed, which incurs high manual labor cost without effective tool support. To fill this need, in this paper, we propose ContractFix, a novel framework that automatically generates security patches for vulnerable smart contracts. ContractFix is a general framework that can incorporate different fix patterns for different types of vulnerabilities. Users can use it as a security fix-it tool that automatically applies patches and verifies the patched contracts before deploying the contracts. To address the unique challenges in fixing smart contract vulnerabilities, given an input smart contract, \tool conducts our proposed ensemble identification based on multiple static verification tools to identify vulnerabilities that are amenable for automatic fix. Then, ContractFix generates patches using template-based fix patterns and conducts program analysis (program dependency computation and pointer analysis) for smart contracts to accurately infer and populate the parameter values for the fix patterns. Finally, ContractFix performs static verification that guarantees the patched contract is free of vulnerabilities. Our evaluations on $144$ real vulnerable contracts demonstrate that \tool can successfully fix $94\%$ of the detected vulnerabilities ($565$ out of $601$) and preserve the expected behaviors of the smart contracts.

cs.SE

N-Grammer: Augmenting Transformers with latent n-grams

Transformer models have recently emerged as one of the foundational models in natural language processing, and as a byproduct, there is significant recent interest and investment in scaling these models. However, the training and inference costs of these large Transformer language models are prohibitive, thus necessitating more research in identifying more efficient variants. In this work, we propose a simple yet effective modification to the Transformer architecture inspired by the literature in statistical language modeling, by augmenting the model with n-grams that are constructed from a discrete latent representation of the text sequence. We evaluate our model, the N-Grammer on language modeling on the C4 data-set as well as text classification on the SuperGLUE data-set, and find that it outperforms several strong baselines such as the Transformer and the Primer. We open-source our model for reproducibility purposes in Jax.

cs.CL

Nontriviality of Riesz--Morrey Spaces

In this article, the authors completely answer an open question, presented in [Banach J. Math. Anal. 15 (2021), no. 1, 20], via showing that the Riesz--Morrey space is truly a new space larger than a particular Lebesgue space with critical index. Indeed, this Lebesgue space is just the real interpolation space of the Riesz--Morrey space for suitable indices. Moreover, the authors further show the aforementioned inclusion is also proper, namely, this embedding is sharp in some sense, via constructing two nontrivial spare functions, respectively, on $\mathbb{R}^n$ and any given cube $Q_0$ of $\mathbb{R}^n$ with finite side length. The latter constructed function is inspired by the striking function constructed by Dafni et al. [J. Funct. Anal. 275 (2018), 577--603]. All the proofs of these results strongly depend on some exquisite geometrical analysis on cubes of $\mathbb{R}^n$. As an application, the relationship between Riesz--Morrey spaces and Lebesgue spaces is completely clarified on all indices.

math.FA