This proposal is from the Orbs Network. We propose to the SpiritSwap community that SpiritSwap integrate the new protocol for TWAP orders, developed and powered by Orbs.
TWAP (Time-Weighted Average Price) is a common trading execution strategy in CeFi that seeks to minimize a large order’s impact on the market by dividing it into a number of smaller trades and executing these trades at regular intervals over a longer period of time.
Due to the current limited capabilities of EVM smart contracts, DeFi markets (including SpiritSwap) aren’t able to include this type of order.
This problem can be solved using the Orbs Network’s L3 “decentralized backend” infrastructure. By relying on Orbs validators as off-chain bidders, the new decentralized TWAP protocol for DEX/AMMs allows for advanced time-spread trades to be executed in a decentralized manner.
If this proposal is approved, the Orbs team will provide a dedicated integration that will allow SpiritSwap user’s to connect to the TWAP protocol smart contract through the existing SpiritSwap UI.
This customized UI will allow users to set the parameters for their TWAP orders, including the size of the order, the total duration, the size of each trade within the order and the interval between orders. There is also the option to set a limit price.
The orders sent from the SpiritSwap UI will then be executed in a decentralized manner with the participation of the Orbs Network’s Guardians, who act as an honest bidder to ensure that the TWAP orders are executed at an optimal price and at a fair fee (gas costs only). Other than gas fees to bidders, there are no additional fees to users beyond any standard SpiritSwap trading fees.
For full technical details of how the smart contract works, see the github link below.
The Orbs team is requesting that the DAO approve the granting of access to the SpiritSwap repos in order to carry out the work required for the integration described above.
Use of TWAP orders can help manage the heightened volatility and liquidity issues that characterize the current crypto landscape. The two primary benefits of using TWAP orders are:
By breaking up orders into smaller pieces, can reduce the price impact of large orders or orders in pools that have low-liquidity. Arbitrageurs can close any price discrepancies in the interval between trades.
TWAP orders can also be used to automate dollar-cost averaging strategies (where the investor purchases an asset or set of assets having a certain dollar value on a specific schedule (i.e., on the first day of every month).
With the Orbs decentralized backend ensuring that these orders are executed in an optimal manner, SpiritSwap users will be able to capture these benefits. SpiritSwap itself will benefit from increased liquidity and the ability to attract new users by offering these features (which do not yet exist on other DEX/AMMs).
While the protocol does not hold funds, there are associated risks:
The TWAP protocol is a new product and is subject to general technical risks and general risks associated with smart contracts. While security audits have been completed, this does not guarantee that there are not unforeseen issues.
Users who make market orders (without setting a minimum price) will not have any guarantees as to the actual amount of input assets they will receive at the end of the orders.
Users who set limit orders may only have their orders partially filled if the market price is lower than the limit price.
Integrating the TWAP protocol, powered by Orbs, will allow SpiritSwap to provide highly efficient TWAP orders to its user base without sacrificing decentralization.
TWAP protocol Github: https://github.com/orbs-network/twap Peckfield Security Audit: https://github.com/orbs-network/twap/blob/master/Audit-Report-PeckShield.pdf RD Auditors Security Audit: https://github.com/orbs-network/twap/blob/master/Audit-Report-RDAuditors.pdf General information about Orbs L3: https://www.orbs.com/network/