{"id":{"repo_id":"sjsu","oai_identifier":"oai:scholarworks.sjsu.edu:etd_projects-2360"},"canonical_url":"https://search.ndltd.org/etd/sjsu/oai:scholarworks.sjsu.edu:etd_projects-2360","repository":{"repo_id":"sjsu","name":"San Jose State University","base_url":"https://scholarworks.sjsu.edu/do/oai/"},"display":{"title":"Mitigating the Risk of Reentrancy Attack in Smart Contract Development","abstract":"Smart contracts, while revolutionizing the blockchain with their immutable nature, are prone to attacks such the reentrancy attack. This attack allows malicious adversaries to repeately enter a contract before previous executions are completed. SpartanScript, a custom dialect of Scheme, is a way for developers to write and develop contracts in an experimental blockchain environment like SpartanGold. Compared to cryptocurrencies that use a virtual machine to run on the blockchain, SpartanScript utilizes a simplified interpreter for rapid prototyping. However, SpartanScript does not have a way to detect and warn developers of reentrancy vulnerabilities. Hence, there is a need to implement reliable reentrancy prevention during smart contract development. This project modifies SpartanScript’s interpreter to check smart contract functions that deal with transactions and mark any reentrant vulnerabilities. The addition of new detection functions and the define-r expression checks for locks, modifiers, the checks-effects-interactions pattern, and other vulnerabilities. To demonstrate SpartanScript’s new prevention measures, various reentrancy attacks, such as basic, cross-function, and cross-contracts were created in contracts. Key strategies on how to detect such attacks are implemented in the interpreter so that it warns the developer when such vulnerabilities arises. The results showcased the modified SpartanScript’s ability to identify and mark most vulnerable contracts successfully.","abstract_html":"Smart contracts, while revolutionizing the blockchain with their immutable nature, are prone to attacks such the reentrancy attack. This attack allows malicious adversaries to repeately enter a contract before previous executions are completed. SpartanScript, a custom dialect of Scheme, is a way for developers to write and develop contracts in an experimental blockchain environment like SpartanGold. Compared to cryptocurrencies that use a virtual machine to run on the blockchain, SpartanScript utilizes a simplified interpreter for rapid prototyping. However, SpartanScript does not have a way to detect and warn developers of reentrancy vulnerabilities. Hence, there is a need to implement reliable reentrancy prevention during smart contract development. This project modifies SpartanScript’s interpreter to check smart contract functions that deal with transactions and mark any reentrant vulnerabilities. The addition of new detection functions and the define-r expression checks for locks, modifiers, the checks-effects-interactions pattern, and other vulnerabilities. To demonstrate SpartanScript’s new prevention measures, various reentrancy attacks, such as basic, cross-function, and cross-contracts were created in contracts. Key strategies on how to detect such attacks are implemented in the interpreter so that it warns the developer when such vulnerabilities arises. The results showcased the modified SpartanScript’s ability to identify and mark most vulnerable contracts successfully.","abstract_has_math":false,"creators":["Ngo, Eric"],"institution":null,"degree_name":"Master of Science in Computer Science (MSCS)","degree_level":null,"degree_discipline":"Computer Science","degree_department":null,"school":null,"contributors":["Thomas Austin","Katerina Potika","Genya Ishigaki"],"advisors":[],"committee_chairs":[],"committee_members":[],"year":null,"date_issued":"","date_published":null,"updated_at":"2026-11-26T14:03:10Z","subjects":["Blockchain","Reentrancy Attack","Smart Contract","Interpreter","Other Computer Engineering"],"languages":[],"rights":[],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier","label":"Identifier","values":["https://scholarworks.sjsu.edu/etd_projects/1359"],"render_values":[{"text":"https://scholarworks.sjsu.edu/etd_projects/1359","href":"https://scholarworks.sjsu.edu/etd_projects/1359","code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://doi.org/10.31979/etd.xzgk-twu8","outbound_label":"DOI","outbound_source":"dc:identifier","record_url":"https://doi.org/10.31979/etd.xzgk-twu8","record_label":"Repository record","record_kind":"doi","record_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Asjsu%3Aoai%3Ascholarworks.sjsu.edu%3Aetd_projects-2360","prefix":"oai_dc"},"source_record":{"url":"https://scholarworks.sjsu.edu/do/oai/?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Ascholarworks.sjsu.edu%3Aetd_projects-2360","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor","label":"Contributor","values":["Thomas Austin","Katerina Potika","Genya Ishigaki"]},{"key":"dc:creator","label":"Author","values":["Ngo, Eric"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.available","label":"Dc Date Available","values":["2025-05-22T07:00:00Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2024-01-01T08:00:00Z"]},{"key":"dc:type","label":"Dc Type","values":["Master's Project"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Computer Science"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science in Computer Science (MSCS)"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Blockchain","Reentrancy Attack","Smart Contract","Interpreter","Other Computer Engineering"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://doi.org/10.31979/etd.xzgk-twu8","https://scholarworks.sjsu.edu/etd_projects/1359"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Smart contracts, while revolutionizing the blockchain with their immutable nature, are prone to attacks such the reentrancy attack. This attack allows malicious adversaries to repeately enter a contract before previous executions are completed. SpartanScript, a custom dialect of Scheme, is a way for developers to write and develop contracts in an experimental blockchain environment like SpartanGold. Compared to cryptocurrencies that use a virtual machine to run on the blockchain, SpartanScript utilizes a simplified interpreter for rapid prototyping. However, SpartanScript does not have a way to detect and warn developers of reentrancy vulnerabilities. Hence, there is a need to implement reliable reentrancy prevention during smart contract development. This project modifies SpartanScript’s interpreter to check smart contract functions that deal with transactions and mark any reentrant vulnerabilities. The addition of new detection functions and the define-r expression checks for locks, modifiers, the checks-effects-interactions pattern, and other vulnerabilities. To demonstrate SpartanScript’s new prevention measures, various reentrancy attacks, such as basic, cross-function, and cross-contracts were created in contracts. Key strategies on how to detect such attacks are implemented in the interpreter so that it warns the developer when such vulnerabilities arises. The results showcased the modified SpartanScript’s ability to identify and mark most vulnerable contracts successfully."]},{"key":"dc:title","label":"Title","values":["Mitigating the Risk of Reentrancy Attack in Smart Contract Development"]}]}],"canonical_facts":{"dc:contributor":["Thomas Austin","Katerina Potika","Genya Ishigaki"],"dc:creator":["Ngo, Eric"],"dc:date.available":["2025-05-22T07:00:00Z"],"dc:date.created":["2024-01-01T08:00:00Z"],"dc:description.abstract":["Smart contracts, while revolutionizing the blockchain with their immutable nature, are prone to attacks such the reentrancy attack. This attack allows malicious adversaries to repeately enter a contract before previous executions are completed. SpartanScript, a custom dialect of Scheme, is a way for developers to write and develop contracts in an experimental blockchain environment like SpartanGold. Compared to cryptocurrencies that use a virtual machine to run on the blockchain, SpartanScript utilizes a simplified interpreter for rapid prototyping. However, SpartanScript does not have a way to detect and warn developers of reentrancy vulnerabilities. Hence, there is a need to implement reliable reentrancy prevention during smart contract development. This project modifies SpartanScript’s interpreter to check smart contract functions that deal with transactions and mark any reentrant vulnerabilities. The addition of new detection functions and the define-r expression checks for locks, modifiers, the checks-effects-interactions pattern, and other vulnerabilities. To demonstrate SpartanScript’s new prevention measures, various reentrancy attacks, such as basic, cross-function, and cross-contracts were created in contracts. Key strategies on how to detect such attacks are implemented in the interpreter so that it warns the developer when such vulnerabilities arises. The results showcased the modified SpartanScript’s ability to identify and mark most vulnerable contracts successfully."],"dc:identifier":["https://doi.org/10.31979/etd.xzgk-twu8","https://scholarworks.sjsu.edu/etd_projects/1359"],"dc:subject":["Blockchain","Reentrancy Attack","Smart Contract","Interpreter","Other Computer Engineering"],"dc:title":["Mitigating the Risk of Reentrancy Attack in Smart Contract Development"],"dc:type":["Master's Project"],"thesis:degree_discipline":["Computer Science"],"thesis:degree_name":["Master of Science in Computer Science (MSCS)"]},"updated_at":"2026-11-26T14:03:10Z"}