Smart Contract Architecture

The Divergence smart contracts system includes core contracts and periphery contracts. Below are a brief overview of the contract functionalities:


The core contract functionalities provide the foundation for options market creation, automatic market-making and peer-to-pool interactions.

Deploys pools, i.e. Battles, for options tokens of specific underlying, collateral, fees and other deployment parameters.

Each options AMM pool is contained in a Battle contract. Battle contracts contain the core functionalities including minting and burning liquidity, trading options tokens, settling pools and claiming proceeds. The onlyManager functions are called via the Manager contract in the Periphery contracts.

Collects and updates underlying asset prices used for settling options. It retrieves asset prices and supplies them to all contracts that use them.

Implements digital call and put options as Spear and Shield tokens.


Periphery contracts contain methods of interacting with core contracts. Periphery interfaces are the main handler of external calls.

Mints LP liquidity positions as non-fungible tokens. Handles the logic of adding and withdrawing liquidity. Provides functionalities that enable LPs to redeem or withdraw obligatory collateral reserves for settlement. It also facilitates trade functionalities.

Last updated