xSigma Using Chainlink VRF to Fairly Randomize Distribution of Stablecoin Pool Fees to LPs

xSigma has integrated Chainlink VRF to determine the exact moment in which accumulated stablecoin pool fees are distributed to LPs in a provably fair and tamper-proof manner.

xSigma stablecoin pools have attracted over $400M of volume over the first four months since launch. It also has recorded more than $600M in total deposits, making the total processed volume over $1B dollars! All of these pool interactions have helped to accumulate more than half a million dollars in the form of fees. At the time of writing, the total generated swap fees are 138k DAI, 211k USDC, and 264k USDT.

As we grow, we need to deploy new pools in order to spend swap fees for SIG burns, reducing the total supply of our native protocol token. For this, we need to move liquidity from the current pools. Doing so creates an opportunity to distribute the current accumulated fees to the existing LPs, resulting in each SIG-LP token instantly gaining about 6% more stablecoins — LPs earn an instant return on the capital.

This brings a question of when to execute this action.

The Fee Drop Timing

The initial obvious solution would be to announce a date and time beforehand and then drop the fees to LPs. However, this is wrong on two levels. First, the fees were accumulated thanks to the previous LPs, not the current. Second, people will only have an incentive to join right before the date and leave right after the drop, which doesn’t bring any value to the xSigma DEX.

To improve on this solution, we will announce a distribution start date and then start rolling a dice each day over a course of a month. When the dice lands on seven, the xSigma Fee Drop will trigger on that date. That particular day would have an instant return on capital of about 6% — equivalent to 2190% APY.

This is better from a system view, but the community might be worried that the dev team can lie about the dice results to pursue their own incentives. Thus, we need to have a dice that is random for the community, untamperable by the team or other outside interests, and verifiable by all participants as high integrity.

The Solution: Chainlink VRF

We use Chainlink VRF as a means to create a random process not controlled by anyone. The random dice will be thrown once every 24 hours by anyone willing to do so. The “dice” has 42 faces, and whenever it lands on the number “7”, the game will end and we will distribute the fees instantly. With these parameters, the game has a 50% probability of ending within 30 days (proof) and a 95% probability of ending within 124 days (proof). The distribution will happen manually, but the process of determining the exact day will be untamperable and free.

To produce true randomness, the user who rolls the dice needs to provide an unpredictable seed. For this, we have a slider on the frontend — you can choose any value as long as the miners and the oracles wouldn’t be able to guess which value you have picked. Bonus point: choose your favorite number to be captured forever in the Randomized Payout hall of fame!

The technical implementation of Chainlink VRF works by combining block data that is still unknown when the request is made with a user-supplied seed and the oracle node’s pre-committed private key to generate both a random number and a cryptographic proof. The xSigma Fee Drop smart contract will only accept the random number input if it has a valid cryptographic proof, and the cryptographic proof can only be generated if the VRF process is tamper-proof. This provides users with automated and publicly verifiable assurances directly on-chain that the dice roll is provably fair and cannot be tampered with or predicted by the oracle, outside entities, or the xSigma team.

Take part in the distribution process here: https://app.xsigma.fi/fee-payout

“Chainlink VRF is an easy to integrate solution that enables us to create a fun, fair, and tamper-proof method of distributing fees to the protocol’s biggest users. We’re appreciative of all the support the platform has generated, and excited to give back to our community,” said xSigma CEO Alex Lebed.

About Chainlink

Chainlink is the industry standard oracle network for powering hybrid smart contracts. Chainlink Decentralized Oracle Networks provide developers with the largest collection of high-quality data sources and secure off-chain computations to expand the capabilities of smart contracts on any blockchain. Managed by a global, decentralized community, Chainlink currently secures billions of dollars in value for smart contracts across decentralized finance (DeFi), insurance, gaming, and other major industries.

Chainlink is trusted by hundreds of organizations, from global enterprises to projects at the forefront of the blockchain economy, to deliver definitive truth via secure, reliable oracle networks. To learn more about Chainlink, visit chain.link and subscribe to the Chainlink newsletter. To understand the full vision of the Chainlink Network, read the Chainlink 2.0 whitepaper. Want to discuss an integration? Talk to an expert.

Solutions | Docs | Twitter | Discord | Reddit | YouTube | Telegram | GitHub

About xSigma

xSigma is a decentralized stablecoin exchange built by xSigma Lab, a subsidiary of a public company (Nasdaq: ZKIN). xSigma is an Ethereum-based dApp that facilitates trades between DAI/USDC/USDT stablecoins. xSigma DEX surpassed $1 billion volume so far.

xSigma Lab is a blockchain R&D lab that was created by ZK International, a publicly-traded company (NASDAQ: ZKIN). Our team includes world-class developers formerly of Google, Facebook, Ripple Labs, 1inch and other technology titans.

xSigma’s mission is to promote blockchain adoption by researching innovative use cases in decentralized finance, fintech and NFTs. We explore ways to utilize decentralized technologies in various industries, creating value for both enterprise and consumer markets.

Website | Docs | Twitter | Telegram | About xSigma Lab | Discord

xSigma Defi - Enabling the future of finance