About the project
fluxswap is a decentralised exchange (DEX) protocol in Solidity: contracts for swapping tokens directly on the blockchain, with no intermediary. It consists of liquidity pools (contracts that hold the funds to be swapped), a router that directs operations to the pools, staking and a timelock, which delays the execution of operations. It is built with Foundry, a toolkit for building and testing contracts, and has full test coverage plus invariants: conditions that must hold after every operation.
The challenge
In a DEX protocol the contracts move real funds, so a bug in the code is not a defect to fix in the next release, it is lost money. That is why invariants and full test coverage mattered, rather than the mere impression that a contract works.