GHOptim: Efficient, GHO-Denominating Aave-dependent Options Protocol
Non-technical Description
You have an aRETH token. You want to sell it for at least 10.000 GHO. The price today however is 3000. So you have no problem making it available for speculation in exchange for a profit. So, you sign a ``Permit` to let GHOptim transfer it as well as a contract (hash of a "loan agreement" [position struct]). In case anyone is willing to borrow it by paying the difference between the price now (Aave Oracle) and your wanted price (7000 GHO - position cost) to trade it for, between 1 day and X years (max cumulative duration stipulated in agreement) it will be transferred from you into the GHOptim vault. Worst case for you are two: you withdraw it, with some profit (as for it to have been transfered from you to GHOptim vault it had to be used at least once) or, you get in return exactly the price at which you wanted to sell. The experience for an options buyer is the same as everywhere else. Potentially worst is in cases of volatility related opportunity costs as well as high gas prices in the context of low liquidation price delta preference.
"GHOptim provides a versatile platform for executing options contracts with a focus on flexibility and ease of use." (ChatGPT)
Made with Foundry. Next JS (mock atm) and postgress placenholder database. Uses Family wallet for logging in and signing. (Uses old dependencies and the combination with nextJS lead to the impossibility of interacting with the contracts.)
Another big challenge, tried many different combinations of local and tenderly devnets/testnets was the very heavy reliance of Aave Protocol state as well as the state slot modifications. (Admin Role, Approved Facilitator, Bucket Manager, aToken Balances etc.) This further added to the frontend integration troubles.