SoumilB7's picture
Update README.md
75f70c0 verified
|
raw
history blame
3.45 kB
metadata
language:
  - en
license: apache-2.0
tags:
  - Aptos
  - Move
  - Llama3
  - Blockchain
  - SmartContract

Uploaded model

  • Name: L3_8B_Aptos_Smart_Contract_Analyser
  • Organization: Armur
  • Project: Aptos Smart Contract Audit
  • License: apache-2.0
  • language: en

Usage


from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = "PATH_TO_THIS_REPO"

tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
    model_path,
    device_map="auto",
    torch_dtype='auto'
).eval()

# Prompt content: "hi"
messages = [
    {"role": "user", "content": Move_Smart_Contract}
]

input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
output_ids = model.generate(input_ids.to('cuda'))
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)

# Model response: "-- Vulnerabilites --"
print(response)

L3_8B_Aptos_Smart_Contract_Analyser

L3_8B_Aptos_Smart_Contract_Analyser is a cutting-edge AI model designed for comprehensive analysis and security auditing of smart contracts on the Aptos blockchain. We utilized the ArmurAI/L3_8B base model, enhanced it with extensive knowledge of Aptos-specific vulnerabilities and best practices, and fine-tuned it with a vast dataset of both secure and vulnerable smart contracts.

Key Features of L3_8B_Aptos_Smart_Contract_Analyser:

Advanced Vulnerability Detection

Identifies critical security flaws in Aptos smart contracts:

  • Reentrancy vulnerabilities specific to Aptos' resource-oriented architecture
  • Unauthorized access to sensitive functions or resources
  • Integer overflow/underflow issues in financial calculations
  • Improper error handling that could lead to unexpected contract behavior
  • Resource exhaustion attacks unique to Aptos' gas model

Move-Specific Security Analysis

Leverages deep understanding of the Move language to detect:

  • Incorrect usage of Move's ownership and borrowing rules
  • Potential violations of linear logic principles in resource management
  • Unsafe type casting or conversions that could compromise contract integrity

Aptos Module Interaction Auditing

Identifies risks in inter-module interactions:

  • Unauthorized calls to privileged functions in other modules
  • Potential front-running vulnerabilities in multi-step operations
  • Inconsistent state management across module boundaries

Tokenomics and Access Control Verification

Scrutinizes:

  • Flaws in token distribution mechanisms that could lead to unfair advantages
  • Weaknesses in role-based access control implementations
  • Potential centralization risks in governance structures

Smart Contract Upgrade Vulnerabilities

Detects:

  • Insecure upgrade patterns that could lead to loss of funds or contract takeover
  • Inconsistencies between different versions of upgraded contracts
  • Potential backdoors or hidden admin functions in upgradeable contracts By incorporating these features, L3_8B_Aptos_Smart_Contract_Analyser not only enhances the security of your Aptos smart contracts but also improves their efficiency and quality. Whether you're a seasoned Aptos developer or new to the ecosystem, our model provides invaluable support throughout your development lifecycle.

For more details and to access the tool, visit the ArmurAI GitHub repository.