title: Building trustworthy smart contracts using interactive theorem proving

authors: Britten, Daniel

subjects: formal methods

abstract: There are varying approaches to the verification of smart contracts using formal methods. This thesis advocates for the use of high-level specifications coupled with a verified compiler to low-level bytecode, such as for the Ethereum Virtual Machine. Taking this approach allows for specifications to more closely match natural language, while ensuring that the specifications apply to the real bytecode executed on-chain.

Interactive theorem proving can provide the foundation for developing provably correct smart contracts. Due to the immutable nature of smart contracts and their potential to manage highly valuable assets and tokens representing power, techniques to ensure their correctness are of paramount importance.

This thesis extends the DeepSEA (Deep Simulation of Executable Abstractions) smart contract language targeting the Ethereum Virtual Machine by mitigating the issues associated with reentrancy and introducing a model of relevant aspects of a blockchain. This enables the specification and verification of two case studies which exemplify the approach of developing provably correct smart contracts.

The specifications for the case studies are written in the language of the Coq Proof Assistant, making arbitrary mathematical statements expressible. The blockchain model enables stating and proving temporal properties relating to the execution of smart contract over time.

While smart contracts are an ideal application area for formal methods in general and interactive theorem proving in particular, the techniques exemplified in this thesis could be applied throughout software engineering. The relatively young age of smart contract languages and typically small size of smart contract programs makes the application of interactive theorem proving more tractable. Future work could involve demonstrating the applicability to many interrelated smart contracts and to larger software projects in different domains.

The first three chapters of this thesis cover introductory and background material. This is followed by the contributions to the DeepSEA system. The two case studies and the proof themes arising from them are then presented. Finally, concluding remarks and future work are discussed.

text: Building trustworthy smart contracts using interactive theorem proving There are varying approaches to the verification of smart contracts using formal methods. This thesis advocates for the use of high-level specifications coupled with a verified compiler to low-level bytecode, such as for the Ethereum Virtual Machine. Taking this approach allows for specifications to more closely match natural language, while ensuring that the specifications apply to the real bytecode executed on-chain.

Interactive theorem proving can provide the foundation for developing provably correct smart contracts. Due to the immutable nature of smart contracts and their potential to manage highly valuable assets and tokens representing power, techniques to ensure their correctness are of paramount importance.

This thesis extends the DeepSEA (Deep Simulation of Executable Abstractions) smart contract language targeting the Ethereum Virtual Machine by mitigating the issues associated with reentrancy and introducing a model of relevant aspects of a blockchain. This enables the specification and verification of two case studies which exemplify the approach of developing provably correct smart contracts.

The specifications for the case studies are written in the language of the Coq Proof Assistant, making arbitrary mathematical statements expressible. The blockchain model enables stating and proving temporal properties relating to the execution of smart contract over time.

While smart contracts are an ideal application area for formal methods in general and interactive theorem proving in particular, the techniques exemplified in this thesis could be applied throughout software engineering. The relatively young age of smart contract languages and typically small size of smart contract programs makes the application of interactive theorem proving more tractable. Future work could involve demonstrating the applicability to many interrelated smart contracts and to larger software projects in different domains.

The first three chapters of this thesis cover introductory and background material. This is followed by the contributions to the DeepSEA system. The two case studies and the proof themes arising from them are then presented. Finally, concluding remarks and future work are discussed.

year: 2024

title: Retention capacity of biochar-amended New Zealand dairy farm soil for an estrogenic steroid hormone and its primary metabolite

authors: Sarmah, Ajit K.

abstract: We examined the retention ability of a New Zealand dairy farm soil amended with 3 types of biochar produced from a variety of feedstocks for a steroid hormone (oestradiol, E2) and its primary transformation product (estrone, E1). Biochars produced from corn cob (CC), pine sawdust (PSD) and green waste (GW) were characterised by scanning electron microscopy, Fourier-transform infrared spectroscopy, X-ray diffraction, and solid-state 13C nuclear magnetic resonance spectroscopy. Batch sorption studies were performed on soil amended with each biochar (0.5% and 1% by weight) using a complex solvent extraction scheme, and isotherms were fitted to the Freundlich model.
All isotherms were highly non-linear, with N values in the range 0.46–0.83 (E2) and 0.66–0.88 (E1) in soil amended with different percentages of biochars. Overall, addition of all 3 biochars was found to increase the soil sorption affinity for the hormones, with E2 sorption being the highest in the soil amended with 1% PSD biochar. There was no marked difference in hormone sorption ability in the other 2 treatments (soil treated with 1% CC biochar and 1% GW biochar). Overall, the effective distribution coefficient (Kdeff) values for E2 at the lowest equilibrium concentration (Cw 0.5 mg/L) ranged from 35 to 311 L/kg in soil amended with the 3 types of biochar. Addition of 0.5% of PSD biochar resulted in ~560% increase in the Kdeff value for E2, while at 1% addition of PSD biochar, uptake of E2 was nearly 1400% higher than the control. For E1, the percentage increase in Kdeff was comparatively smaller than E2; however, it still ranged from 40 to 280%, and 60 to >320% at addition of 0.5% and 1% PSD biochar, respectively, compared with the control soil. Highest treatment temperature and associated greater surface area, low ash content, higher carbon content, and the abundance of polar functional groups (e.g. –OH, C=O) may explain why the soil amended with PSD biochar exhibited high sorptive capacity for the hormones.

text: Retention capacity of biochar-amended New Zealand dairy farm soil for an estrogenic steroid hormone and its primary metabolite We examined the retention ability of a New Zealand dairy farm soil amended with 3 types of biochar produced from a variety of feedstocks for a steroid hormone (oestradiol, E2) and its primary transformation product (estrone, E1). Biochars produced from corn cob (CC), pine sawdust (PSD) and green waste (GW) were characterised by scanning electron microscopy, Fourier-transform infrared spectroscopy, X-ray diffraction, and solid-state 13C nuclear magnetic resonance spectroscopy. Batch sorption studies were performed on soil amended with each biochar (0.5% and 1% by weight) using a complex solvent extraction scheme, and isotherms were fitted to the Freundlich model.
All isotherms were highly non-linear, with N values in the range 0.46–0.83 (E2) and 0.66–0.88 (E1) in soil amended with different percentages of biochars. Overall, addition of all 3 biochars was found to increase the soil sorption affinity for the hormones, with E2 sorption being the highest in the soil amended with 1% PSD biochar. There was no marked difference in hormone sorption ability in the other 2 treatments (soil treated with 1% CC biochar and 1% GW biochar). Overall, the effective distribution coefficient (Kdeff) values for E2 at the lowest equilibrium concentration (Cw 0.5 mg/L) ranged from 35 to 311 L/kg in soil amended with the 3 types of biochar. Addition of 0.5% of PSD biochar resulted in ~560% increase in the Kdeff value for E2, while at 1% addition of PSD biochar, uptake of E2 was nearly 1400% higher than the control. For E1, the percentage increase in Kdeff was comparatively smaller than E2; however, it still ranged from 40 to 280%, and 60 to >320% at addition of 0.5% and 1% PSD biochar, respectively, compared with the control soil. Highest treatment temperature and associated greater surface area, low ash content, higher carbon content, and the abundance of polar functional groups (e.g. –OH, C=O) may explain why the soil amended with PSD biochar exhibited high sorptive capacity for the hormones.

year: 2010

title: Te Piringa

authors: Dickson, Matiu

abstract: Māori have an oral tradition, that is, the transfer of knowledge within and between generations, which was carried out orally by way of story-telling or the more formal speech-making. Ngā korero purākau are the stories and whaikōrero is formal talking on the marae or ancestral gathering places of Māori people. The value of public speaking is expressed in the saying: Ko te kōrerote kai a te Rangatira – (The chiefs thrive on talking and debating). This article looks at the transfer of knowledge to the next generation.

text: Te Piringa Māori have an oral tradition, that is, the transfer of knowledge within and between generations, which was carried out orally by way of story-telling or the more formal speech-making. Ngā korero purākau are the stories and whaikōrero is formal talking on the marae or ancestral gathering places of Māori people. The value of public speaking is expressed in the saying: Ko te kōrerote kai a te Rangatira – (The chiefs thrive on talking and debating). This article looks at the transfer of knowledge to the next generation.

year: 2010