Explore the Nex Labs universe

Build to last smart contract design forms to foundational layer of platform

At Nex Labs, our smart contract design begins by laying out the expansive Nex Labs universe, highlighting how all components interconnect to deliver robust, cross-chain functionalities. We illustrate our ecosystem's seamless integration across multiple chains, smart contracts, and decentralized infrastructure, setting the foundation for efficient, reliable, and scalable decentralized solutions.

Building on this comprehensive vision, we leverage industry-leading libraries, rigorous processes, and proven methodologies to ensure each smart contract meets the highest standards of security, performance, and maintainability. This section dives deeper into our design approach, emphasizing our commitment to quality through meticulous testing, strategic deployment practices, and ongoing alignment with established industry standards.

Explore The Nex Labs Universe: Smart contract Infrastructure, dApp and the crypto ecosystem relations

Frictionless User interaction

To deliver a seamless and intuitive user experience, we integrate Thirdweb's social login capabilities. By abstracting away the complexities of crypto through familiar social authentication methods, we significantly reduce entry barriers and align DeFi more closely with traditional user interactions.

Additionally, Nex Labs partners with Onramper, a leading payment infrastructure provider known for its high-conversion fiat-to-crypto and crypto-to-fiat transactions. Payment methods are broad including (but not exclusively):

  • Paypal

  • Credit/debit Cards

  • Apple Pay, Google Pay

  • SEPA Bank transfers

Furthermore, Onramper uniquely offers fee-free deposits, eliminating typical additional charges (often up to 5%), making it especially beneficial for larger transactions. Further streamlining the user journey, we remove intermediate steps from fiat directly to index tokens, eliminating the need for separate token deposits for gas fees. Leveraging Ethereum's recent Pectra update, we enhance our gas fee management, reducing costs and optimizing transaction efficiency.

Comprehensive Testing Framework

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.

Modern Deployment Practices

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.

Code example Nexlabs' Chainlink CCIP initiator, can be found here

Additionally, Chainlink functions is used to verify on-chain data against off-chain sources, ensuring data accuracy and improving trade efficiency.

Nexlabs Git code factory contract (where the core logic lives), integrating with Chainlink Functions client. Source

Keeping Up with Industry Standards

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

Last updated