pickle-finance / protocol

Pickle Protocols
MIT License
128 stars 74 forks source link

Illiquid trades for Saddle D4 Strategy #106

Open larrythecucumber321 opened 2 years ago

larrythecucumber321 commented 2 years ago

Issue

The most recent harvest transaction for the Saddle D4 jar presents a couple problems. https://etherscan.io/tx/0x4a3f79b7a711add58dfdb641e784ea733207e79011f2cf37718bf6c98883e485. A summary of the swap is below image

Each of the reward tokens are sold in the following manner:

Step 1: reward token to ETH

Step 2: ETH to Stablecoin

So... after all this, the issue doesn't seem to be as bad as I thought, and it's really only some weird MEV shennanigans that was going on with the WETH-FXS route.
image

Conclusion

A very simple fix is swapping with the exact FXS -> FRAX path to make sure this doesn't happen again in the future