Concepts:

1. Main account:

Each customer has only one main account which is created after successful onboarding.

2. Pocket/sub-account:

Type: Unlocked/locked

Each customer can have up to 8 active sub-accounts of both unlocked and locked type .

Sub-account doesn’t have a visible account number.

3. Interest:

Interest can be accrued and applied on main account, locked and unlocked sub-account in different rate.

Main features:

Accounts US Here you can find all stories.

  1. Open and activate main account

  2. Open, manage, close unlocked pocket

  3. Open, manage, close locked pocket

  4. Earn interest

Endpoints: https://account-manager.apps.brave.safibank.online/swagger/views/swagger-ui/#

ER diagram

Account ER diagram

Tables:

account: either main account or saving account, cannot be both.

main_account: has account number

saving_account: account_type can be locked or unlocked

eod_balance_entity: the end-of-day balance for each account, updated by TM event

interest_history: interest updated by TM accrue_interest event

product_version_id_cache_entity: updated by TM event for new product version for each product id (main account only)

template_parameter_cache_entity: caching the parameters provided by TM

Service dependencies

Accounts

TM access: client library used to communicate with TM vault

Smart contract: separate Python project in which account business logic is implemented

Questions follow-up:

REST API versioning approach