{"repo":"ethersphere/swap-swear-and-swindle","free":true,"listed":false,"github":"https://github.com/ethersphere/swap-swear-and-swindle","clone":"git clone https://github.com/ethersphere/swap-swear-and-swindle.git","description":"Contracts for Swap, Swear and Swindle. Swap is a protocol for p2p accounting. This is the basis for Swarm’s incentivization model.","language":"Solidity","stars":50,"topics":["ethereum","swarm","solidity","truffle","web3"],"license":null,"category":"blockchain-web3","readme_excerpt":"SW3 contracts Contracts for Swap, Swear and Swindle. Please note that all contracts within this repository are considered highly experimental and may cause loss of funds if used in production. The master branch only contains the SimpleSwap contract for now. Everything else (full Swap , Swear and Swindle ) can be found in the experimental branch. Tests This is a hardhat project using the truffle plugin (for tests as this used to be truffle-based). You can run tests using yarn test . To also generate coverage information use yarn coverage instead. Fuzzing This repo also includes Echidna-based, stateful fuzzing for the smart contract suite. The harnesses model multiple actors, exercise state transitions across the swap, factory, and oracle contracts, and check accounting, configuration, non-interference, post-condition, and signature-validation properties. Fuzz testing repeatedly calls contract functions with randomized inputs and call sequences. Instead of checking a single expected output per test, the harness defines invariants and safety properties that must always hold, and Echidna searches for counterexamples. This is especially useful for smart contracts because it can uncover edge cases that are easy to miss in example-based tests, including unusual call ordering, boundary values, and state-dependent failures. Run The Echidna Suite The runner uses Docker and the official Echidna image, so you do not need a local Echidna install. The runner compiles on the host, deletes s","default_branch":null,"files":null,"tree":[],"storefront":"/r/ethersphere","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ethersphere/swap-swear-and-swindle/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}