Optim Account : Pioneering a New Era of Dapp Development on Cardano

Optim Labs
13 min readDec 1, 2023

DeFi’s core strategic advantage over TradFi models lies in its inherent composability and interoperability, fostering seamless integration and fluidity that the compartmentalized and opaque nature that traditional finance lacks.

Compared to other blockchains, Cardano is known for prioritizing security through the deterministic nature of its transactions. However, Cardano’s determinism inadvertently introduces bottlenecks in the fluid integration and interoperability necessary for a vibrant DeFi ecosystem.

For Cardano to fully tap into the potential of its DeFi ecosystem, it requires a more interoperable and composable environment. At Optim, we are designing an innovative solution to address these challenges on Cardano.

This initiative isn’t just a workaround; it represents a strategic shift to open a new paradigm for dapp development on Cardano. It aims to further improve concurrency issues and steer the DeFi landscape towards greater composability and interoperability while preserving security.

In this article, we will break down the concept of the Optim-Account and how it is poised to transform the DeFi landscape of Cardano.

The Dichotomy of Composability and Security in DeFi

Composability in DeFi is akin to the interoperability of sophisticated software modules in a complex system architecture. It enables diverse components within the DeFi ecosystem to interact seamlessly, creating a synergistic environment. This seamless interaction is facilitated through standardized interfaces and APIs across various smart contracts, which are integral to the DeFi infrastructure.

Ethereum’s Composable and Interoperable DeFi

Ethereum’s ecosystem serves as a testament to the power of composability. In the Ethereum ecosystem, each smart contract within the protocol is accessible to the public and can be invoked by any other contract.

This allows for intricate financial maneuvers, such as using a stablecoin from one dApp as collateral in another’s lending protocol, followed by trading the borrowed assets on a decentralized exchange to be executed programmatically rather than manually. This seamless interplay accelerates innovation, empowering developers to construct complex financial instruments by leveraging existing smart contracts and dApps.

Composability in Ethereum reduces transaction friction, enabling advanced financial mechanisms like atomic swaps and flash loans. These mechanisms are executable within a single transaction block, fostering a dynamic and fluid ecosystem. Developers are thus empowered to innovate on top of existing structures without the need to develop foundational elements from scratch. While Ethereum faces its own set of challenges with high gas fees and network congestion, its account-based model inherently allows for a higher degree of concurrency, albeit with trade-offs in terms of state management and network overhead.

Yearn.Finance: Utilizing Composability for Yield Optimization

Yearn.Finance is a yield optimization platform that aggregates various DeFi protocols. It employs smart contracts to dynamically determine the most profitable strategies for depositors’ funds across different protocols.

Source: https://cryptonews.com/news/yearnfinance-s-yeth-vault-getting-filled-grabbing-cryptovers-7603.htm

The platform’s ability to seamlessly integrate and interact with multiple DeFi protocols for yield farming is a classic example of composability. It leverages the interoperable nature of Ethereum’s ecosystem to move users’ funds between protocols like Aave, Compound, and others to maximize returns.

This approach offers users enhanced capital efficiency and savings on transaction fees compared to individuals manually moving funds between these protocols. The increased efficiencies and decreased on-chain congestion from aggregating user funds in a vault structure not only improve the user experience, but also the ecosystem as a whole.

Yearn.Finance simplifies and automates complex strategies, making them accessible to a broader range of investors.

Synthetix: Creating Synthetic Assets By Leveraging Composability

Synthetix is another illustration of composability in DeFi, known for creating ‘Synths’. Synths are tradable versions of any asset in the world, with their value derived from the underlying asset. The composability of Synthetix enables other DeFi applications to interact with its smart contracts and create new services, such as providing liquidity for permissionless derivatives like perpetual futures, options, and more.

Source: https://blog.synthetix.io/what-is-synthetix-v3/

The upcoming Synthetix V3 introduces collateral agnosticism, allowing it to accept various types of collateral. This feature further enhances its composability, enabling Synthetix to interact more flexibly with other assets and protocols within the DeFi ecosystem.

The Indeterministic Nature of Ethereum Transactions and Its Implications

This enhanced composability brings an indeterministic nature to transactions on Ethereum. Unlike the UTXO-based model of Bitcoin, where transactions are immutable, Ethereum’s account-based model features mutable ledger data. Consequently, a transaction’s outcome can be unpredictable, depending on whether it is processed before or after another transaction that updates the same account.

Such unpredictability can lead to a range of problems, including unexpected script validation outcomes, unforeseen fees, unanticipated ledger or script state updates, and risks predominantly stemming from the complexity and interconnectedness inherent in composable systems.

Reentrancy Attacks

Reentrancy attacks occur when a malicious actor takes advantage of the recursive calling capability of smart contracts. In such an attack, a function within a smart contract is repeatedly called before the first instance of the call is fully resolved, leading to unintended consequences.

These attacks exploit the fact that the state of the smart contract may not be updated immediately or correctly after each call. For example, if a contract sends funds to an address before updating its internal state, the recipient might call back into the contract, retriggering the funds transfer before the initial state change is recorded.

The most notable example is the DAO attack on Ethereum, where a reentrancy bug was exploited, leading to substantial financial loss which required a forking of the chain to revert the transaction. This controversial decision led to the creation of Ethereum Classic.

Composability Risks

As DeFi platforms become more interconnected, they form complex execution stacks where multiple contracts interact in a single transaction. This complexity increases the surface area for potential bugs and vulnerabilities.

Developers must carefully analyze how their contracts interact with other third-party contracts. A single flaw in one contract can propagate through the entire stack, leading to cascading failures or exploits.

Predicting and safeguarding against every possible interaction can be daunting, if not impossible, given the number of variables and the dynamic nature of these contracts.

Why Cardano Opted for the Deterministic Path?

Cardano adopted a deterministic transaction processing model to ensure predictability, security, and high assurance in the system. Being fundamentally built on deterministic transactions, this model allows users to anticipate the impact and outcome of a transaction before execution. Cardano’s deterministic nature is underpinned by its eUTxO model, meaning each transaction is programmed to yield a predictable outcome, determined by its inputs and outputs. When a transaction is initiated, its outcome is pre-defined based on these parameters.

Cardano’s transaction verification process is a two-phase approach:

Verification of Inputs and Outputs: The first phase involves verifying the availability and validity of the inputs and outputs, crucial for ensuring the transaction components are correct and ready for use.

Script Correctness Assessment: The second phase assesses the correctness of the scripts involved in the transaction. This step is vital for maintaining the transaction’s integrity, confirming that the scripts execute correctly in accordance with the blockchain’s rules.

However, deterministic transactions come with their own trade-offs.

Problems With Cardano’s Deterministic Transaction Processing

The concurrency issue in Cardano arises when multiple transactions compete for the same UTXOs. This deterministic system processes transactions predictably, with specific inputs leading to defined outputs, ensuring security. However, it struggles when multiple transactions target the same UTXO, causing delays or failures in processing subsequent transactions.

This bottleneck slows down transaction throughput, impacting users with longer wait times or the need to resubmit transactions, incurring extra costs and frustration.

The problem intensifies on DeFi platforms with high transaction volumes and simultaneous smart contract interactions. As more users and applications engage with the Cardano network, its ability to efficiently process numerous transactions and handle concurrent interactions becomes crucial. The current limitations impede the blockchain’s scalability.

In Cardano’s eUTxO model, managing transactions and contracts is more complex than in account-based models like Ethereum, posing challenges for sophisticated state management and coordination in application development. Cardano’s security comes at the cost of scalability and flexibility, impacting users and the blockchain’s performance, particularly during peak loads and complex operations in DeFi. Thus, DeFi requires a blockchain infrastructure capable of high concurrency.

Optim-Account as a Solution

The concept of Optim-Account is conceived as a response to inherent limitations within Cardano’s existing architecture, particularly addressing issues related to transaction concurrency and deterministic processing. Rooted in a comprehensive understanding of blockchain mechanics and user experience, the Optim-Account system introduces a paradigm shift in how transactions are conceptualized and executed within the Cardano ecosystem.

Intent-Based Transactions

Source: https://www.btcwires.com/round-the-block/embracing-intents-the-future-of-decentralized-exchanges/

At the core of the Optim-Account system is the innovative concept of intent-based transactions, diverging from traditional direct blockchain transaction submissions. Users articulate their transactional goals as ‘intents’, a digital method of conveying desired outcomes without initiating blockchain operations. These intents offer a simpler, more abstract yet precise interaction with the blockchain, easing complexity.

Intent-Based Transactions focus on specifying the “what” rather than the “how” of desired outcomes. Traditional transactions require users to define every parameter, but intents allow users to state their end goals and leave execution to ‘solvers’. For example, traditional transactions might demand “do A then B, pay C to get X,” while intent-based transactions would simply state “I want X and am willing to pay up to C”, letting solvers handle technical details.

The process of conveying user intents in the Optim-Account is akin to sending messages. Users articulate their transactional needs in the form of these messages, which encapsulate the essence of their intended blockchain interactions. This abstraction not only simplifies the user experience but also enhances the system’s efficiency.

By decoupling the user’s direct engagement with the blockchain’s intricacies, the system effectively opens the door to a more intuitive and accessible blockchain experience, even for users who may not possess extensive technical knowledge of blockchain operations.

Here’s a step-by-step explanation of how the Optim-Account works from a user perspective:

Accessing the Optim Dashboard

The journey into the Optim-Account system begins with the user accessing the Optim Dashboard, which functions like a specialized wallet interface within the Cardano ecosystem. This dashboard serves as the primary interaction point for managing transactions and engaging with various applications.

Funding the Optim-Account

The next step is funding the account. Users select the option to add funds, which involves transferring ADA, the native cryptocurrency of the Cardano, into their Optim-Account. This process is similar to topping up a digital wallet and is essential for facilitating transactions within the ecosystem.

Exploring and Approving Applications

Once the account is funded, the user can view and interact with different applications available in the ecosystem. This could include applications for airdrops, trading, staking, and other DeFi services.

Before interacting with any application, users must grant permission for it to access their funds or perform specific actions. This approval process is a critical security measure, ensuring that users maintain control over their assets.

Creating Transaction Intents

After granting permissions, users can initiate actions within these applications. Instead of conducting direct blockchain transactions, users create what are known as ‘transaction intents’. This involves inputting the details of the intended action, like participating in an airdrop or executing a trade.

The system then acknowledges these intents and queues them for processing, simplifying the user’s interaction with complex blockchain mechanics.

Here are two examples of potential Optim-Account interactions:

  1. Composable Yield Farming

Regular Cardano Interaction:

  • In the conventional yield farming process on the Cardano ecosystem, users engage in a manual and somewhat laborious process. They select and stake assets across various liquidity pools or lending protocols to accrue returns. This method necessitates executing multiple transactions, each adding to the cumulative costs and time.
  • The manual nature of this approach demands continuous oversight. Users are required to vigilantly monitor and readjust their staked positions across diverse platforms to ensure optimal returns, a process that can be intricate and time-intensive.

Optim-Account Potential Interaction:

  • The advent of Optim-Accounts marks a significant departure from this traditional method. Users could establish automated strategies that efficiently manage the relocation of assets across different yield farming platforms, aiming to maximize returns.
  • Rather than executing numerous individual transactions, users would issue a series of ‘intents’ to their Optim-Account. This system intelligently batches and sequences these intents, transforming them into optimized transactions.
  • A key feature of the Optim-Account is its dynamic adaptability. An example of this would be the autonomous modification of a user’s assets within or across dApps participating in OA ecosystem in response to fluctuating conditions such as interest rate variations, without necessitating manual authorization for each adjustment.
  • This innovative approach offers a streamlined, cost-effective, and user-friendly experience, significantly reducing manual intervention while enhancing the potential for creation of and interaction with more advanced and beneficial financial instruments.

2. Composable Stablecoin Protocols

Regular Cardano Interaction:

  • Engaging with stablecoin protocols in the traditional framework, especially for tasks like managing collateralized debt positions (CDPs), involves executing a sequence of discrete transactions for each specific action.
  • This process places a substantial burden on users, who must continuously monitor their collateralization ratios and promptly adjust their positions to avert potential liquidation, necessitating an ongoing, attentive engagement with market dynamics.

Optim-Account Potential Interaction:

  • Optim-Accounts would revolutionize this scenario by introducing an automated management system for CDPs across various stablecoin protocols.
  • Users could articulate their operational intents for opening, supervising, and modifying CDPs, which are predicated on predetermined guidelines or algorithms. These intents wouldthen processed efficiently by the Optim-Account.
  • A notable feature of this system would be its ability to autonomously manage the user’s collateralization ratio. It would do so by adeptly transferring assets between CDPs or executing liquidations as required, all within a cohesive, streamlined transactional framework.
  • This methodology substantially simplifies the user experience. It reduces the risks inherent in manual CDP management, notably the risk of liquidation due to delayed responses to market changes, ensuring a more secure and user-friendly stablecoin interaction experience within the Cardano ecosystem.

Interacting with Non-Optim Integrated Systems

Initially, if a user wants to interact with systems or applications that are not yet integrated with the Optim-Account, they would need to transfer funds back to their regular Cardano wallet to conduct transactions in the traditional manner. Optim is exploring modules that would enable seamless interaction between OA assets and applications and legacy protocols that are not yet integrated.

Monitoring and Managing Transactions

An essential aspect of the Optim-Account is the ability to monitor and manage transactions. Users can easily navigate to their transaction history or account overview to keep track of past activities, pending intents, and the current status of their account. This feature provides transparency and helps users stay informed about their blockchain interactions.

Finally, the Optim Dashboard serves as a continual touchpoint for users to engage with the blockchain. Whether returning to perform additional activities or logging out, the dashboard dynamically updates with the latest information, keeping users connected and informed.

Role of Sequencers in Optim-Accounts

Sequencers in Optim-Accounts are crucial intermediaries between user intents and blockchain transaction execution. Optim-Accounts use a network of sequencers to handle concurrency, interpreting and validating user-signed intents. They ensure these intents conform to system protocols and user permissions.

Sequencers batch and optimize transactions, addressing concurrency and resource contention issues, enhancing blockchain efficiency and scalability.

The crucial distinction between batchers and sequencers is that sequencers are ecosystem wide, cross-application transaction bundlers that enable more complex interactions and greater optimizations due to their enhanced scope.

Security and Protection Mechanisms in Optim-Accounts

Optim-Accounts feature multiple security layers:

User Approval System: One of the primary defenses against unauthorized access and transactions is the user permission system. Users have to explicitly grant permission to applications before these can interact with their account or funds. This means that no application can initiate transactions or access funds without the user’s consent, significantly reducing the risk of unauthorized wallet drain.

dApp Specific Funding Limits: Another security measure are strict limits that can be set for each specific dApp on the amount of funds it is approved to use. These limits can be set separately for both funds used within the dApp as well as gas fees paid to execute transactions.

Integrity Checks by Sequencers: They ensure that each transaction intent aligns with the user’s permissions and the system’s rules.

The Current Status and Upcoming Developments

The Optim-Account system is gearing up for a significant milestone with the planned release of its Mainnet Beta version in Q1 2024. This pivotal launch, while introducing a fully functional system, will initially operate in a non-permissionless mode.The strategic approach behind this phased launch is to ensure stability and security as it integrates into the broader blockchain ecosystem.

Our overarching vision for the Optim-Account system is to elevate it to the status of a Public Good within the Cardano ecosystem, a goal that hinges not only on its technological capabilities but also on widespread community acceptance and support.

Central to the evolution of the Optim-Account system is the engagement and contribution of the Cardano community.

The development team is seeking support in two key areas:

  1. Funding through initiatives like Catalyst to propel further innovation and development,
  2. Active contributions from the community for the V1 release of the account system.

These community contributions are crucial, especially with the upcoming integration of Plutus V3, as they will help tailor the Optim-Account system to meet diverse user needs.

In the months following the Beta release, the focus will shift towards collaborative efforts to standardize the Optim framework, ensuring it not only aligns with technological advancements but also resonates with the Cardano community’s aspirations, making it a truly communal and versatile tool in the Cardano ecosystem.

Envisioning the Future with the Optim Account System

In conclusion, the Optim-Account system marks a revolutionary advancement in the Cardano ecosystem, addressing key challenges like transaction efficiency and accessibility. By integrating sequencers and intent-based processes, it addresses issues like concurrency and resource contention, offering a practical approach to enhancing Cardano’s capabilities. This system is an important step in evolving blockchain interactions, combining technical improvements with a focus on user needs.

As the system approaches its Mainnet Beta release, it aspires to contribute positively to the Cardano ecosystem. This upcoming release is an important milestone, focusing on functional deployment while emphasizing stability and security in blockchain transactions. The success of the Optim-Account system will largely depend on its technological capabilities and the support it receives from the Cardano community.