Aiken is a smart contract programming language designed specifically for Cardano, aiming to simplify the development process while offering a modern and efficient environment for building smart contracts. In this article, we’ll explore what Aiken is and take a closer look at some notable projects building on it.
What is Aiken?
Aiken stands as a pioneering smart contract programming language tailored to meet the unique demands of Cardano’s blockchain ecosystem. Aiken introduces a fresh and approachable language, which is designed to simplify the process of developing smart contracts while fostering efficiency and security. Unlike traditional smart contract languages, Aiken brings several innovative features to the table:
One of its standout features is its Familiar Syntax — Aiken adopts a C-family syntax, aligning itself with programming languages like Rust and TypeScript. This decision empowers developers already comfortable with these languages to transition seamlessly into Aiken.
To harness the full potential of Aiken, eUTxO Knowledge is Required. Developers must grasp the intricacies of the extended UTXO (eUTxO) model, which governs the way transactions and smart contracts function within Cardano. This knowledge is pivotal for building secure and efficient smart contracts.
Aiken’s primary focus lies in being On-chain. It is meticulously crafted exclusively for the Cardano blockchain, ensuring that it is optimized for on-chain execution. This specialization is a crucial advantage, particularly for developers looking to create robust on-chain applications.
Aiken harmoniously balances its on-chain dedication with Off-chain Compatibility. It remains compatible with off-chain processes and external tools, enabling seamless integration with external components and tools. This interoperability broadens the spectrum of development possibilities for Cardano-based applications.
While Aiken adopts a familiar syntax, it retains its essence as a Purely Functional language. This functional programming paradigm emphasizes immutability, referential transparency, and the absence of side effects. It challenges developers to adapt their thinking and methodologies, particularly those coming from imperative programming backgrounds.
Another valuable feature is Blueprint Stub Generation. Aiken simplifies the integration of off-chain components by offering blueprint stubs. These serve as templates, facilitating the development process and promoting interoperability within the Cardano ecosystem.
Aiken also places a strong emphasis on security through its Property-based Framework and Formal Verification. This approach enables developers to define, test, and mathematically prove smart contract properties and invariants. The result is an enhancement in contract quality, safety, and robustness. Aiken also provides an integrated unit test and benchmarking framework for code hardening and experimentation.
Lastly, Aiken equips developers with a Comprehensive Toolchain, which includes a compiler, code formatter, package manager, language server, documentation generator, and testing framework. These tools streamline the development process, empowering developers to build, test, and deploy smart contracts efficiently.
Projects Building on Aiken
Several projects within the Cardano ecosystem are harnessing the capabilities of Aiken to create more efficient and secure smart contracts. Let’s delve into some of these projects:
SundaeSwap: Enhancing Efficiency and Security
Through Aiken, SundaeSwap, the first AMM-style Decentralized Exchange on Cardano, has improved the efficiency, security, and scalability of their smart contracts. A YouTube video showcases Aiken’s impact, highlighting a staggering 2016.7% performance increase in the rate of orders filled compared to the SundaeSwap V1 Smart Contract.
Jpg.store, the leading NFT marketplace on Cardano, utilizes Aiken to enhance its V3 smart contracts. The audit of these contracts, completed by Sundae Labs, revealed substantial performance improvements. Notably, the V3 contracts allow for seamless bulk purchases on the marketplace with a single signature, reducing fees for users.
LenFi, a lending and borrowing protocol, is currently undergoing an audit for its V2 release, which incorporates Aiken. The update introduces pooled lending and, notably, flash loans — a first on Cardano. Community manager Neophyte shared, “The audit for LenFi V2 is progressing smoothly, thanks in large part to Aiken’s robustness.”
Butane, an open synthetic protocol building on Cardano, is utilizing Aiken to create a more secure and versatile ecosystem. Here’s the complete quote from Micah, a developer at Butane, on how they are using Aiken:
“Butane is using Aiken to separate concerns in our validators and enable greater reassurances with respect to certain invariants. One example — multivalidators means it is easy to guarantee that any CDP bond corresponds uniquely to some CDP position (whether it is live or liquidated), because we are able to implement what’s called a ‘locked validator’ very easily, and also from the same minting hash as the script hash, mint the bonds so that validation happens without any need for some reference token. So, it is easier to write logic where you have a bond tied to a particular position.”
Aiken’s impact on Cardano is undeniable, as it empowers developers and projects to create more efficient, secure, and innovative smart contracts. With projects like SundaeSwap, Jpg.store, LenFi V2, and Butane leading the way, Aiken is poised to play a pivotal role in the future of Cardano’s smart contract ecosystem.
Insights from Micah, Lead Developer of Butane Protocol
Micah, the lead developer of Butane Protocol, shared valuable insights into the benefits of using Aiken for smart contract development on Cardano:
“I’ve been writing Aiken since around August last year, even before it could compile. I was part of the developer experience working group by IOHK. I quickly transitioned from using PlutusTx to Aiken, wrote some of the early documentation, and started recommending it fairly early on. I would describe myself as a minor contributor to Aiken.”
Micah highlighted the stark contrast in developer experience between Aiken and PlutusTx, stating:
“In terms of using it, it is a dream compared to PlutusTx. The problem with PlutusTx is a mix of tooling issues and language issues.”
He elaborated on one of the major issues with PlutusTx:
“PlutusTx had this entire infrastructure problem with Nix where you had to use a particular version of Haskell libraries. Because it is an embedded DSL (eDSL), you had to recompile all of those libraries every single time you wanted to try a new version of your contracts.”
However, Aiken’s approach to compilation was a game-changer:
“Where Aiken is really great is the Aiken language is a single binary executable that compiles my .ak source files into a UPLC blueprint in less than a second. My iteration time for very minor changes to contracts used to be 3–10 minutes waiting for everything to build and tests to run each time, largely because of the compiler problems. Aiken takes seconds, and with tooling such as the Lucid emulator, I can make code changes and see my completed end-to-end tests in less than 20 seconds.”
Micah emphasized the impact of slow iteration times:
“If you understand development as this iterative process, then it is easy to understand how if you take ages to run your tests and compile your code, you’re unable to make improvements or theorize about your model because you don’t have any results.”
He also highlighted Aiken’s strengths:
“So entirely from the devex side, Aiken is just amazing because it is entirely self-contained and fast (eDSL vs. DSL, an eDSL is actually embedded in a host language like Haskell, whereas a DSL has its parser and syntax).”
Micah went on to discuss Aiken’s syntax and its role in enhancing clarity:
“Then we can jump onto the features of Aiken. Because it has its syntax, it’s able to minimize noise, which increases the clarity of reading and writing it.”
Aiken’s optimization capabilities were also a point of praise:
“Aiken is incredibly optimal too because frankly the PlutusTx language was garbage. Un-optimized Aiken was faster than PlutusTx. This was simply because they weren’t trying to squeeze a certain programming paradigm into another. It was a nice case of ‘simple is better.’”
He also elaborated on specific optimizations in Aiken:
“One other major feature Aiken has is multivalidators. Aiken implements this seamlessly, which makes certain protocols easier to express.”
Micah’s insights shed light on how Aiken’s streamlined development process and superior performance have made it a preferred choice for developers working on projects like Butane Protocol within the Cardano ecosystem.
Catalyst for Efficient Development and Wider Developer Adoption
Aiken, the purpose-built smart contract programming language for Cardano, promises to usher in profound transformations within the Cardano ecosystem. It serves as a catalyst, driving enhanced efficiency in development, increased throughput, and a more enticing environment compared to Plutus and Haskell.
Aiken’s significant contribution lies in its ability to streamline and expedite smart contract development. Unlike its predecessors, such as Plutus and Haskell, Aiken introduces a simplified and user-friendly syntax, reducing the learning curve for developers. This agility allows for quicker smart contract deployment. Additionally, Aiken’s swift compilation times and compatibility with essential tools like the Lucid emulator significantly reduce iteration times. This empowers developers to make rapid improvements and experiment with their smart contract models, fostering innovation within the ecosystem.
With Aiken’s introduction comes the promise of higher throughput for smart contract execution on the Cardano blockchain. The language’s optimization and tailored design for on-chain execution translates into faster transaction processing. This heightened throughput enhances user experiences and enables more complex and resource-intensive decentralized applications (dApps) and protocols. As the Cardano ecosystem continues to expand, this increased throughput becomes crucial in accommodating the growing demand for smart contract interactions.
Perhaps the most transformative aspect of Aiken’s arrival is its potential to attract a more extensive developer community to the Cardano ecosystem. Aiken’s familiar syntax and reduced learning curve, particularly when compared to Plutus and Haskell, are likely to entice developers from diverse backgrounds. This developer-centric approach can accelerate the growth of the Cardano community, a vital asset in the blockchain world. With a more accessible and developer-friendly environment, Cardano becomes better positioned to compete with other blockchain platforms in attracting top talent.
Aiken is poised to revolutionize the Cardano ecosystem. Its streamlined development process, higher throughput, and developer-friendly approach set it apart from its predecessors, Plutus and Haskell. By simplifying smart contract creation, Aiken not only accelerates innovation but also draws in a more diverse developer community. Cardano is now better positioned to thrive in the competitive blockchain landscape, thanks to Aiken’s pioneering advancements.
Cardano Catalyst Project - Discover and Vote for our proposals in Fund 10 by Sep 14th, 2023 11:00 UTC
If you are you using your ADA to vote in Cardano’s Project Catalyst don’t forget to voice your vote. We would be excited if you can see, comment, share and vote for us. Our Proposals.VOTE FOR US!