The vanila protocol is a decentralized exchange bringing expirable future contracts to Defi.
In DeFi, only perpetual futures exist. But since funding rates are unpredictable, traders do not have control over their costs. The vanila protocol brings expirable futures to DeFi to allow traders to set their costs upfront.
The vanila protocol hedges the positions taken by the traders to remove any impermanent losses for the liquidity providers and ensure a safe settlement for everyone.
Please find the documentation of the vanila protocol at https://vanilaprotocol.gitbook.io/vanila/
This project uses the new @uniswap v3 under the hood, both for hedging and as an oracle, which proven to be a bit of a challenge as documentation and examples are still a bit scarce around the version 3 APIs.
On the flip side, the fact the pool can provide historical prices and the new low fees, made it a perfect match for our requirements. The flash swap feature was also great as it allowed us to keep the ERC20 transactions to the bare minimum, saving a lot of gas for the user.
We are quite impressed on the amount of features and completeness we managed to achieve given we all have day jobs and are newbies to Ethereum development, we work in the traditional finance world, and delivering something similar, even as an MVP, would have probably taken us months.
The project itself is built upon scaffold-eth and standard libs like OpenZeppelin, but we would like to give a big shout to BokkyPooBah's DateTimeLibrary and PRBMath, which simplified our code (and life) quite a bit