The contracts are written using AlgoKit and TEALScript.
The source for Reti, its contracts, node daemon and UI is currently at https://github.com/algorandfoundation/reti
Audits for the contracts can be found alongside the contracts, here:
https://github.com/algorandfoundation/reti/tree/main/contracts/contracts/audit
Information on Tealscript can be found here.
See the README in the contracts/ directory for build / testing details.
Some diagrams of the workings are provided here as some may find them useful but the contracts themselves are the best source for complete details. Not every operation is shown in the sequence diagrams as they would be far too verbose.
A video discussing some of the details of the contracts presented at Decipher 20024 can be viewed here:
{% embed url="https://www.youtube.com/watch?v=l5TFlphojnQ" %} The Water's Fine: Reti P2P Staking Pools | Decipher 2024 Day 2 {% endembed %}
General Overview
Basic Operations