
Table 1: Accuracy of models.
Nr Model Parameters Accuracy
1 OCSVM → IForest Tx ν = 0.1, γ = 0.0001, b = 0.01, t = 125, ψ = 2048 90.00%
2 OCSVM → IForest Tx Cleared ν = 0.1, γ = 0.0001, b = 0.01, t = 125, ψ = 2048 79.51%
3 OCSVM → IForest DDOS ν = 0.05, γ = 0.001, b = 0.01, t = 125, ψ = 64 75.89%
4 OCSVM → IForest DDOS ν = 0.05, γ = 0.001, b = 0.01, t = 125, ψ = 128 79.46%
5 OCSVM → IForest DDOS ν = 0.05, γ = 0.001, b = 0.1, t = 125, ψ = 64 79.46%
6 OCSVM → IForest DDOS ν = 0.05, γ = 0.001, b = 0.1, t = 125, ψ = 128 79.46%
7 IForest → OCSVM DDOS ν = 0.05, γ = 0.001, b = 0.1, t = 125, ψ = 64 79.46%
Table 2: ROC AUC and PR AUC for DDOS detection mod-
els.
Model ROC AUC PR AUC
OCSVM model 4. and 5. 0.9848 0.9807
Isolation Forest model 3. 0.8096 0.7795
Isolation Forest model 4. 0.8547 0.8360
Isolation Forest model 5. 0.8096 0.7795
Isolation Forest model 6. 0.8547 0.8360
est. For best hyperparameters, Isolation Forest does
not change the output of OCSVM. In conclusion,
OCSVM could be a good predictor alone, without the
Isolation Forest model, it should be noted, however,
that if there had been many more vectors in the train-
ing and test datasets, the results might have been dif-
ferent.
ZkSync, with all system contracts and options of
interaction within the network, is not straightforward.
Transactions can be used for minting, complex swaps
or any other call to smart contract logic. Hence, ma-
chine learning methods here are not so easy to settle.
A fine idea would be to target the search for anoma-
lies to a specific case, such as dust attacks or detection
of ponzi contracts and money laundering schemes.
OCSVM model can be used as the filtering layer of
data that can later be fed to other algorithms. How-
ever, OCSVM is very complex and its use on large
datasets should be well thought out. Isolation Forest,
on the other hand, is extremely fast. In the future,
different machine learning algorithms might be ex-
plored in the detection of anomalies on ZkSync and
Ethereum blockchains. In addition, models could fo-
cus on smart contract analysis and decoded transac-
tion inputs.
REFERENCES
Apiecionek, Ł. and Karbowski, P. (2024). Fuzzy neural net-
work for detecting anomalies in blockchain transac-
tions. Electronics, 13(23):4646.
Goix, N. (2016). How to evaluate the quality of unsuper-
vised anomaly detection algorithms? arXiv preprint
arXiv:1607.01152.
Hofmann, T., Schölkopf, B., and Smola, A. J. (2008). Ker-
nel methods in machine learning. The Annals of Statis-
tics, 36(3).
Iglewicz, B. and Hoaglin, D. C. (1993). Volume 16: how to
detect and handle outliers. Quality Press.
Kannan, K. S., Manoj, K., and Arumugam, S. (2015). La-
beling methods for identifying outliers. International
Journal of Statistics and Systems, 10(2):231–238.
Liu, F. T., Ting, K. M., and Zhou, Z.-H. (2008). Isolation
forest. In 2008 Eighth IEEE International Conference
on Data Mining, pages 413–422.
Liu, F. T., Ting, K. M., and Zhou, Z.-H. (2012). Isolation-
based anomaly detection. ACM Transactions on
Knowledge Discovery from Data (TKDD), 6(1):1–39.
MatterLabs (2024). Zksync docs,
https://docs.zksync.io/zksync-protocol.
Messias, J., Gogol, K., Silva, M. I., and Livshits, B. (2024).
The writing is on the wall: Analyzing the boom
of inscriptions and its impact on evm-compatible
blockchains. arXiv preprint arXiv:2405.15288.
Park, Y. and Kim, Y. (2023). Visualization with prediction
scheme for early ddos detection in ethereum. Sensors,
23(24):9763.
Rezapour, M. (2019). Anomaly detection using unsuper-
vised methods: credit card fraud case study. Inter-
national Journal of Advanced Computer Science and
Applications, 10(11).
Sayadi, S., Rejeb, S. B., and Choukair, Z. (2019). Anomaly
detection model over blockchain electronic transac-
tions. In 2019 15th international wireless commu-
nications & mobile computing conference (IWCMC),
pages 895–900. IEEE.
Schölkopf, B., Platt, J., Shawe-Taylor, J., Smola, A., and
Williamson, R. (2001). Estimating support of a
high-dimensional distribution. Neural Computation,
13:1443–1471.
Silva, M. I., Messias, J., and Livshits, B. (2024). A
public dataset for the zksync rollup. arXiv preprint
arXiv:2407.18699.
Škvára, V., Pevn
`
y, T., and Šmídl, V. (2023). Is auc the best
measure for practical comparison of anomaly detec-
tors? arXiv preprint arXiv:2305.04754.
Thakker, Z. L. and Buch, S. H. (2024). Effect of feature
scaling pre-processing techniques on machine learn-
ing algorithms to predict particulate matter concentra-
tion for gandhinagar, gujarat, india.
SECRYPT 2025 - 22nd International Conference on Security and Cryptography
570