crownIcon Mint Crypto Bums Now & Earn NFTonPulse Marketplace Fees! smileIcon

by starburst
May 30, 2023

PulseX bug rewards the PLSX holders

Table of Content

Latest News

On May 30, Richard Heart took to Twitter to announce that due to a deflation bug in the PulseX code, liquidity pools hadn’t accumulated any fees since the launch of PulseChain. On the other hand, the farms got to be extremely profitable because the buy-and-burn function of the DEX took all the fees. The new fix has already been prepared, and the community is awaiting code deployment.

Richard Heart's statement

As soon as Richard Heart got to know about the bug, he got to Twitter to disclose the incident and talk openly about what happened and what the next steps would be. 

“It appears that the PulseX buy and burn gets all of the fees, leaving none for the LP. This same code has been in use for years of testnets, no one noticed, including the LPs. The fix that leaves fees for the LPs is on the right below, the current code is on the left. This has nothing to do with the $INC token that the LPs earn in the farms. When the new pairs exist with the new logic, everyone can move over to them if they wish, or they can stay where they are, earning no fees, but giving more to the buy and burn. Or you could pull your LP. In summary, if you are an LP in PulseX currently, then you are not earning fees, unless you are in a farm, in which case you’re earning $INC. The code you have been running is public and open source. https://scan.pulsechain.com/address/0x1b45b9148791d3a104184Cd5DFE5CE57193a3ee9/contracts#address-tabs…See the code section: “function _mintFee” I’ll let you know when the new code is live.

Post mortem

Anyone can provide liquidity to a liquidity pool on PulseX. Users can choose to add two tokens to an LP in a proportional ratio. In return, they earn a 0.22% trading fee, or that’s what was meant to happen. 

It appears that there was a bug in the code that went unnoticed for almost two years, despite the fact that the code was available for testing on four different testnets and used by thousands of people.

PulseX didn’t go through a security audit before the launch, and those providing liquidity, farming, and testing believed that years of testing would suffice to discover the bugs. It’s unclear how it’s possible that a bug as rampant as the lack of trading fees for LPs could go unnoticed. 

One explanation could be that providing liquidity is often met with impermanent loss. Users usually end up with the majority of the less valuable tokens in the pair suffering a loss. The loss is perceived, and it becomes permanent only when the funds are pulled out of the LP. The loss is major when the ratio between the two pairs is subject to high volatility, and this is what happens when smaller tokens are paired with something like PLS, wETH, or DAI. 

The most popular and tested LPs were pairs between tokens, where the ratio is always very close. Farms were created for these pairs to additionally incentivize all liquidity providers with the INC token. Liquidity providers could see the INC token coming from farming, and they probably thought that it included the fees from trading.

Gains from deflation

 

For whatever reason this bug went undiscovered, it turns out that the buy-and-burn function of PulseX caused massive deflation, which is the opposite of what usually happens in crypto. The inflation bug is one of the worst that can be seen in crypto because it allows for printing a huge, if not infinite, amount of new tokens. Bitcoin suffered an inflation bug in 2010, when 184 billion BTC were created out of thin air. The error was promptly discovered and fixed. In PulseX, the reverse happened because it caused deflation for every PLSX holder. The PulseX exchange has its own token named PLSX. The code has a buy-and-burn mechanism where for every $1 billion of volume, there’s $600k of PLX bought from the market and burned. This has as a scope to permanently decrease the total supply of PLSX. 

All the fees that should have been earned by the liquidity providers went to buy and burn PLSX. The holders of PLSX gained a lot from this incident because now they have a bigger share of a smaller total supply. So far, 84B have been burned out of the total supply of 143T PLSX.

Following the tweet from Richard Heart, it appears that the fix for the bug is ready, and once it’s tested and deployed, liquidity providers can move over to new pools to earn fees, or “they can stay where they are, earning no fees but giving more to the buy and burn”. 

As of the present moment, only farming produces yield in the form of the INC token. People who participated in the farms got huge INC rewards. Rewards from INC are very profitable, and they usually outperform any liquidity-provider fees.  

Who Are We?

As members of the PulseChain community, HowToPulse.com mission is to make the onboarding process as simple as possible.
We did the research for you providing top quality information, tools, news and updates about PulseChain, HEX and PulseX

Ask us a Question