The Great Connection

A pickle.finance story…

Scotty
5 min readOct 3, 2020

Where do we begin?

How about right at the start, no, not that start, but at the start of the Great Connection. This will be a tale of error, uncertainty and redemption — which will, one day, culminate in one of the greatest connections this space has ever seen.

Act 1 — The error

It was a normal day in pickle town — the brine was sweet and tangy, our skins were tight from the sun. Sure, the price of a pickle was down, but we had seen some nice gains in the days prior so a little dip in the brine was to be expected. I remember it vividly — it was evening for me, I was chatting away in the pickle-jar along with a few of the other local pickles. We were discussing the future and what we expected to happen over the following hours and days, perhaps even talking about The Great Switcharoo. But someone came in the and said that the APY on the pJars were showing the incorrect percentage. Of course, none of us realized what had just happened and how it was going to shape the future of pickle.finance forever.

The error explained by Pickle Finance’s Larry the Cucumber

PIP-8 enacted changes where the majority of withdrawal fees from the PickleJars would be diverted to the Treasury

The pJar strategies needed to be changed for this to be implemented. The way the pJar strategies work is that most of the deposited funds are within the strategy “hot wallet” where it’s deploying the capital to earn rewards such as UNI, CRV and the like.

There is a migration function called withdrawAll() that needs to be called to move the underlying assets in the original strategy contract to the new strategy contract. However, this wasn't called before the migration.

So now, as there is only a small amount of capital in the new strategy contracts, peoples' pTokens representing their entitlement to their share of the pool is results in a very small amount. This explains why the withdrawal amounts were so small.

This issue was compounded by the fact that if someone deposited the base assets after this issue arose, they would get a much larger number of pTokens than the previous ratio (of pToken : underlying token) would have dictated. Manual deposits (e.g. through Etherscan) were likely performed by a number of people to exploit the fact that their huge number of pTokens could get a large share of the farming rewards.

Now, because the ratio of pTokens : underlying tokens is messed up due to the deposits that happened after the fact, we have to perform a migration to a new set of pJars which have everyone’s correct entitlements.

In short, this was not a problem with any of the smart contracts, but a procedural issue where we did B before A and it made the system calculate incorrect withdrawal payouts. This propagated into other issues, unfortunately.

Act 2 — The uncertainty

It is human instinct to feel uncertainty when something like this arises — so at this point, each one of us in the pickle community had to make a decision whether we trust in the developers who had been fantastic professionals until this point or not — each one of us felt that creeping doubt, even if it was a just a passing thought which you paid no attention to — that is how humanity survived until this point in time.

Thus, it is fucking insane how strong the community was at this point — sure, there were trolls and opportunists right after the initial announcements — that is to be expected — but once they had gone back from whence they came — the community stuck by the developers in a way I have never witnessed in all my years in cryptocurrency.

Act 3— The redemption

We could never be 100% sure that the migration would go smoothly, nor that the developers would not get a change of heart when over $100m in uniswap LP tokens passed through their fingers — they are — after all, only human. It was the Great Unknown. Alas, human they may be, but greedy, they are not. All of the LP tokens were returned, and migration from v1 to v2 pTokens was successful — with staking available in the new pJars here.

Normally the time-lock prevents an opportunity to steal funds from even presenting itself. Here, the circumstances of the miscommunicated migration process required that the community was exposed to an opportunity of theft, since the time lock reaction mechanism (withdrawing your funds), in this case wasn’t an option. — Gabriel Nergaard#3459

However, at the same time it is also the community’s responsibility to make sure that they check all of the transactions going through the timelock contract — and you can do that here. We all need to play our part in keeping everything clean and correct — including checking code for errors so situations like this don’t arise again.

I personally think it’s easy to just pass judgement of the handover off as simple, some suggest we shouldn’t be thankful that the developers didn’t take the funds — because that would be setting a low bar. But the truth is this, the developers had a chance to make generational wealth and run off with it — whether anonymous or not, with that amount of money they could have hidden and enjoyed a very nice life. This shows their commitment to this one month old project, and suggests that they see a lot of potential in it — and also indicates that they are very principled pickles.

The Great Connection

I’m sure you are aware of where this is heading now — we have a resilient community which clearly has faith in its developers, and we have extremely professional and competent developers who clearly appreciate and have faith in their community. A perfect marriage, and together we can build something special — every day there are long discussions in the discord community if you haven’t already joined!

During this mini crisis, the developers were amazing at communicating updates and problems with the community — they did a splendid job at crisis control — because make no mistake this could have been a whole lot worse than it was if there was poor communication. I applaud them for their honestly, hard work and integrity. They gave the community the much needed confidence that they needed to trust in the process.

The community really rallied behind the process and tried to support the developers with positive thinking. The truth is that fear spreads like wild fire once it takes hold of a community, but thankfully through working together we were able to stay well clear from a situation in which the community doubted intentions of the developers, which would have been catastrophic for such a new, and relatively low-volume project.

In the future… We will look back on this moment as the spur which really united both developers and community. Current pickles — and soon-to-be pickles — will be able to bathe in the tangy brine of pickle.finance safe in the knowledge that we can trust the developers — which is a big thing when you are trying to build the hedge fund of the future. Alas, the Great Connection.

--

--