Nexera-Fi SDK

Introduction

The Nexera-Fi SDK is a development kit designed to interact with Nexera-Fi smart contracts, including Adapters, Orchestrators, and OrchestratorFactory on various blockchain networks. It simplifies the process of connecting to these contracts and provides its users with the tools they need to create and customize financial strategies within the Nexera-Fi unified framework, seamlessly and safely interacting with popular DeFi protocols.

Serving as a middle-level interface, it is intended for both developers looking to integrate Nexera-Fi into their projects, and users who want to manage and create financial strategies in the DeFi landscape, whether they are simple or complex, with ease.

Nexera-Fi SDK Features

Transaction Aggregation

Nexera-Fi SDK streamlines the execution of a sequence of actions against DeFi protocols and reduces the number of required blocks by aggregating them into a single blockchain transaction through the use of Dynamic Strategy Orchestrators.

Transaction Aggregation

Cross-Protocol Interaction

The Development Kit allows for the execution of strategies that involve multiple DeFi protocols. This is not just a matter of convenience; it is a necessity for strategies that require synchronized actions across different platforms.

dev2

Developers can implement strategies that tap into different pools of liquidity, interact with various lending protocols, and execute trades on multiple decentralized exchanges (DEXes). This multi-protocol approach can be critical for strategies that, for example, need to quickly move funds to where they yield the highest return or need to manage collateral across different platforms to maintain favorable loan-to-value ratios. For investors and traders, the ability to interact with multiple protocols simultaneously means that arbitrage opportunities that would be too slow to execute manually or in separate transactions can now be captured. This could translate into better returns when small price discrepancies are identified across different DEXes. From a development standpoint, the ability to call functions across different protocols in one go means less coding, testing, and deployment time.

Supported Languages

The Nexera-Fi SDK is available in two popular programming languages:

TypeScript

The Nexera-Fi TypeScript SDK leverages the Ethers.js library and the Typechain plugin. Its main features include exporting the Nexera-Fi smart contract addresses as well as strongly typed instances of these contracts across different blockchain networks. By specifying the target chain ID, you can connect to these contract instances using an Ethers.js JSON-RPC Provider for read-only operations, or an Ethers.js Signer (wallet) for transactional activities.

In addition to its core features, the Typescript SDK also integrates a dedicated type-safe subgraph feature. It achieves this by leveraging TheGraph protocol, which is an indexing service for organizing and efficiently accessing data from blockchains, and a set of GraphQL tools. Multiple dedicated subgraphs are built and deployed, each serving Nexera-Fi smart contracts on a specific blockchain network. By specifying the target chain ID, you gain access to the corresponding subgraph object, directly connected to the respective GraphQL API. Each exported subgraph object exposes client-side queries, composed in GraphQL, offering a straightforward approach to accessing and analyzing indexed event-driven entities and on-chain data related to the target blockchain.


Python

The Nexera-Fi Python SDK leverages the Web3.py library. Its main features include exporting the Nexera-Fi smart contract addresses as well as instances of these contracts across different blockchain networks. By specifying the target network's chain ID and supplying a Web3 HTTP Provider you can seamlessly interact with the Nexera-Fi contract instances for both read-only operations and transactional activities.

Note: We are actively working on developing a subgraph feature for the Python SDK to provide Python developers with the same seamless access and analysis of on-chain data available in the TypeScript version.

On this page