Fluidity is a system that allows users to earn yield as a consequence of using their cryptocurrencies through Fluid Assets (a 1-1 wrapped token). As long as the user transacts on a chain using a Fluid Asset, both the sending and receiving party can potentially be exposed to a large prize, with no extra fees.
Fluidity has received significant community interest, especially from the Solana community and ecosystem, including community members, projects and leadership. With over 15,000 sign ups for the Fluidity beta, multiple strategic partnerships in the works with DEXEs, NFT Marketplaces, stablecoins and a long time horizon plan, Fluidity aims to be a novel system for payments that will fundamentally change the way people think about spending.
Fluidity envisions a world where monetary incentives for people to spend their money are the norm. An economy that does not benefit those who have the ability to keep their money idle, but instead incentivises spending.
Currently, DeFi favors holders over spenders. Most people would rather put their crypto in a liquidity pool and get as much yield from it as possible, compounding their profits. This poses an issue, as protocols are more likely to thrive when people are using them. Not only do ecosystems benefit from spenders, the adoption of crypto as a whole would benefit from people being incentivized to spend more.
As retail starts looking into participating in Web3 and Defi, Fluidity proposes a novel system that brings gamification to spending.
What it does
Fluidity allows users to wrap their assets into a Fluid Asset, which is a 1-1 backed version of their asset that exposes users to a speculative payout without any extra fees. This allows the user to transact normally with the potential of winning a prize, without having to pay any extra fees or do any extra work.
The use-cases for a system like this are limitless and now users have incentive to proactively participate in the wider blockchain ecosystem. The more interesting use-cases they explore, the higher expected outcome they have, leading to potentially a larger prize.
Users can trade on Decentralized Exchanges, NFT Marketplaces, pay back a friend, pay for a subscription and be exposed to prizes with no extra fees.
A novel approach utilising a Fluid Asset in that both parties are exposed to prizes. So if I send my friend 100 fUSDC and win a prize, my friend also receives a portion of my prize. This creates incentives for both parties in any transaction to participate in the system. This relationship is especially significant in merchant-customer relationships, where there is a significant volume of transactions. We believe that this will create feedback loops that will supercharge the adoption of Fluid Assets.
Fluidity has been designed to facilitate maximum participation without the reliance on our frontend. As Fluid Assets are a standard SOL token, they can be used with any Solana wallet or platform, without any extra fees, special integrations or infrastructure requirements.
This allows Fluidity to grow and be accessed from infinite avenues and use-cases without the requirement of special integrations.
How Fluidity Prevents Attackers
Fluidity rewards users for spending their money by entering them into a no-loss lottery each time they send a transaction.
We can easily imagine an attacker who wants to cheat this system by creating multiple accounts and sending transactions back and forth, increasing their chances to win the jackpot.
The way we prevent this attack is by utilising gas and other fees as a protection mechanism, ensuring that an attacker would statistically spend more in fees than they would win trying to cheat the lottery. We call this the Optimistic Solution, and it is one of the cases where fees are a good thing, as the lottery payout linearly increases with the fee until it breaks even with the expected yield.
Now, it is easy to imagine the case for Ethereum with relatively high gas fees. But what about platforms like Solana, where the average transaction fee is around $0.00025? We can still ensure high payouts on those chains, but the chances of winning will be much lower.
There is a higher transaction throughput on low-gas chains as well as higher TPS, so people will be inclined to frequently spend their Fluid Assets on those platforms and therefore increase their chances of winning.
The real magic happens if we examine DeFi apps with variable fees, like NFT marketplaces and AMMs.
Suppose you’re purchasing an NFT on Solanart for 100 USDC. By paying the app-related fee of 3% or 3 USDC, you will increase your potential winnings and the associated chances by a factor of about 4000. Doing a swap of $1,000 on Saber gives you similar results.
With a $1B TVL, users can win multiple prizes ranging from a few cents to over $30M, on every transaction.
You can read more about the functions and how we derived them in our economics whitepaper.
How we built it
Fluidity’s target demographic of low income earners and no reduction in utility when spending necessitated unique design considerations. Fluidity rewards should be instant, fees should not be present so as to not detract from utility, and no unique UI/UX considerations should be needed.
This required an entirely off-chain approach for winner selection and randomness generation.
Product rollout on the path to decentralisation includes the following steps. First an entirely centralised approach of a server selects winners at its discretion, then entities external to Fluidity check and validate winners with external (albeit centralised randomness) and finally an entirely distributed approach with no dependency on Fluidity.
The Solana implementation is at the first stage, with centralised winner selection. The codebase observes transactions made utilising a contract, utilises randomness and rewards a winner. For UX reasons the app currently rewards users with fixed certainty, so as to demonstrate the capacity of the worker.
The second implementation stage is incentivising external users to run the worker codebase, tracking every transaction seen and verifying random.org centralised randomness produced by Fluidity servers. Upon each transaction, a contract is utilised to pay out users, with a small reward being redeemed by the worker.
The long-term technical strategy is to develop the “bonds and fees” narrative of randomness generation.
A VRF conducts a randomness beacon leader election process on-chain, with leaders being chosen to solve a VDF per block. At any time, a leader can call the contract to pay out a winner, supplying a proof of the transaction existing or utilising a process of providing collateral with an optimistic process and optionally staking.
Payouts happen in a programmatic way, with tooling describing the conditions of when the contract call should be made. At the end of the period a windup contract is utilised, with claims made regarding randomness supplied and validated. After this point, transactions can be batched and redeemed with low overhead utilising an optimistic process.
Speculatively calling the contract on a winner condition fulfills the “fee” component of the final stage of Fluidity’s technical rollout, with rewards being paid on a per-transaction basis. Bonds support long-term randomness provision and provide a way to hedge gas fluctuations to reduce exposure of protocols to adverse network conditions. This technology is utilised to take no fees from users on a per-transaction use of randomness in Fluidity.
Challenges we ran into/ Difficulties in building it
Technical challenges included the lack of Rust development experience within the team and the lack of a filter for contract events on the websocket RPC endpoint. The team had issues with SPL token unwrapping behaviour and at times devnet would support a filter, then drop the support without warning, while disconnecting clients. The developers writing the Solana implementation at times found documentation sparse and were forced to read source code to understand the right approach to develop. They found that there was a degree of cognitive overhead required to develop on the platform with respect to error handling, with “Program error 0x1”, etc, not providing needed context. They also found that calling programs with large numbers would generate issues with respect to the order of the messages.
External to the Solana codebase, the main challenge was designing a lottery system that would simultaneously incentivise utility of Fluid assets, while not disproportionately rewarding wealthy users. It was key to develop this properly for the long-term value proposition of the system, while balancing the short-term needs of solvency. This challenge was overcome by developing a unique powerball game never conceptualised previously, with modelling taken advantage of to design the platform. The university RMIT provided validation for the modelling.
Accomplishments that we're proud of
The main accomplishment was the modelling and its unique design, with it being an entirely new system of conducting a lottery not seen previously in the external world. Having modelled it and validated the core assumptions, we intend to release data on the next stage of the model - the Elastic Supply Curve (ESC). The ESC will facilitate an entire class of derivatives built on speculative outcomes, with the immediate selldown becoming the the form of cashback rewards to users.
The long-term technical roadmap and second stage design of “outcome mining” will turn randomness into a public good on public blockchains, with protocols no longer having to thrust their randomness expenses onto users. Protocols can stake an amount to have access to secure randomness on a per transaction basis without users paying anything.
What we learned
Our main regret is not asking for help from members of the Solend team and Solana community. At times the Solana environment was alien to us and we would have benefitted from exercising some humility and asking questions. We initially intended to compete in the Solend track as well, but we had issues in practice with the contracts we developed to support it, and interplay with the UI. Another issue is the design of the system internally to not utilise the current shared bus for transactions and winnings, with the codebase being isolated. We found that the lack of separation meant reinventing the wheel somewhat as our assumptions about Rust code were challenged.
In the future we will exercise lean principles and communicate openly regarding our challenges and concerns.
What's next for Fluidity Money
With over 15,000 sign ups for the beta, a community of over 30,000, and a functioning prototype, we plan on gradually onboarding public beta users in the next few weeks.
We are proactively talking to projects and communities in creating educational material, educating users, rallying communities and generating feedback on the design and product concepts.
We will be creating an ambassador program and rallying users from multiple communities through exploring what Fluidity means for them, and how they can benefit from utilising Fluid Assets.
We are aiming to maximise the use-cases for users of Fluid Assets by supporting multiple platforms. These include DEXes, NFT Marketplaces and storefronts. Our long-term goal is to target retail merchants and platforms, with Fluidity becoming the killer app for crypto spending.