Cross-chain perps market using ERC20 tokens wrapped in OFTs as pool assets
Cross-chain perps market using Pancake Swap V4 pools and hooks. Using ERC20 tokens wrapped in OFTs as pool assets and for cross-chain financing.
Captain Hook Finance is a perpetual futures market that interacts with Pancake Swap V4 Pools. It is permissionless, oracle-free, and cross-chain.
The current implementation supports V4 pools with USDC token as one of their assets. Our novel OFT design allows collateral to be deposited into the protocol from any chain.
We extended the functionality of LayerZero's OFT, by allowing any ERC20 tokens to be wrapped into an OFT, and by adding a new function that enables the OFT to token to be sent cross-chain as collateral into our protocol.
Captain Hook Finance relies heavily on Pancake Swap V4 Pools as well as LayerZero OFTs. We allow users to trade options on any V4 Pool that is created in Pancake Swap V4.
Further than that, we add significant cross-chain capabilities. Our token "OFTWrappedERC20" allows any ERC20 token to be wrapped into an OFT. This token exposes a new function "sendAswCollateral", that allows the token to be deposited as collateral cross-chain on a Captain Hook Finance market. We achieve this by modifying the default "send" function on the OFT, adding our own custom logic to it.
The implementation of the perps market is inspired by Hook Finance.
Deployed contract addresses can be found in the Github monorepo.