Smart Contracts Overview
Detailed descriptions of the deployed contracts and methods.
There are two sets of basic core contracts, the Option Pairs contracts themselves (currently termed HedgeyCallV2 and HedgeyPutsV2 - even though these are really V1 contracts, the alpha released and deployed was named V1 for reference).
There is also an associated Hedgey Factory for each options contract. The Factory generates new Pairs contracts easily and ties them back to the factory to store for later lookup. The Factory also ensures no duplicated pairings exist so that a unique contract is defined solely by two addresses: [AssetCurrency][PaymentCurrency].
There are certain networks that contain multiple factory addresses for calls and puts. The reason for this is to utilize multiple AMMs, as well as allow cash closing for token<>token pairs where it is required to use an intermediary LP to settle (ie in the case where there is no direct liquidity pool pairing for the two tokens, there is a separate special pairs contract utilizing token<>weth<>token liquidity flash swaps for cash settling).
In addition to the core contracts, there are interfaces that allow users to build their own direct smart contract connections to the Pairs and Factory contracts. This is useful for other smart contracts looking to interplay with the pairs.
Finally the ABIs are included in this docs section and in Github to developers to interact with their own web3 libraries with Hedgey (while we are building a proper SDK).
Copy link