So far as any monetary initiatives are involved, on-line safety is the primary fear. It wasn’t any totally different for the Obligate platform – utilized by firms to situation on-chain bonds and business paper to obtain funding from buyers in a regulated DeFi setting. The aim was to design easy, quick, and intuitive blockchain transactions with out compromising the platform’s security. On this article, you’ll learn the way blockchain engineering lowered Obligate’s bond issuance prices by 80% and lower down the issuance time from weeks to only a few hours!
About Obligate
Obligate got here up with an thought for a completely regulated software that can assist firms in issuing on-chain bonds and business paper to acquire funding from buyers.
They’d an outlined tech stack, some blockchain know-how, and a 1.0 model of an app that was reside for a yr however neither the corporate nor the end-users have been too pleased about it. The corporate wanted a associate to place all of it collectively right into a dream high-end tech answer.
Blockchain know-how. Issues to unravel
The primary mission aim was to construct a brand new and intensely safe blockchain-based monetary system.
1. Breaking down the microservices
The largest aim for Obligate was to design an structure that helps growing two major options of the app, predicting and prepping house for future modifications because the app converges to the ultimate product:
- Investing and borrowing,
- Buying and selling eNotes™.
The corporate had its justifiable share of technological hurdles and insisted on a microservices-based answer. The benefits are quite a few – encapsulating functionalities into separate companies makes it simpler to scale, simpler to work on options independently, and incentivizes writing well-organized code. Our concern was that within the early phases of growth, it might gradual us down on account of plenty of boilerplate and a stiff spine.
After cautious consideration and conversations with potential clients, Obligate’s thought for the service advanced. The boundaries of the preliminary microservices usually modified, and sadly, the event didn’t transfer as quick as anticipated.
After thorough deliberation, we settled on a modular monolith for the principle a part of the applying and a number of microservices with very slender and unbiased functionalities: queuing operations on the blockchain, sending notifications, and producing PDF paperwork. It allowed us to maintain the principle app free of some larger dependencies and well-organized internally however maintainable and versatile sufficient to permit us to maneuver quick.
We saved the code modular, like an open door to separating elements that will run into scalability points or want a devoted staff to take care of sooner or later.
When it comes to the tech stack, we used NestJS for the principle app and the modules characteristic to isolate the code. Just a few apparent and enduring microservices didn’t change a lot over subsequent iterations of the app – we determined they have been worthy of retaining as separate containers, so we used Kubernetes and Backyard to handle them:
- Kubernetes is an apparent alternative for container orchestration. Nonetheless, it does have disadvantages in terms of growth environments, CI/CD pipelines, and its basic complexity.
- Backyard supplies a layer of abstraction and out-of-the-box options like code synchronization between the native setting and the cluster, managing namespaces and secrets and techniques, Docker photos, instructions for CI/CD environments, and extra.
This transfer eradicated plenty of the overhead of working with microservices on a day-to-day foundation. It made it simpler for us to handle the microservices we’ve established up to now.
I’ve already written an intensive tech examine based mostly on my experiences with the Obligate mission:
- The right way to automate deployment and SSL certification of your Kubernetes microservices with cert-manager and Backyard
2. Bettering blockchain transactions
Essentially the most uncommon drawback we needed to take care of was making blockchain transactions intuitive with out compromising safety.
What makes blockchain transactions one thing we belief although there’s no governing physique or every other authority that oversees them?
It’s referred to as the consensus mechanism – most notably proof of labor and proof of stake. Each transaction on the blockchain is validated by miners. First, they examine that the transaction is professional after which both use their computational energy to unravel a mathematical puzzle or use an quantity of cryptocurrency as collateral to make their validation depend.
Briefly, for the miner to have the ability to validate a transaction it takes time and sources and that’s by design.
Any time the blockchain diverges into two chains, it’s the one rising sooner that’s handled as the proper one because it took extra sources to develop. The belief is that the remainder of the community will all the time outwork the fraudulent group or particular person. If I needed to control a transaction, I may attempt to validate it myself and I’d even succeed at first however for the remainder of the miners, solely the unique transaction will probably be legitimate (the one which the remainder of the community will probably be appending additional transactions to). In an effort to sustain with the size of the real chain, I want a lot extra sources than the remainder of the community that it wouldn’t be price it anyway.
The issue with the decentralized nature of the blockchain is that generally a transaction could be validated by two miners at nearly the identical time. Since each chains that comply with are legitimate, the race is way nearer than a person combating the remainder of the community (so it takes longer). After some time the consensus mechanism nonetheless works and one of many chains wins. However within the meantime, many legitimate transactions have been connected to the chain that misplaced the race and are actually orphaned. They have to be redone to be connected to the principle chain. It takes time to make sure that the created transaction truly went by way of – not one thing that the customers are used to in conventional apps.
One other situation is that earlier than a transaction is validated (mined), it lands within the mempool (a type of purgatory) ready to be picked up by the miner for approval. In an effort to reward miners for doing all that work, a transaction comes with a price referred to as “a fuel price” that’s transferred to the miner that validates it. To ensure that the transaction to get picked up first, it’s best to supply a fuel price that’s greater than different transactions within the mempool. However because it’s a variable relying on the blockchain visitors, sometimes your price will probably be too small and the transaction will get caught and that’s additionally a delay we’re not used to in conventional apps.
That is the place the tradeoff comes from. Relying on the community, the time it takes to make sure the transaction went by way of all these phases and confirmations would possibly take minutes. It’s not a assured worth both, it’s all based mostly on observations, so totally different apps assume totally different guidelines of thumb, e.g. Circle informing how lengthy they wait earlier than shifting on.
In our case, the web3 half was based mostly on a sensible contract – principally a easy app on the blockchain with just a few outlined behaviors, all executed as transactions. For instance, if you spend money on an eNote™ on the Obligate platform, an funding transaction will probably be made and the habits for this transaction outlined within the sensible contract is to cost you the quantity you invested and assign a token to your pockets.
Initially, we used Solana, the place the ready time for the “closing” transaction affirmation is negligible. Ultimately, as a result of “Solana drama”, we moved to the Polygon community, the place the ready time oscillates round quarter-hour. Despite the fact that Solana appeared a greater technological match, it misplaced our belief.
In the long run, it’s not about us, so we selected Polygon for the good thing about the customers.
We would have liked to deal with this situation to guard the answer from rejected transactions – each transaction opened additional irreversible steps for end-users. On the similar time, we didn’t need customers to get annoyed by lengthy ready instances.

3. eNotes™ and extra blockchain points
One other factor we would have liked to bear in mind and we generally caught ourselves forgetting about. Despite the fact that most issues relating to the standing of eNotes™™ and issuances have been recorded in a database for fast info entry and choices to increase it with internally related particulars and relationships, the supply of fact was nonetheless the blockchain.
Sure operations (e.g. sending eNotes™™ between one pockets and one other) could be carried out outdoors Obligate’s software and also you wouldn’t have all the knowledge associated to these transfers except it’s one thing that you possibly can fetch from the pockets linked to your app.
Sadly, there’s no working round some blockchain limitations so on this case the performance is partially restricted and we made certain that we didn’t waste time and sources refining and designing options that might have labored solely below the belief that the database is aware of about every thing.
Selecting the tech answer
So far as the transaction affirmation goes, initially, we solely waited for a single affirmation that every thing went by way of. Reorganization of the chains occurs fairly usually on the actual chain (mainnet) however for growth, a take a look at chain (testnet) is used – prices of testing on the actual chain add up in a short time. Sadly, testnet will not be an ideal reflection of what occurs on the mainnet as a result of there are a lot fewer miners and so fewer alternatives for a transaction to be mined twice on the similar time (additionally much less incentive to commit fraud).
As well as, the experience at Obligate was centered round Solana, so the issue got here once we began testing the actual chain earlier than going into manufacturing…
At one level throughout checks, we simply obtained caught with this transaction on maintain and couldn’t take the following step – it was in one of many states frontend couldn’t deal with. At first, it seemed like a tiny bug. It turned out that it required rewriting a big a part of the platform and altering the best way Obligate considers every transaction.
The preliminary thought was to reverse all consumer habits that occurred after the transaction was deserted. Nonetheless, it might be extraordinarily troublesome to implement and would probably trigger chaos within the code and debugging course of. What’s extra, we anticipate that this answer can be complicated for end-users, so we rapidly deserted this variant.
As a substitute, we determined to avoid wasting the state of the transaction (pending, confirmed, orphaned, and many others.) within the database and periodically replace this state within the background on the server. So we might not depend on the blockchain to guard all our transactions but additionally not at the price of ready for minutes or getting caught on a non-responsive web page for the customers. It was nice for builders too – we have been in a position to block customers from taking additional steps based mostly on the transaction info within the database.
Fortunately, for the needs of scheduling the server-side transactions (like deploying sensible contracts) we already had just a few BullMQ queues applied – we simply used the present setup and first added just a few steps to trace the transaction standing and account for the outcomes apart from a profitable finalization.
Secondly, we created queues for the client-side transactions too and we made them undergo the same verification course of. The thought was impressed by the event-based structure strategy that we have been accustomed to and it additionally reused part of the present setup, so we have been comfy doing this on a decent schedule and it labored properly.
We additionally needed to make some UI changes to make the method extra apparent for customers (one case needed to do with disabled buttons).
How did we work on after which implement the answer?
Every transaction within the database obtained an extra “standing” area. We applied a queue that verifies the standing of the applying and takes the following steps relying on the outcome. Every transaction created by the consumer or the server is added to the database and the validation queue. If the following consumer step is determined by the success of the earlier transaction, the consumer receives an alert informing in regards to the state of affairs (we applied it within the platform’s UI). When the transaction is authorized and the following step is unlocked, the consumer receives an applicable notification and the UI parts of the following steps get enabled.
Transactions are handled a bit otherwise relying on whether or not the motion is taken by the consumer or the server.
- Person transaction – require affirmation/signature by way of the pockets software managing the consumer’s funds. (undertaken on the frontend), e.g. paying for an eNote™ or approving an issuance.

The diagram exhibits an instance of repaying the eNote™. When a consumer interacts with the UI button to repay, the transaction is created and registered within the database as pending. From then on we put it right into a kind of loop that checks the standing utilizing a polygon consumer. If we are able to’t discover it, it means it obtained caught within the mempool. If it failed for chain causes, we famous the error and saved it within the database. After acquiring a passable variety of confirmations, we make modifications within the eNotes™ standing, which then unlock extra steps for the consumer.
- Server transaction – a bit simpler since there’s full management over them however the move may be very comparable, e.g. deploying a sensible contract that helps a given issuance.

On this case, the transaction is made on our personal behalf, because it’s Obligate that deploys the sensible contract after all of the buyers are dedicated and the issuance date has been reached. The overall affirmation loop is similar to the earlier case – besides when the transaction failed or obtained caught within the mempool, we are able to simply mechanically redo it.
A very revolutionary customized answer
To be completely trustworthy, all people is extraordinarily pleased with this answer. TSH and Obligate groups partnered to work as one and spent plenty of time collectively to develop it as properly as we may. You gained’t discover it wherever else – numerous expertise from relentless professionals mixed with a trial and error methodology offered this practice answer for Obligate.
An important drawback we solved was ensuring that not one of the transactions get misplaced within the blockchain community and that we’re in a position to deal with the entire outcomes of this entire course of. One other factor we cared about was making all of it intuitive to the consumer who will not be well-versed in blockchain and who’s used to the benefits of the standard functions, which was to attenuate the ready and the confusion to the minimal. Nonetheless, we might by no means compromise the principle benefits of the blockchain to get there, so it was a balancing act and I believe we caught the touchdown. And at last, although we have been pushed for time, we saved the code properly encapsulated and simply extensible, so it’s prepared for any new options that can come up as the applying grows.

Challenge advantages for Obligate’s enterprise
Low-cost, cheaper, the most cost effective
The mission aimed to be a measurably cheaper and extra handy answer to conventional bonds. Usually, you must undergo plenty of paperwork with an funding financial institution and get your bonds authorized by the suitable regulatory physique, and naturally, there are legal professionals, accountants, and ranking brokers concerned in all of this – which is to say – it prices loads. With Obligate, a few of these intermediaries are lowered to zero. The authorized framework of the system simplifies plenty of the complexity.
High-notch safety
As defined earlier than, blockchain ensures the integrity of all transactions making them impervious. A lot in order that eNotes™ are acknowledged as ledger-based securities below Swiss regulation so the transactions are legally binding. If the settlement is breached in any method, a celebration can take it up with an arbitration panel in Switzerland.
Modular design
There are separate parts for accepting orders, probing the transaction standing, reacting to transaction affirmation, and taking additional steps. It is a easy state of affairs for builders who work and can work on the answer sooner or later.
Improved consumer expertise
Introducing a linear and intuitive course of for the end-users! All complexities of blockchain are hidden behind transaction administration. This manner, customers don’t take care of an advanced system or complicated pop-ups they don’t perceive. Now, customers comply with clear paths with out worrying about what’s happening with their transactions.
World accessibility
Despite the fact that the disputes are topic to arbitration in Switzerland, the choice is enforceable below the New York Conference on the Recognition and Enforceability of Arbitral Awards (acknowledged by greater than 168 nations). Traders across the globe really feel 100% protected utilizing the Obligate platform.
Challenge’s success
The corporate mixed authorized and technological information with monetary experience to construct a brand new blockchain-based monetary system.
Consequence? Obligate lowered the bond issuance prices by 80% and lower down the issuance time from weeks to some hours!
Now, with the Obligate platform, firms can situation on-chain bonds and business paper to acquire funding from a various vary of buyers who, alternatively, get entry to regulated digital debt belongings, secured with on-chain collateral.
We work within the collision of the very conventional three-piece-suite-and-a-tie world of Institutional Fastened Earnings Buying and selling and essentially the most agile and technologically superior DeFi Area. The Software program Home helps us to maintain tempo and meet the necessities of each.
Every day we problem the established order and show that even essentially the most established processes may very well be sooner, cheaper, and extra clear; that sensible contracts can substitute financial institution departments, and what used to take weeks can now be achieved in a matter of minutes.
The experience and operational strategy of TSH provides us essentially the most priceless property of a startup – scalability. We’re sure that not solely is our product able to dealing with x10, x100, x1000 offers, however our tech staff may develop accordingly.
Bear in mind Machiavelli’s skepticism about mercenaries? Effectively, TSH proves him flawed. They’ve develop into our most trusted associate, with each member of The Software program Home absolutely built-in into the Obligate staff. Collectively, we share each the ups and downs, as they’re an integral a part of our journey. There are plenty of challenges forward and we’re pleased to have a associate as dependable as The Secure Home by our facet.
You simply care for enterprise. We take care of blockchain, structure, infrastructure…
Expertise in funds and banks isn’t any straightforward job, our staff understands that. Guide a 1-h no-strings-attached assembly and seek the advice of your mission with specialists with dozens of profitable fintech tasks within the portfolio.