Built-to-Last Smart Contract Design
Last updated
Last updated
At Nexlabs, we focus on creating durable and efficient smart contracts by using a well-structured and technology-driven approach. This section outlines our design methodology, highlighting the tools, libraries, and processes we use to ensure our contracts meet the highest standards.
Testing is a critical component of our smart contract development process. Unique to Nexlabs is that we can simulate smart contract behavior in realistic scenarios using advanced mock blockchain deployments. Following, the Foundry is used to conduct a variety of tests, including:
Unit Tests: These tests focus on individual components of the smart contracts, verifying their correctness in isolation.
End-to-End (E2E) Tests: We simulate real-world scenarios to validate the contract's behavior in a complete workflow.
Gas Fee Testing: Optimizing gas usage is important for efficiency. Our tests help ensure that our contracts are cost-effective to deploy and use.
Integration Tests: These tests ensure that all parts of the contract work well together, especially when interacting with external systems like oracles.
Nexlabs is a proud member of the Chainlink Build program. Together with Chainlink, our smart contract developers build strong integrations with Chainlink, using various of their services to the best of our advantage. Firstly, a private oracle service was built to connect and interact with smart contracts to update index constituents.
Furthermore, we have an automated setup for deploying multiple smart contracts, which streamlines the deployment process and reduces the potential for errors. This setup includes CCIP (Cross-Chain Interoperability Protocol). CCIP contracts communicate between Nexlabs' vaults across chains. Users interact on their desired EVM compatible chain, and Nexlabs trades the underlying assets across multiple chains. This completely abstracts away the concept of 'chains' and 'bridging' to users.
Additionally, we use private oracle services through Chainlink functions to verify on-chain data against off-chain sources, ensuring data accuracy and improving trade efficiency.
We continuously update our libraries and tools to align with the latest industry standards. Our development process includes using widely recognized libraries such as Hardhat, Foundry, and OpenZeppelin, ensuring our contracts are built on a solid and up-to-date foundation. For interacting with our smart contracts, please refer to our NPM package here.
For a deeper look into our contract architecture and design principles, visit our Nex Staking Contracts repository and Defi Indices Smart Contracts