We have some thrilling news to share today that will surely resonate with all of you who have eagerly been anticipating the launch of KoinDX. It is with immense pleasure that we announce the open-sourcing of our core and periphery smart contracts—the very heartbeat of KoinDX. This is truly a milestone for KoinDX that brings us one giant leap closer to our long-awaited launch.
Why the protocol contracts are now open source
From day one, we developed the contracts with the idea to open source them. We believe that the true essence of blockchain lies in its decentralized and collaborative nature, and with open source, we invite everyone to actively participate in shaping the future of KoinDX.
There are many reasons why smart contracts should be open source. We think security, auditing, transparency, trust and community collaboration are among the most important ones.
- Security and Auditing: Open sourcing smart contracts allows a larger community of developers to review the code, identify vulnerabilities, and propose improvements, leading to higher security and reduced risks.
- Transparency and Trust: Open source fosters transparency by making the contract code accessible to anyone, building trust and confidence in the project among users and stakeholders.
- Community Collaboration: Embracing open source encourages collaboration among developers and stakeholders, leading to innovative ideas and optimized solutions through collective intelligence.
The KoinDX v2 protocol
KoinDX's v2 Periphery and Core smart contracts form the backbone of our dentralized exchange. They enable efficient token swaps and liquidity management. The Periphery contract acts as a central intermediary, facilitating interactions between various token pools and end users. It offers functions to calculate entry and exit inputs for liquidity addition and removal, as well as token swaps and pool verification. Through the use of read-only functions like "get_config" and "get_pair," users can access contract settings and retrieve contract addresses for specific token pools. Additionally, state-changing functions like "add_liquidity" and "swap_tokens_in" enable users to add liquidity to pools or execute token swaps with precise input amounts. Furthermore, the Periphery contract can be updated using "authorize_update" and "set_config" functions, ensuring the system remains adaptable and secure.
In contrast, the Core contract serves as the foundation of the KoinDX V2 protocol, managing and storing user liquidity while acting as the contract for specific token pairs. Essential read-only functions such as "name," "symbol," and "decimals" provide crucial information about the liquidity token associated with a pair. Users can also query token balances through the "balance_of" function and determine allowed spending limits with the "allowance" function. State-changing functions like "transfer," "approve," and "initialize" enable the transfer and management of liquidity tokens and the setup of new token pairs within the Core contract. The Core contract is further enhanced by events such as "mint," "burn," and "swap," providing real-time updates on liquidity additions, removals, and token swaps. Overall, the collaboration between the Periphery and Core V2 smart contracts ensures seamless liquidity provision and efficient token trading on the KoinDX platform.
The following diagram will help you to understand how our contracts work and interact.
These are the links to our open sourced v2 repositories. Please take a look and feel free to share your feedback with us:
If you want to know more about the contracts, take a look at our docs:
In conclusion, we want to express our gratitude to the incredible KoinDX community for your support and enthusiasm. As we take this bold step in open sourcing our core and periphery smart contracts, we invite all developers to join us on GitHub. Your invaluable feedback and contributions will play a pivotal role in shaping KoinDX into the world-class decentralized exchange we all envision. Together, let's embrace the spirit of collaboration and create a DEX that revolutionizes the way we trade and interact. Thank you for being an essential part of this incredible journey.