With the rapid development of global information technology, smart agriculture has gradually become an important force to promote agricultural modernisation. Taking Yangcheng Lake hairy crabs as the research object, this paper constructs a full-chain traceability process for hairy crabs integrating blockchain and Internet of Things technology in response to the demand for the enhancement of its brand value and market competitiveness. The model covers all aspects of breeding, processing, and transport to sales; realises end-to-end transparent regulation; effectively guarantees the authenticity and non-tamperability of information; and enhances consumers’ trust in the brand. At the technical level, this paper designs the ECMI (Enhanced Cuckoo Merkle Index) model, optimises the data storage and retrieval mechanism, and experimentally verifies the advantages of cuckoo filters over traditional Bloom filters in reducing false positives and improving query efficiency. This paper not only provides an efficient and safe traceability solution for the hairy crab industry in Yangcheng Lake but also provides technical support and practical cases for the further application of blockchain technology in smart agriculture, which is of great value for the realisation of the national rural revitalisation strategy.