The SushiSwap decentralized exchange has narrowly avoided condign the latest decentralized finance hack victim thanks to help from a white hat hacker.

A security researcher from venture capital firm Paradigm, known on Twitter as Samczsun, has managed to save SushiSwap and its Miso platform from a potential loss of as much as 109,000 Ether (ETH).

In a blog post published on Tuesday, the programmer described how he began examining the smart contract code for the BitDAO token sale on SushiSwap's token launchpad platform, Miso.

On closer inspection, he found a flaw in the Miso Dutch auction contract whereby some of the functions lacked access controls.

"I didn't really expect this to be a vulnerability though, since I didn't expect the Sushi team to make such an obvious misstep."

Upon deeper investigation, the white lid discovered a vulnerability that, if exploited, could have resulted in all of the crypto avails in the token auction contract being tuckered by a malicious histrion. An attacker could reuse the same ETH over and over to batch multiple calls to the contract and "bid in the sale for gratis."

Samczsun tested the vulnerability with a successful exploit earlier contacting colleagues Georgios Konstantopoulos and Dan Robinson to take a expect and double-check the findings. He as well discovered that a hacker could steal the funds from the contract past triggering a refund past sending a higher corporeality of ETH than the auction hard cap.

"Suddenly, my little vulnerability just got a lot bigger. I wasn't dealing with a bug that would let you outbid other participants. I was looking at a 350 meg dollar bug."

Related: Poly Network hack exposes DeFi flaws, but community comes to the rescue

It was then time to reach out to SushiSwap chief technology officeholder Joseph Delong to codify a rescue plan before the exploit was discovered in the wild. It was decided that the BitDAO team holding the token sale would manually end the auction by purchasing the remaining allotment and immediately finalizing the process and rescuing the funds.

SushiSwap noted that no funds were lost in the relieve endeavor, calculation that it will pause the employ of its Miso Dutch auction format until the smart contract tin can be updated. Crypto customs member DCinvestor commented:

"Everyone knows Paradigm has big UNI / Uniswap bags, but Sam from their team but helped save SushiSwap (an ostensible competitor) from a critical problems. This is the ethos of the space among the best actors."

The BitDAO token sale went off without a hitch, raising more than 112,000 ETH, valued at roughly $336 meg, from over ix,200 participants according to a tweet from the protocol on Tuesday.