As a venue for pooled, automated liquidity provision on Sui Network, the BallastFi protocol (Ballast) will function without upkeep, providing an unstoppable platform for Sui token conversion.
Ballast V1 is our first iteration of Ballast and includes a set of DeFi features, and a first step towards bringing the CX experience onto Sui DeFi. This article will serve as a high-level overview of these features including:
In Ballast V1, any SUI token can be pooled directly with any other SUI token. The introduction of SUI token/SUI token pools in Ballast V1 will be useful for liquidity providers, who can maintain more diverse SUI token denominated positions, without mandatory exposure to Sui. One example would be a USDT/USDC pair, which should theoretically have little volatility for liquidity providers, but is useful for trading.
Having direct SUI/SUI pairs also improve prices because routing through Sui for a swap between two other assets (say, USDT/USDC) involves paying fees and slippage on two separate pairs instead of one.
If two SUI tokens are not paired directly, and do not have a common pair between them, they can still be swapped as long as a path between them exists. Router contracts can be used to optimise between direct and multi-step swaps.
We still anticipate Sui pairs being very popular, but expect to see growth in other types of pairs over time.
Ballast V1 implements new functionality that enables highly decentralised and manipulation-resistant on-chain price feeds. This is achieved by measuring prices when they are expensive to manipulate, and cleverly accumulating historical data. This allows external smart contracts to create gas-efficient, time-weighted averages of Ballast prices across any time interval.
On-chain price feeds are a critical component for many decentralized financial applications including those similar to derivatives, lending, margin trading, prediction markets and more.
Ballast V1 includes a number of features for price feeds built on top of it. First, every pair measures (but does not store) the market price at the beginning of each block, before any trades take place. This price is expensive to manipulate because it was set by the last transaction in a previous block.
To set the measured price to one that is out of sync with the global market price, an attacker has to make a bad trade at the end of a previous block , typically with no guarantee that they will be able to arbitrage it back in the next block. Attackers will lose money to arbitrageurs, unless they can “selfishly” mine two blocks in a row.
This alone is not enough. If significant value settles based on the price resulting from this mechanism, then the profit of an attack likely can outweigh the loss.
Instead, Ballast V1 adds this end-of-block price to a single cumulative-price variable in the core contract weighted by the amount of time this price existed. This variable represents a sum of the Ballast price for every second in the entire history of the contract.
This variable can be used by external contracts to track accurate time-weighted average prices (TWAPs) across any time interval.
This is done by reading the cumulative price from a SUI token pair at the beginning and at the end of the interval. The difference in this cumulative price can then be divided by the length of the interval to create a TWAP for that period
Ballast V1 flash swaps allow you to withdraw as much as you want of any SUI token on Ballast at no upfront cost and do anything you want with them (execute arbitrary code), provided that by the end of the transaction execution, you either:
Liquidity provider fees are enforced by subtracting 0.3% from all input amounts, even if the input SUI tokens are being returned as part of a flash swap.
It is possible that a series of transactions on Sui have a high upfront cost but ultimately a low net cost or is even net profitable by the end of the series. Flash swaps are incredibly useful because they remove upfront capital requirements and unnecessary constraints on order-of-operations for multi-step transactions that use Ballast.
One example is arbitrage with no upfront capital. Imagine a scenario where you can sell 200 USDC for 1 Sui on Ballast and then sell that 1 Sui on another Dex for 220 USDC at a 20 USDC profit. But, unfortunately, you don’t have any USDC in your wallet.
With flash swaps you could synchronously withdraw 1 Sui from Ballast, sell it on the other Dex for 220 USDC and then pay for the Sui on Ballast with 200 of the USDC you just purchased.
Decentralisation is in many ways about increasing participation and removing central points of failure. Upon launch, Ballast V1 will be highly decentralised, trust-less, and censorship resistant. But for it to achieve its full potential as infrastructure in a fair and open financial system — it will need to continue to grow and improve.
To open a path to self-sustainability, the code for Ballast V1 includes a small protocol charge mechanism. At launch, the protocol charge will default to 0.05%, and the liquidity provider fee will be 0.25%.
This feature, including the exact percentage amounts, is hardcoded into the core contracts which remain decentralised and non-upgradable. It can be turned off/on, and directed by, a decentralised governance process deployed after the BLT genesis and governance launch. There is no expectation that it will be turned off in the near future but it opens the possibility for future exploration.
That being said, the best version of Ballast will be one that autonomously incentivises contributions to its own growth and development as well as to the broader ecosystem in which it exists–one that supports the contributions of the incredible community that will form to push the protocol forward.
To conclude, Ballast is an ideal candidate for exploring decentralised on-chain cash flows.
While the core smart contracts are finished, additional work is still in progress.
Pending a successful formal verification, we are optimistic that Ballast V1 can be deployed before the end of 2022.
We want to hear from you!
We will be releasing additional updates, information, and documentation over the coming weeks. We look forward to continued feedback and involvement from the fantastic Ballast community. To get involved and stay up to date: