repowisecoinbase/cb-mpc

Code health of coinbase/cb-mpc

Repowise scores coinbase/cb-mpc at 7.8 out of 10 for code health, which reads as good, alongside maintainability 9.1 and static performance 10.0 on the same scale. There are 567 open findings across the three pillars, and the lowest-scoring file is ec_dkg.cpp at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

39 critical, 142 high, 242 medium, 138 low.

Hotspots

4 files are flagged as hotspots. The top 4:

  • tests/unit/crypto/test_base_ecc.cpp: 3 commits in the last 90 days from 2 contributors
  • tests/unit/core/test_convert.cpp: 3 commits in the last 90 days from 2 contributors
  • src/cbmpc/protocol/ec_dkg.cpp: 3 commits in the last 90 days from 2 contributors
  • src/cbmpc/crypto/base_ecc.cpp: 3 commits in the last 90 days from 2 contributors

Lowest-scoring files

  • src/cbmpc/protocol/ec_dkg.cpp: 1.0 out of 10 with 4 bug fixes in the last 180 days
  • src/cbmpc/crypto/secret_sharing.cpp: 1.0 out of 10 with 3 bug fixes in the last 180 days
  • src/cbmpc/zk/zk_paillier.cpp: 1.3 out of 10 with 2 bug fixes in the last 180 days
  • src/cbmpc/protocol/ecdsa_mp.cpp: 3.0 out of 10 with 2 bug fixes in the last 180 days
  • src/cbmpc/protocol/ot.cpp: 3.0 out of 10 with 1 bug fix in the last 180 days

Checked against bug fixes

Of the 20 files Repowise scores lowest, 17 had a bug fix in the last 180 days. Across all 351 scored files, 31.9% had a bug fix in that window.

Dead code and refactoring

Repowise found 496 unused exports. 6 refactoring targets across 6 files would raise the score.

More on cb-mpc: summary and FAQ, codebase overview, architecture.

Related guide: Best dead code detection tools by language