Project case study Dar Blockchain Private work

91 Funds.

91 Funds is private fintech product work combining multi-asset vault contracts, subscription credentials, verified on-chain deposits, scheduled fund accounting, and tightly controlled withdrawal workflows. This case study focuses on the engineering responsibilities and trust boundaries without exposing client-confidential business details.

Role
Full-cycle Backend Engineer · Smart Contract Developer
Domain
Decentralized asset management · Quantitative finance · DeFi infrastructure

System at a glance

What the system does

01

Upgradeable multi-asset vaults

02

High-water-mark settlement

03

Receipt-level deposit verification

04

Multi-factor withdrawal controls

Architecture flow

From intent to verified state.

  1. 01

    A NestJS API authenticates investors and operators and coordinates investment workflows.

  2. 02

    MongoDB holds transactional state while Redis supports caching and short-lived operational data.

  3. 03

    The transaction engine independently verifies EVM receipts before crediting internal balances.

  4. 04

    Scheduled workers run portfolio settlement, subscription expiry, and approved withdrawal operations.

  5. 05

    Upgradeable vault and soulbound subscription contracts provide the on-chain custody and entitlement layer.

01 / On-chain custody

Upgradeable vaults with constrained authority

01.1

Multi-asset vault

The Solidity vault accepts an explicitly managed set of ERC-20 assets, calculates platform fees at deposit time, transfers treasury fees, and credits the depositor with the net amount.

01.2

Upgradeable security primitives

Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, SafeERC20, and EnumerableSet provide controlled upgrades, guarded external calls, resilient token transfers, and efficient asset whitelisting.

01.3

Delegated execution

A restricted approved-or-owner path allows an operational wallet to execute reviewed withdrawals without receiving every privilege held by the contract owner.

02 / Verification

Balances are derived from chain evidence, not browser claims

The backend treats a submitted transaction hash as a reference to verify—not as proof by itself.

02.1

Receipt inspection

Ethers.js retrieves the deterministic transaction receipt, checks successful execution, and filters logs for the exact deposit event signature emitted by the expected contract.

02.2

Parameter cross-checking

Decoded sender, asset, and BigInt amount values are compared with the authenticated user and current database intent before any internal investment balance is allocated.

02.3

Replay resistance

Persisted transaction identity and state checks prevent one confirmed deposit from being submitted repeatedly to manufacture duplicate off-chain credit.

03 / Financial engine

Scheduled accounting around a high-water mark

03.1

Performance-fee basis

The settlement model charges performance fees only on net gains above an investor’s previous highest portfolio valuation, preserving the high-water-mark principle across cycles.

03.2

Cyclic settlement

Scheduled NestJS workers evaluate returns during defined fund cycles, calculate performance statistics, apply relevant fees or discounts, and credit the resulting net yield.

03.3

Hierarchical rewards

Referral and regional-ranking logic aggregates eligible volume through parent relationships and applies tier-specific commissions, overrides, rebates, and vouchers.

04 / Identity & withdrawals

Defense in depth for money leaving the system

04.1

Three independent factors

Sensitive withdrawals require a time-based authenticator code, an SMS one-time code, and an email one-time code before they can enter the approval workflow.

04.2

Human and worker separation

A validated request first becomes pending. An administrator reviews it before a worker invokes the contract, monitors gas and confirmation state, and synchronizes the final result.

04.3

Auditable operations

Winston rotating logs, explicit transaction states, and automated alerts make financial actions and failures inspectable after execution.

05 / Subscription layer

Non-transferable credentials tied to verified access

05.1

Soulbound subscription NFT

An ERC-721 token represents a subscription tier and expiry time, while transfer and approval paths are disabled so entitlement cannot be sold or moved to another wallet.

05.2

Metadata pipeline

The backend composes subscription artwork with Sharp, publishes the asset and metadata through Pinata to IPFS, and coordinates minting after the surrounding business checks succeed.

05.3

Modular backend foundation

NestJS modules, dependency injection, guards, interceptors, validation pipes, Mongoose models, Redis caching, Swagger documentation, and a separate CoinGecko price worker keep responsibilities explicit.

Continue exploring

More systems, protocols, and practical tools.