Fairblock is applying to the Uniswap-Arbitrum Grants Program to build an auxiliary application for Uniswap on Arbitrum that allows users to encrypt their trades until execution. This app will be called Fairyswap, and it will integrate directly with Uniswap on Arbitrum to improve the trading experience of Uniswap-Arbitrum users by increasing capital efficiency and protecting against pre-execution order leakage without reliance on centralized parties.

Why does Fairyswap warrant UAGP’s attention? 

Universal onchain transparency before and after execution keeps many retail and institutional parties away from DeFi. Pre-execution transparency exposes users to bad-MEV opportunities like frontrunning and sandwich attacks, decreasing capital efficiency at the user’s expense. Post-execution transparency keeps many high-net-worth and sophisticated traders away from DeFi because of the exposure of their trading strategies and wallet balances, revealing more than most users are comfortable with and making trading information public to competitors. Bad MEV exposure and the over-transparency of onchain activities restrict the functionality of DeFi; it is the industry’s responsibility to build supporting infrastructure that better serves users and their needs – for greater capital efficiency, information flow control, and bad-MEV prevention.

We need to build secure encryption-enabled infrastructure within DeFi, and pre-execution encryption is the first step towards the larger goal of embedding encryption as a standard at the baselayer of every onchain experience. Fairyswap, as an auxiliary application for Uniswap, is the first phase of a longer effort to support the Uniswap ecosystem with programmable encryption, greater capital efficiency, and improved functionality within onchain trading to strengthen Uniswap’s position as the go-to DEX in DeFi. Greater capital efficiency will be achieved by decreasing exposure to bad MEV opportunities for traders.

How Fairyswap Will Work:

At a high level, a user will sign a trade on the FairySwap frontend that specifies a designated block height at which their trade should be decrypted and executed. This encrypted trade is then submitted to FairyRing — Fairblock’s encryption coprocessing chain — where it remains encrypted until the predetermined block height is reached. Once the designated block height is met, the encrypted trade is automatically decrypted and sent by the Fairyswap relayer to Uniswap for execution.

Conditional decryption will be available for block height triggers in FairySwap V1, and will increase to additional onchain conditions in the future, such as the prices of assets. Conditional decryption can also be added for private governance, such that all votes are decrypted and executed once a poll concludes, providing more credibly neutral governance outcomes.

How the funds will be used:

Funds awarded from this grant will be used to support the efforts of two engineers from Fairblock who will be spending 50% of their time on this project for the next 3 months. These two engineers will be a protocol engineer who will be developing the necessary smart contracts for this effort and a full stack engineer responsible for building the application frontend and backend.

Calculating the Ask:
2 engineers * 200K/year = 400K/year
3 months total project. Engineers spend 50% of their time on it.
100K * 0.5 = $50K USD in engineering expenses
10K USD will be allocated to marketing and BD for exposure and educating the Uniswap-Arbitrum community about the application through devrel, blog posts, Twitter space, and documentation.
All in all, Fairblock is requesting $60K USD from the UAGP to deliver encrypted trading to Uniswap through Fairyswap.
