Treasury Proposal by Centrifuge: On-Chain Automated Treasury Management (with TWAMM)

1yr ago
2 Comments

Proponent: 12wWLUd5qMzLFGqBsMnHLVFeTuYJwuo5ygMAxuSywrBX1XSF

Date: 2023.03.30

Requested DOT: $495,000 ~ TBD DOT

Contact: William Freudenberger ([email protected])


The ongoing discussion about automated market makers (AMMs) in the Statemint roadmap is mainly focused on improving the user and custodian experience by allowing small atomic swaps natively and making Statemint a central hub for asset deposits. This addresses important pain points by enabling transaction fees to be paid in non-native tokens and facilitating interaction with the entire asset variety of the ecosystem without requiring to run custom nodes or infrastructure.

However, we believe that one aspect has been overlooked: the slow swaps of large volumes, which can be easily front-run or sandwiched. This is particularly relevant in the context of trades proposed through governance for use cases such as

  1. Paying out treasury grants, bounties or even salaries in less volatile currencies (ie. stablecoins).
  2. Enabling parachains to build a DOT reserve which can be used to acquire a parachain lease, pay XCM fees, or increase availability cores during times of high demand (once supported).
  3. Governance deciding to invest part of the treasury into a token to diversify their treasury

What we need is the opposite of what a traditional AMM provides: atomic swaps with immediate execution, even in relatively illiquid assets. A governance vote is unable to time the market and is highly predictable. Therefore, executing such a transaction as a market order on an AMM is problematic, as it will be guaranteed to be front-run. A better solution is to "dollar-cost-average" over a long period of time making it harder for price manipulation to affect the purchase.

At Centrifuge, we have researched distinct approaches of how to achieve hard-to-front-run slower transactions. In our opinion, the most elegant solution is TWAMM (Time Weighted Automated Market Maker. We are of the firm conviction that the implementation of this model represents the most efficacious approach for executing token swaps in the context of slower and passive procedures, such as governance.

TWAMM (Time Weighted Automated Market Maker) eliminates front-running vulnerabilities of traditional AMMs when executing large orders, especially in the context of passive procedures, such as governance. The proposed solution will be executed as a seamless extension to pallet-asset-conversion, thereby enhancing its capabilities as an embedded AMM.

The deliverables of the proposal contain the TWAMM-pallet, associated runtime APIs, associated research for further optimizing and extending the pallet, a security audit of the pallet and a frontend.

The full proposal can be found here.

Up
Comments
No comments here