Skip to content
Compliant Chain

Compliant Chain

Avax chain with compliance at its core

Created on 21st October 2023

•

Compliant Chain

Compliant Chain

Avax chain with compliance at its core

The problem Compliant Chain solves

G20 nations have been heavly contemplating on bringing regulations to blockchain, with the open-ness of the blockchain. It becomes difficult to enforce anything compliance checks at protocol levels.
With the HyperSDK, it becomes easy to add compliance at very node level. Within this project the node can perform.

  • Assign KYC details of country and authority to addresses
  • Assign Aliases to users address and allow transfers using recipient alias.
  • Add checks on creating and new assets such that only Companies can create and mint new assets.
  • Add checks on transferring and placing orders such that only indiviuals/companies within same country can participate.

All this will the functionality to still build any protocol on top of it, without worrying about the compliance

Challenges I ran into

One of the inital challenges was to understand the HyperSDK and TokenVM codebase.

  1. It was tricky to start with writing the key and value onto the immutable ledger: This solved by understanding the and clearly scoping the length of key and values of the ledger.

  2. The second most important challenege was where KeyNotFoundInScope error was being raised, although the key existed at the ledger and accessible using RPC. But the key was not being found under different actions: This was partially solved by understanding where the error arises from, there was change that the scope is different between actions but since mint and create assets shares the same scope it should work.
    2.1 This was solved by understanding the importance of StateKeys and StateKeysMaxChunks. As that defines the scope under which the keys can be accessed within the immutable db scope

  3. One of the more important task was the abitlity to expand the country and authority choices, such that enums can be stored over as KYC value data.
    3.1 This was solved by using goLang to create structs with private variables and figuring out the packing and unpacking of uint8 to store enums

Tracks Applied (2)

Advanced: HyperSDK Track

The project uses HyperSDK to extend TokenVM in following ways: It adds KYC Checks on accounts level. KYC Check includes ...Read More
Avalanche

Avalanche

Intermediate: Customizing the EVM

The KYC can be used create and remove users from a "AllowList" on run-time level. Trying to create Super Admins using Al...Read More
Avalanche

Avalanche

Technologies used

Discussion

Builders also viewed

See more projects on Devfolio