API Reference

In this chapter, we provide technical information, resources, and guides that will help you effectively interact with and build on the Liminal.market platform. You'll find details about our platform's architecture, API documentation, integration guides, and more. Our goal is to empower you with the knowledge and tools you need to create innovative applications and services that leverage the unique features of Liminal.market.

We value the contributions and insights of the developer community, and we're excited to collaborate with you as we work toward our shared vision of a more open and accessible financial system. Thank you for joining us on this journey.

For a visual overview of our vision, we invite you to watch this video: Liminal.market Vision.

TL;DR

Ready for the geeky stuff? Explore our GitHub repository and dive into the code!

Overview of the Platform

Liminal.market is a blockchain-based protocol designed to facilitate the seamless trading of securities, including stocks and exchange-traded funds (ETFs), with real underlying assets. The platform aims to bridge the traditional financial markets with the decentralized finance (DeFi) ecosystem, providing users with a secure and transparent way to invest in a wide range of financial instruments. In this section, we provide an overview of the key components and architecture of the Liminal.market platform.

Key Components

  • On-Chain Tokenization: Liminal.market employs tokenization to represent securities on the blockchain. Each security purchased through the platform is represented by a unique SecurityToken, which is an ERC20 token with certain limitations. The platform also utilizes aUSD tokens to represent the value held in users' brokerage accounts.

  • 1:1 Collateralization: The platform ensures true 1:1 collateralization for every security purchased. When users invest through Liminal.market, they are buying the actual underlying asset on the stock market, and each asset is represented by an equal amount of on-chain tokens.

  • Broker Integration: Liminal.market integrates with a licensed securities broker (Alpaca Securities LLC) to execute trades on traditional stock exchanges. The broker handles order execution, custody of assets, and regulatory compliance.

  • KYC/AML Compliance: To comply with regulatory requirements, Liminal.market requires users to complete Know Your Customer (KYC) and Anti-Money Laundering (AML) verification before executing trades.

  • Corporate Actions Handling: The platform automates the handling of corporate actions, such as stock splits, dividends, and mergers, ensuring that users' holdings are accurately adjusted as needed.

Platform Architecture

The architecture of Liminal.market consists of both on-chain and off-chain components:

  • On-Chain: The on-chain components include smart contracts deployed on the an EVM blockchain that handle tokenization, order management, and other functions. The on-chain components are transparent and auditable by the public.

  • Off-Chain: The off-chain components include interactions with the licensed securities broker for trade execution, as well as the handling of KYC/AML verification. While off-chain activities are not directly visible on the blockchain, they are managed by regulated entities subject to oversight and compliance standards.

Liminal.market's architecture is designed to provide a secure, transparent, and user-friendly experience for trading securities. By combining the benefits of blockchain technology with the robust infrastructure of traditional financial markets, Liminal.market aims to unlock new possibilities for investors and developers alike.

API Documentation and SDKs

Liminal.market provides developers with a comprehensive set of tools and resources to interact with the platform and build innovative applications. This includes detailed API documentation and software development kits (SDKs) that simplify the integration process. In this section, we'll explore the API documentation and SDKs available to developers.

API Documentation

The Liminal.market API enables developers to programmatically interact with the platform's features and services. The API provides access to a range of endpoints for tasks such as fetching market data, placing and managing orders, and retrieving account information. Detailed API documentation is available on the Liminal.market GitHub repository, where you'll find information about available endpoints, request and response formats, authentication, and usage guidelines.

SDKs

To further streamline the development process, Liminal.market offers SDKs that provide pre-built functions and libraries for interacting with the platform. The SDKs are designed to be easy to use and integrate into your applications.

  • TypeScript SDK: The TypeScript SDK provides a set of TypeScript libraries for interacting with the Liminal.market API. It includes functions for performing common tasks such as placing orders, fetching market data, and managing accounts. The TypeScript SDK is available on the Liminal.market GitHub repository, along with usage instructions and examples.

  • More SDKs Coming Soon: Liminal.market is actively working on expanding its SDK offerings to support additional programming languages and use cases. Stay tuned for updates and new SDK releases.

Smart Contracts

Liminal.market leverages the power of smart contracts to facilitate secure and transparent transactions on the blockchain. Our smart contracts are a fundamental component of the platform, enabling the tokenization of securities, order management, and other essential functions. As a developer, you have the opportunity to explore and interact with these smart contracts to gain a deeper understanding of the platform's inner workings.

Verified and Open Source

Transparency and security are core values of Liminal.market. To uphold these values, our smart contracts are verified on-chain and made available as open source. This means that you can review the contract code, verify its functionality, and gain insights into the mechanisms that drive the platform. By providing open access to our smart contracts, we aim to foster trust and collaboration within the developer community.

Accessing the Smart Contracts

The source code for Liminal.market's smart contracts is available on our GitHub repository. Here, you'll find the contracts for tokenization, and other key features of the platform. The repository also includes detailed documentation that explains the purpose and functionality of each contract.

We encourage you to explore the smart contracts and documentation to gain a comprehensive understanding of the Liminal.market platform. Whether you're integrating with our services or building new applications, the smart contracts provide a solid foundation for your development efforts.

Smart Contract Addresses

The smart contract addresses for Liminal.market on the Mumbai Polygon testnet can be found on our GitHub repository. These addresses provide access to the platform's key smart contracts, including those for tokenization, order management, and more. Developers can use these addresses to interact with the platform's smart contracts on the testnet.

Security Considerations

As developers build and integrate with the Liminal.market platform, security should be a top priority. Ensuring the safety and integrity of user data, assets, and interactions is critical to maintaining trust and confidence in the platform. In this section, we will discuss security best practices and considerations for developers, as well as potential risks and mitigation strategies.

Best Practices for Developers

  • Code Review and Auditing: Before deploying any smart contracts or applications, conduct thorough code reviews and audits to identify and address potential vulnerabilities. Consider engaging third-party security experts to perform independent audits of your code.

  • Input Validation: Implement robust input validation to prevent malicious data from being processed by your application. Validate all user inputs, API responses, and external data sources to ensure they meet the expected format and constraints.

  • Access Controls: Implement strict access controls to restrict who can interact with sensitive functions and data. Use role-based access controls, multi-signature wallets, and other mechanisms to limit access to authorized users only.

  • Error Handling: Implement comprehensive error handling to prevent unexpected behavior and provide informative feedback to users. Ensure that your application handles errors gracefully and does not expose sensitive information in error messages.

  • Secure Key Management: Protect private keys and other sensitive credentials using secure key management practices. Do not hardcode keys in your code and use secure key storage solutions.

Potential Risks and Mitigation

  • Smart Contract Vulnerabilities: Smart contracts are immutable once deployed, making it essential to address vulnerabilities before deployment. Mitigate this risk by conducting thorough code audits, using established security patterns, and testing your contracts extensively.

  • Phishing and Social Engineering: Educate users about the risks of phishing and social engineering attacks. Encourage them to verify the authenticity of websites, emails, and communications before providing sensitive information.

  • Dependency Risks: Be cautious when using third-party libraries and dependencies. Ensure that they are reputable, well-maintained, and have undergone security audits.

Conclusion

Security is a shared responsibility, and developers play a crucial role in safeguarding the Liminal.market ecosystem. By adhering to security best practices and proactively addressing potential risks, developers can contribute to a secure and reliable platform that benefits all users. We encourage developers to stay informed about emerging security threats and to collaborate with the community in addressing security challenges.

Community and Support

Liminal.market values the contributions of the developer community and encourages collaboration and knowledge sharing. Developers can join the Liminal.market Discord server to connect with the development team, ask questions, and discuss ideas with other community members. Additionally, you can follow Liminal.market on Twitter for the latest news and updates.

We're excited to see the innovative solutions and services that developers will build using the Liminal.market API and SDKs. Whether you're creating trading bots, portfolio management tools, or DeFi integrations, Liminal.market provides the tools and resources you need to bring your ideas to life.