acceptodds
Under review as a conference paper at ICLR 2027

Can We Alert Smart-Contract Fraud Early? UniCast for Cross-Phase Multi-Fraud Forecasting

Abstract

Smart-contract-related fraud caused over US$14 billion in recorded financial losses in 2025 alone. Early warning is therefore crucial for mitigating such losses. However, such early warning remains significantly challenging since complex frauds typically span different phases of smart contracts, while behavioral evidence is inevitably sparse and inconclusive in the early warning stages. Prior methods either do not account for cross-phase inter-dependencies or suffer from limited prediction accuracy under sparse behavioral evidence. Meanwhile, they typically target specific fraud mechanisms, e.g. RugPull, limiting their applicability to diverse real-world fraud patterns. To address these challenges, we propose UniCast, a unified cross-phase framework for early fraud warning across multiple types of smart-contract frauds, including Rug Pull, Honeypot, Selling Restrictions, Fee Abuse, and Minting Abuse. Specifically, Cross-Phase Dependency Modeling first effectively captures and represents static-to-dynamic and dynamic-to-static inter-dependencies through bidirectional contrastive prediction. Then, the Early-Warning Classifier novelly addresses decision ambiguity under limited transaction observation by moving beyond single ambiguous decision space to separately parameterized benign and fraudulent representation spaces, each equipped with multiple subspace-specific anchors to characterize diverse behavioral patterns. Extensive experiments on the Multi-Fraud and RPHunter datasets demonstrate that UniCast achieves 98.1% early-warning accuracy, compared with 78.3% for the strongest baseline, RPHunter, while being 6.47 X faster in inference. We will release our code upon acceptance.

Primary area:
unsupervised, self-supervised, semi-supervised, and supervised representation learning
Keywords:
Smart-contract fraud, Early warning, Cross-phase dependency modeling, Bidirectional contrastive prediction, Dual-space classification.

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_DH1pOpenReview ↗
Rating
2
Confidence
2
Informativeness
1
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes UniCast, a unified cross-phase framework for early fraud warning across multiple types of smart-contract frauds, including Rug Pull, Honeypot, Selling Restrictions, Fee Abuse, and Minting Abuse. Specifically, Cross-Phase Dependency Modeling first captures and represents static-to-dynamic and dynamic-to-static inter-dependencies through bidirectional contrastive prediction. Then, the Early-Warning Classifier novelly addresses decision ambiguity under limited transaction observation by moving beyond a single ambiguous decision space to separately parameterized benign and fraudulent representation spaces, each equipped with multiple subspace-specific anchors to characterize diverse behavioral patterns. Extensive experiments on the Multi-Fraud and RPHunter datasets demonstrate that UniCast achieves 98.1% early-warning accuracy, compared with 78.3% for the strongest baseline, RPHunter, while being 6.47× faster in inference.

Critical strengths
  1. UniCast targets early warning for smart-contract fraud, covering five categories: Rug Pull, Honeypot, Selling Restrictions, Fee Abuse, and Minting Abuse, and constructs the Multi-Fraud dataset covering these five cross-phase fraud types.
  2. Cross-Phase Dependency Modeling (CPDM) performs bidirectional contrastive prediction between static contract code and dynamic transaction behavior.
  3. Early-Warning Classifier (EWC) learns separate representation spaces for benign and fraudulent contracts, each equipped with multiple anchors, and performs distance aggregation and normalization.
Critical weaknesses

Here is the reordered and translated version:

  1. The relationship between the proposed method and RPHunter is unclear. The paper states that RPHunter "simply concatenating separately encoded features," but it does not provide the specific implementation details of RPHunter, nor does it clarify whether UniCast still outperforms RPHunter under the same backbone. If UniCast's gains mainly come from a larger model or better features rather than CPDM/EWC, then the core contribution does not hold.
  2. The font formatting of symbols in Figure 1 is inconsistent with the symbols defined in the main text.
  3. Some columns in Table 2 include "%" while others do not. In addition, Precision, Recall, and F1 are sometimes abbreviated and sometimes written in full.
  4. Section 5.3 ABLATION STUDIES only contains average results and lacks the complete ablation experimental results. It is recommended to supplement the full experimental results.
  5. In Table 6, the proposed method has a larger number of parameters. Normally, a larger parameter count implies higher inference computation and latency. Why does the proposed method instead have lower latency? This raises doubts about what actually reduces the computational complexity, since as far as I know, the computational complexity of Transformer is relatively high.
  6. Section 5.4 is titled Runtime Analysis, but after discussing the inference latency in Table 6, the text abruptly jumps to the parameter sensitivity analysis (Suppl B.4). The two are logically unrelated, and the connective "At the same time" is used inappropriately. The sentence reads more like an appendix pointer than a substantive conclusion, disrupting the coherence of the section.
  7. Sections 7.1 and 7.2 lack periods at the end. In Section 5.2, "Generalization to other research domain." should be merged with the following paragraph into a single paragraph.
  8. In Equation (8), softmax_j is directly followed by a fraction without parentheses, causing ambiguity about the scope of the softmax. It also does not specify that σ_a is a temperature parameter, the range of j, or the constraint σ_a > 0.
  9. In Equation (2), the paper only refers to ϕ as "a nonlinear activation" without specifying the exact function.
  10. In the EWC section, the paper claims "generalizing well across NLP, CV, and Code tasks," but the main text only provides results on CIFAR-10H, CivilComments, and Devign.
Questions for authors
  1. Provide detailed ablation experiments.
  2. The method section needs to be rewritten; the formatting is inconsistent and the method section appears incomplete.
  3. If UniCast and RPHunter were matched in parameter count, would UniCast still outperform RPHunter? This is a critical control experiment that would directly test whether the core contribution holds.
1 comment
AuthorsOpenReview ↗

Response to Reviewer: Parameter-matched and component-wise comparisons support the contributions of CPDM and EWC over RPHunter; full ablation results and notation/units clarified; inference latency explained by training-only prediction heads; softmax/GELU details and additional cross-domain benchmarks added; section organization and copyediting corrected. For further details, please refer to the point-by-point rebuttal and the latest revised manuscript.

Thank you for the detailed comments. We added parameter-matched and component comparisons with RPHunter, expanded the ablation and runtime results, and clarified the method.

W1 & Q3. Comparison with RPHunter

RPHunter fuses contract and transaction representations through attention. UniCast uses CPDM to learn cross-phase dependencies through bidirectional prediction and EWC to classify contracts using separate benign and fraudulent reference spaces (Section 2 and Appendix C.3.1, pp. 3 and 22).

To test whether each component works independently, we added CPDM and EWC one at a time to the RPHunter backbone. Each improved F1 at all three observation ratios. At 20% observation, RPHunter’s F1 increased from 36.0% to 41.1% with CPDM alone and to 49.6% with EWC alone.

We also increased RPHunter’s parameter count to match UniCast’s. On Multi-Fraud, the parameter-matched RPHunter achieved 36.8%, 48.4%, and 70.2% F1 at 5%, 20%, and 50% observation, compared with 42.2%, 59.8%, and 74.7% for UniCast. UniCast’s lead at the same parameter count, together with the gains from adding each component separately, points to the model design as a key contributor to its performance. Both experiments are reported in Table 6 (p. 10).

W2 & W3. Notation and units

We clarified the notation for the static and dynamic features, their projections, and the class-specific distances in Figure 2 and Section 3. Table 7 reports parameter counts in thousands, memory in GiB, and latency in milliseconds. Table 16 reports CPU resident memory and peak GPU allocated memory separately in MiB.

W4 & Q1. Detailed ablation results

Table 14 (p. 18) now reports precision, recall, and F1 for each ablation variant at 5%, 20%, and 50% observation. Table 5 (p. 10) summarizes the F1 results.

W5. Parameter count and inference latency

UniCast has 629,081 parameters during training and uses 559,297 at inference. The difference comes from the two prediction heads, which are used only during training. In the single-sample GPU measurements, UniCast takes 3.93, 4.10, and 4.34 ms at 5%, 20%, and 50% observation. The GPU-adapted RPHunter takes 26.77, 27.19, and 28.04 ms, respectively (Table 16, p. 20). Appendix C.1 (p. 21) describes the timing protocol.

W6 & W7. Section organization and copyediting

Section 5.4 (p. 10) now points to the supplementary runtime measurements in Appendix B.5. We also revised the cross-domain paragraph in Section 5.2 and corrected the end punctuation in Sections 7.1 and 7.2.

W8 & Q2. Softmax and training objectives

The softmax in Eq. (8) normalizes over the JJ anchors within each class. Its inputs are −ηα,j/σa-\eta_{\alpha,j}/\sigma_a for j=1,…,Jj=1,\ldots,J, where σa>0\sigma_a>0 is the anchor-assignment temperature. Equation (12) specifies β>0\beta>0, and Eqs. (13)–(15) give the CPDM loss, the EWC loss, and the joint objective.

W9. Activation function

We specified GELU as the activation ϕ\phi immediately after Eq. (2) in Section 3.1 (p. 4).

W10. Cross-domain benchmarks

We added PCam, HateXplain, and DiverseVul to the image, text, and code evaluations, respectively. Tables 4 and 13 (pp. 9 and 17) report the results for the baseline configurations and their EWC variants.

Reviewer_J2qcOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper focuses on the early detection of smart-contract-related fraud. To achieve this goal, this paper proposes UniCast, a framework that can learn information from multiple types of smart contract fraud. Extensive experiments are carried out to verify the effectiveness of the proposed method in terms of both performance and efficiency.

Critical strengths
  1. This work addresses a valuable research problem.
  2. A well-designed model is proposed for early fraud detection.
  3. Extensive experiments are performed to verify the method.
Critical weaknesses
  1. Lack of training details. For example, the dataset split ratio is not provided.
  2. The comparison between the proposed method and CV/NLP baselines is questionable. The authors mention keeping only the baselines’ classification heads and leveraging their method for encoding. Nevertheless, they do not specify which baselines use the full model and which use merely the classification head. Moreover, the motivation for this comparison is ambiguous, since the classification head is not the primary contribution of most baselines.
  3. The dataset is somewhat small, and its positive-to-negative sample ratio may differ from real-world data distributions.
Questions for authors
  1. How many samples are used for training the proposed model?
  2. Which baselines employ the full model, and which ones use only the classification head?
3 comments
AuthorsOpenReview ↗

Response to Reviewer: training details and split ratio added; cross-domain comparison setup clarified; EWC consistently improves F1 across tasks; class-imbalance experiments added with UniCast achieving the highest F1; dataset size acknowledged for future expansion. For further details, please refer to the point-by-point rebuttal and the latest revised manuscript.

Thank you for your comments on the training setup, the cross-domain comparisons, and the evaluation under class imbalance.

W1 & Q1. Training sample size and data splits

We train UniCast on 764 Multi-Fraud contracts and use 256 contracts each for validation and testing. Each split contains equal numbers of fraudulent and benign contracts. All observation windows from a given contract stay in the same split. During each epoch, each training contract contributes one window at each of the three observation ratios.

We added the split ratio to Section 5 (p. 7). Appendix E.2–E.4 (pp. 27–28) describes the split, window construction, and training settings. We train for 30 epochs with AdamW, a learning rate of (3\times10^{-4}), and a batch size of 64. We average the results over three runs with seeds 2026, 2027, and 2028.

W2 & Q2. Cross-domain comparisons

Table 4 (p. 9) now lists each baseline alongside its EWC variant. In the fixed-feature comparisons, we freeze the feature extractor and train the classification head on its outputs. When the classification mechanism is integral to the method, we compare the complete pipeline with its EWC adaptation. For example, 50-Snapshot + EWC uses an EWC ensemble with calibration. Appendix D.4 (p. 26) describes these settings. The paired comparisons show how adding EWC affects the evaluated pipelines on image, text, and code tasks.

F1 improves in every reported pair. For example, MCInfoNCE improves from 50.4% to 61.4% on CivilComments, and SCL-CVD improves from 63.3% to 65.2% on Devign. The table below reports F1 (%). Table 13 (p. 17) also gives precision and recall.

MethodCIFAR-10HPCamCivilCommentsHateXplainDevignDiverseVul
50-Snapshot97.1—————
50-Snapshot + EWC97.5—————
MCInfoNCE95.272.050.452.031.549.0
MCInfoNCE + EWC96.072.861.452.651.349.8
AFR82.176.067.657.149.748.3
AFR + EWC86.276.568.257.859.049.0
HGAN4VD90.273.065.454.070.451.0
HGAN4VD + EWC91.073.574.154.572.452.0
SCL-CVD87.475.566.357.263.348.3
SCL-CVD + EWC88.275.967.057.565.249.0

W3. Dataset size and class imbalance

We agree that Multi-Fraud is relatively small (1,276 contracts), and we plan to expand it in future work. The prevalence of fraud can vary across deployment settings, so no single fraud-to-benign ratio represents all real-world settings. Our main contribution is the UniCast early-warning method. To assess how UniCast performs under class imbalance, we added experiments at fraud-to-benign ratios of 0.1:1, 0.3:1, and 0.5:1. UniCast achieves the highest F1 among the three methods compared at each tested class ratio and observation budget (Figure 4, p. 9).

Thank you for the authors’ response, which partially addresses my concerns. My questions regarding training sample scale and data splits have been resolved. I appreciate the additional experiments across different class ratios. Nevertheless, all evaluations are built upon small fraud detection datasets. I remain skeptical whether the proposed method can sustain strong performance in practical real-world deployments.

AuthorsOpenReview ↗

Response to R1

Thanks for your response. We understand your concern. We therefore designed an additional experiment to evaluate UniCast and RPHunter (same parameters) in a real-world setting.

We built a new dataset containing 9,974 recently active on-chain contracts. To ensure that the dataset contains fraudulent samples, we added 26 newly collected fraudulent contracts. This gives us a dataset of 10,000 contracts for the experiment.

In this experiment, we asked the following questions:

  1. How many true positives (TP) and false positives (FP) do UniCast and RPHunter (same parameters) report?
  2. How much inference time do UniCast and RPHunter (same parameters) require?

The results are shown in the following table:

Method5% TP5% FP5% latency (ms)20% TP20% FP20% latency (ms)50% TP50% FP50% latency (ms)Mean first-alert prefix (%)
UniCast2633.102623.192613.304.23%
RPHunter (same parameters)21425.1120324.9426424.878.95%

TP and FP are counted separately at each observation checkpoint. The mean first-alert prefix is calculated over the 26 known fraudulent contracts using their first positive prediction among the 5%, 20%, and 50% checkpoints. We inspected all samples flagged as fraudulent by either method and did not identify any additional fraudulent contracts among these alerts. Therefore, all confirmed true positives came from the 26 fraudulent contracts added to the dataset.

As shown in the table, UniCast identified all 26 known fraudulent contracts at the 5% observation checkpoint and had lower inference latency than RPHunter at all three checkpoints. These results show that UniCast provides earlier identification of the known fraudulent contracts and lower inference latency in this experiment.

We will add this experiment to Section B.6, "Real-world Performance" (p. 21), of the supplementary material, where more details will be provided.

Reviewer_ryjwOpenReview ↗
Rating
1
Confidence
2
Informativeness
2
Presentation
2
Soundness
1
Read review
Paper summary

UniCast combines deployment-time contract code with an observed sequence of transfer events to detect smart-contract fraud early. Its Cross-Phase Dependency Modeling module uses two auxiliary contrastive prediction tasks to learn static and dynamic representations. The Early-Warning Classifier maps their concatenation into separate benign and fraudulent spaces and compares distances to multiple learned anchors. The authors also introduce Multi-Fraud, a dataset covering five fraud mechanisms with 638 fraudulent and 638 benign contracts. Experiments on Multi-Fraud and RPHunter examine classification at different observation ratios, warning time, component ablations, and inference cost. Additional experiments evaluate the classifier on image, text, and code classification tasks.

Critical strengths
  1. The paper addresses a useful and well-motivated problem. Combining contract code with early transaction evidence is a sensible way to identify risks before substantial losses occur. Multi-Fraud broadens the evaluation beyond rug pulls to include honeypots, selling restrictions, fee abuse, and minting abuse. A common dataset and binary detection task across these mechanisms would be valuable for studying how well fraud detectors generalize across different forms of abuse.

  2. The reported results show improvements across several observation budgets, and the ablations give a useful picture of which components contribute. On Multi-Fraud, UniCast reaches an average F1 of 74.7 at the 50% observation ratio, compared with 61.8 for RugScreener and 54.4 for RPHunter. Removing dynamic-to-static prediction reduces F1 to 59.5, while replacing EWC with an MLP reduces it to 68.7. These results make both the representation objective and the classifier worth investigating.

Critical weaknesses
  1. The comparisons do not fully isolate the benefits of the proposed design choices. Table 5 shows that both prediction directions help CPDM, and that replacing EWC with an MLP or a shared-space classifier reduces performance. For CPDM, the remaining question is whether predicting features in both directions is better than a simpler objective that directly aligns the static and dynamic representations. Removing the prediction losses establishes their usefulness, but does not answer that question. A comparison with the same encoders, classifier, and training budget would clarify what the prediction task adds.

    For EWC, the gains could reflect the separate class spaces, additional classifier capacity, or both. The architecture and training procedure are described in Appendices D.3 and E.4, but the reported ablations do not establish that the MLP and shared-space alternatives have comparable parameter counts. I would like to know whether EWC retains its advantage after matching classifier capacity. This would make the case for separate class spaces more convincing, particularly because a nonlinear shared mapping can also learn class-dependent feature interactions.

  2. The early-warning results do not establish whether earlier alerts come at the cost of more false alarms. Under the rule in Appendix E.5, the first query that predicts fraud triggers an alert. Table 2 reports how often this happens before an incident and how early the alerts occur. Appendix B.1 also provides precision and recall at fixed observation ratios. Those results, however, do not tell us how many benign contracts trigger an alert at any point during the same sequential monitoring process.

    This distinction matters because a detector that flags contracts more readily can achieve higher pre-incident coverage and earlier alerts while also raising more false alarms. A useful comparison would hold fixed the fraction of benign contracts that ever triggers an alert, then compare warning times and pre-incident coverage, using thresholds selected on validation data. This would show whether UniCast offers a better balance between detecting fraud early and avoiding false alarms.

Questions for authors
  1. Could you compare CPDM’s bidirectional feature prediction with direct static–dynamic contrastive alignment, keeping the encoders, classifier, and training budget fixed?

  2. How do the parameter counts of EWC, the MLP, and the shared-space classifier in Table 5 compare? If they differ, does EWC retain its advantage when the alternatives are adjusted to have comparable capacity under the same training setup?

  3. Under the sequential protocol used in Table 2, what fraction of benign contracts ever triggers an alert? Could you compare warning lead time and pre-event coverage at matched false-alert rates, with thresholds selected on validation data? This would directly test whether EWC improves the intended early-warning tradeoff.

  4. Could you clarify the metric calculations and reconcile the reported values? In Table 8, RPHunter’s Rug Pull results at 5% observation give precision = 35.0, recall = 38.8, and F1 = 39.8, although consistent averaging would require F1≤(P+R)/2=36.9F1 \leq (P+R)/2 = 36.9. Table 2 also reports first-alert positions of 78.3% and 90.6% for Tokeer despite specifying a 50% observation window. Please explain the averaging conventions, the denominator and treatment of unalerted cases in the timing metric, and how the category averages in Tables 2 and 11 were obtained. Per-run results or evaluation counts would help distinguish reporting errors from differences in calculation.

  5. Could you clarify the experimental settings and data sources behind the results? Figure 7 is labeled “Simulated F1 (%)”, yet Appendix B.4 uses it to support the choice of default hyperparameters; are these measured results or illustrative values? Also, Tokeer’s F1 in Table 3 changes from 16.5 to 21.5 to 27.6 as the observation ratio increases, although Appendix C.3.1 describes it as a static bytecode-analysis method. Please explain whether the evaluated contracts, bytecode inputs, or baseline settings change across ratios, and provide the experimental evidence supporting Figure 7.

1 comment
AuthorsOpenReview ↗

Response to Reviewer: Ablations support CPDM; EWC retains advantage under matched capacity; UniCast shows lower early-warning FPR; metrics clarified and corrected; Figure 7 label was a placeholder with measured values; static and GNN baselines now separated. For further details, please refer to the point-by-point rebuttal and the latest revised manuscript.

Thank you for pointing out the errors in the original submission. We have uploaded a revised manuscript with the changes highlighted in red. We have also made our code, dataset, and trained checkpoints available in the anonymous repository linked in Section 7.1 (p. 11), so reviewers can inspect the implementation and check the reported results.

W1 (first part) & Q1. Bidirectional prediction ablation

In the ablation, we remove both prediction heads and their contrastive losses while keeping both input streams and feeding the same concatenated representation to EWC. With bidirectional prediction, F1 increases from 36.5% to 42.2% at 5% observation, from 39.4% to 59.8% at 20%, and from 56.7% to 74.7% at 50% (Tables 5 and 14, pp. 10 and 18).

W1 (second part) & Q2. Classifier capacity

The EWC, MLP, and shared-space heads have 59,713, 59,665, and 59,649 trainable parameters, respectively. The largest difference is 64 parameters, or about 0.11%. At 5% observation, their F1 scores are 42.2%, 16.1%, and 20.5%, respectively (Tables 5 and 14, pp. 10 and 18).

W2 & Q3. False positives during early warning

We added a comparison with RPHunter, our strongest cross-phase baseline, which also uses contract code and transaction data. At 20% observation, the false-positive rate shown in Figure 3 (p. 9) is about 15.3% for UniCast and 32.5% for RPHunter.

Q4. RPHunter’s F1 and warning-time metrics

For RPHunter on the Multi-Fraud Rug Pull subset at 5% observation, Table 9 (p. 16) reports 35.0% precision, 38.8% recall, and 36.8% F1. The corresponding entry in Table 3 should also read 36.8%.

Appendix B.1 (p. 15, Eqs. 16–20) defines the evaluation metrics. Pre-event coverage is the fraction of fraudulent contracts alerted before harm. For those contracts, we divide the time from deployment to the first alert by the time from deployment to harm, then average those fractions to obtain MFE. Contracts without a pre-harm alert remain in the coverage denominator and are excluded from the MFE average. The 78.3% and 90.6% MFE values in Table 2 are for Tokeer + GNN on Honeypot and Fee Abuse, respectively. The 50% observation budget is based on event count, while MFE is based on elapsed time.

Q5. Sensitivity plot and static baselines

We used AI assistance to format the sensitivity figure and inadvertently left the placeholder label “Simulated F1” in the submitted version. The plotted values come from measured runs. We checked each point against the original training logs and corrected the label in Figure 9 (p. 20). The three panels vary the prediction-loss weight, the number of anchors per class, and the anchor-assignment temperature, one at a time. The anonymous repository linked in Section 7.1 provides the code, dataset, and trained checkpoints for independent verification.

On the RPHunter dataset, static Tokeer scores 14.1% F1 at all three observation ratios. The values 16.5%, 21.5%, and 27.6% are for Tokeer + GNN, which also uses transaction data. The revised tables list the static versions of Tokeer and CRPWarner separately from their GNN-augmented variants (Tables 2–3 and 8–12).

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.