3-Multi Users with Permission Sharing

In this scenario, Alice and Bob are traders who possess sensitive transaction volume information for various wallets. They need to securely store this data and share it with Charlie, who is responsible for providing settlement services. To ensure data privacy and security, Alice and Bob choose to encrypt the transaction data before storing it in their respective tables.

This use case will use multiple wallet address. During testing period, please make you have all wallet address are registered in into whitelist.

Be more specific, please ensure your Alice, Bob and Charlie are registered and approved.

3.1. Task

  1. Alice and Bob are two traders who possess transaction volume information for several wallets. They will encrypt this data and insert it into their respective tables.

  2. Charlie is responsible for providing settlement services. To facilitate this, Alice and Bob grant Charlie permission to access their tables.

  3. Charlie then executes a query, aggregates the data, and calculates the total volume for each wallet.

3.2. Data

Alice

Wallet Address(text)
Token (text)
Volume (float4)

(secret data)

(secret data)

(secret data)

0x8CFB38b2cba74757431B205612E349B8b9a9E661

USDT

5.6

0xD862D48f36ce6298eFD00474eC852b8838a54F66

BUSD

6.3

0x8CFB38b2cba74757431B205612E349B8b9a9E661

BUSD

10.3

Bob

Wallet Address(text)
Token (text)
Volume (float4)

(secret data)

(secret data)

(secret data)

0xD862D48f36ce6298eFD00474eC852b8838a54F66

USDT

3.3

0x70dBcC09edF6D9AdD4A235e2D8346E78A79ac770

BUSD

9.8

0x70dBcC09edF6D9AdD4A235e2D8346E78A79ac770

USDT

7.7

3.3. Example code to Insert cipher and grant permission

3.4. Result Table in MindLake

Alice

Wallet Address
Token
Volume

(text, encrypt=False)

(text, encrypt=True)

(float4, encrypt=True)

0x8CFB38b2cba74757431B205612E349B8b9a9E661

0x1111

0x2211

0xD862D48f36ce6298eFD00474eC852b8838a54F66

0x1122

0x2222

0x8CFB38b2cba74757431B205612E349B8b9a9E661

0x1133

0x2233

Bob

Wallet Address
Token
Volume

(text, encrypt=False)

(text, encrypt=True)

(float4, encrypt=True)

0xD862D48f36ce6298eFD00474eC852b8838a54F66

0x1144

0x2244

0x70dBcC09edF6D9AdD4A235e2D8346E78A79ac770

0x1155

0x2255

0x70dBcC09edF6D9AdD4A235e2D8346E78A79ac770

0x1166

0x2266

3.5. Example code to confirm permission and calculate on cipher

3.6. Output

Last updated