Advantages
Tanθ leverages the advancements made by Fuel, particularly the use of predicates. Predicates offer a novel method for representing and interacting with orders on-chain, mitigating concerns about significant state bloat and high transaction fees. Tanθ extends this capability by ensuring that makers can manage their orders with the lowest possible fees, potentially even zero fees.
In the Sway programming language, predicates are essentially programs that evaluate to either true
or false. They are used to define conditions or requirements that must be met for a particular
action to be executed.
As of today, scalable on-chain order book solutions for DeFi do not exist. This is primarily due to issues such as excessive state bloat, insufficient speed, reliance on off-chain components, and high costs. While Automated Market Makers (AMMs) are a viable option for decentralized exchanges (DEXs), they have significant drawbacks. For example, Uniswap v3 has resulted in approximately $600 million in impermanent loss for traders. In prediction markets, these impermanent losses are even higher compared to DEXs, as one of the outcomes (YES/NO) will inevitably reach zero at the poll's expiry.
On-chain order books provide a solution to these challenges. Fuel's new architecture uniquely enables a fully on-chain order book through the use of predicates. With predicates, the issue of expensive state writing is eliminated because creating an order is as simple as making a transfer. As long as there is a data availability layer that allows the public to observe the orders, they can be fully verified on-chain by checking the balance of the predicate.