API Overview

"At some stage ... we should have to expect the machines to take control." — Alan Turing

Introduction

The OptSwap protocol is comprised of multiple Core smart contracts which together provide the functionality of Decentralized Exchanges (DEXes), Automated Market Makers (AMMs), Meta Oracles, Staking, Fundraising, Airdrops and Governance.

The Core contracts provide all the fundamental safety guarantees for every user interacting with OptSwap. They define the governance rules, options trading & settlement logic, and all the interactions involving the underlying assets and cash tokens therein.

External calls will interact directly with the Core contracts using the Application Binary Interfaces (ABIs) which are provided for each of the smart contracts that is deployed. All the external calls are documented in this technical reference documentation. Internal functions and libraries are viewable on the OptSwap Github repository.

Software Requirements

OptSwap has been developed and compiled using the following libraries or frameworks:

  • Truffle

  • Ganache

  • Solidity

  • The Graph

For all smart contract interactions from an Externally Owned Account (EOA), you should be able to get by with just Web3.js; or the equivalent libraries/tools which support the Ethereum Virtual Machine (EVM) and EVM Application Binary Interfaces (ABIs) in your favorite programming language or framework.

The subgraphs can be queried with GraphQL using simple HTTPS requests and all responses are in JSON format. Therefore, it should be compatible out-of-the-box with any language or framework of your choice.

Developer APIs

Last updated