Wallet Structure

Introduction

In both traditional finance (TradFi) and decentralized finance (DeFi), segregated and omnibus wallets are pivotal in managing and safeguarding assets. These wallet structures provide different methods for handling user funds, each with its unique set of benefits and considerations. In this article, we'll discuss how this concept came about, and the two common ways you can structure your wallets within Levain.

Historical context in TradFi

In TradFi, a segregated account is an individual user's account that holds funds separate from the institution's funds. This structure provides an added layer of security, as the user's assets are not commingled with the assets of the institution. In the event of the institution's insolvency, the assets in the segregated accounts remain protected and cannot be used to pay off the institution's debts.

Contrastingly, an omnibus account pools the assets of multiple users into a single account under the institution's name. While this structure simplifies the administration process, it also introduces risks as individual user assets are not isolated. The omnibus account is managed on behalf of the users, with the institution responsible for keeping detailed records to allocate assets accurately to each user.

Deciding your wallet structure within Levain

Similarly for building crypto or Web3 products, you can borrow the concepts of segregated and omnibus wallets to structure your wallets within Levain. Depending on your use case, you can choose to create segregated wallets for each user or entity, or aggregate assets from multiple users into a single omnibus wallet.

Segregated wallets

In this model, you create individual wallets for each user on your own platform. Each user's assets are held separately in their respective wallets, reducing the risk of commingling assets across different users. Visually, this is how it looks like:

graph TD; U1[User 1] -->|Transfer| A1[Wallet 1\n0xAbc...123\nLevain] U2[User 2] -->|Transfer| A2[Wallet 2\n0xBcd...a1D\nLevain] U3[User 3] -->|Transfer| A3[Wallet 3\n0xEfa...01C\nLevain] Un[User n] -->|Transfer| An[Wallet n\n0xBcd...2ad\nLevain] A1 -->|Withdraw| W1[Withdrawal Address 1] A2 -->|Withdraw| W2[Withdrawal Address 2] A3 -->|Withdraw| W3[Withdrawal Address 3] An -->|Withdraw| Wn[Withdrawal Address n] subgraph "Levain Segregated Structure" A1 A2 A3 An end

This approach enhances security and transparency, as each user can independently verify their wallet balances and transactions. It also allows for easier auditing and reporting, as transactions can be traced to specific user.

With segregated wallets, you generally do not need to make use of our deposit addresses feature. You can issue the main wallet address to your users. When your users deposit assets into their unique addresses, they are segregated and never commingled with the assets of other users. Levain will inform you via webhooks when your users deposit assets into their wallets.

Omnibus wallets

In this model, you maintain one or more omnibus wallets. These omnibus wallets hold the digital assets of multiple users collectively. You will be able to generate as many deposit addresses as you want, and issue them to your own users.

When your users deposit assets into their unique addresses, Levain will inform you via webhooks, and you should maintain your own internal ledger to ensure the digital assets are credited internally within your own ledger.

On Levain, your users' assets should be forwarded to a main omnibus wallet. You can choose to also process withdrawals from the same wallet, or to configure this omnibus wallet as a cold wallet with a separate hot withdrawal wallet. It is entirely up to you, depending on your operational requirements. To visually see how funds flow between your users' wallets and your own wallets, refer to the diagram below.

graph TD; U1[User 1] -->|Transfer| A1[Deposit Address 1\n0xAbc...123\nLevain] U2[User 2] -->|Transfer| A2[Deposit Address 2\n0xBcd...a1D\nLevain] U3[User 3] -->|Transfer| A3[Deposit Address 3\n0xEfa...01C\nLevain] Un[User n] -->|Transfer| An[Deposit Address n\n0xBcd...2ad\nLevain] A1 --->|Consolidate| B[Customer Funds Wallet\n0xC1a...882\nLevain] A2 --->|Consolidate| B A3 --->|Consolidate| B An --->|Consolidate| B B -->|Overflow| C[Cold Wallet\n0xD2b...7ab\nLevain] B -->|Withdraw| D[Withdrawal Addresses] subgraph "Levain Omnibus Structure" A1 A2 A3 An B C end

Note that every Levain Wallet created will be considered a main wallet, no matter your use case for it. However, each main wallet can contain multiple deposit addresses, and you can create as many deposit addresses as you want. These deposit addresses will be considered as part of a main wallet, and you can consolidate the funds from these deposit addresses into your main wallet.

Conclusion

The choice between segregated and omnibus wallets depends on the specific needs and preferences of your buiness model. While segregated wallets offer security and control, omnibus wallets provide efficiency and ease in transactions and asset management. Understanding each wallet structure is crucial before you decide which kind of wallet structure to adopt for your business.

At Levain, we designed our wallets infrastructure to be flexible and customizable, so that you can choose the best wallet structure for your business.