๐Ÿ“Token Retirement Contract

The implementation of token retirement in Guardian relies on the capability of Hedera HCS allowing โ€˜wipeโ€™ rights for a given token to be assigned to a contract identifier instead of an account key (the account key is commonly referred to as โ€˜wipe keyโ€™). Thus in Guardian for each token a corresponding โ€˜wiping contractโ€™ is created, which controls the lifecycle of the token instances. These contracts implement a dynamic access control logic/list (ACL) managed by the Standard Registries (SRs) which issued the corresponding tokens. The contracts provide methods to add/remove โ€˜retirement contractโ€™ identifiers to ACLs, thus giving/retracting their permissions to call โ€˜wipeโ€™ methods of wiping contracts, which actually execute the wiping of token instances.

The โ€˜retirement contractsโ€™ are responsible for the mechanics of matching โ€˜creditโ€™ and โ€˜debitโ€™ tokens, and atomic retirement operations on these matched โ€˜plusโ€™ and โ€˜minusโ€™ pools (executed via the wiping contracts as per above). The retirement contracts that come out of the box in Guardian implement functionality allowing providers of retirement services to setup configuration of retirements pools, and request the โ€˜wipeโ€™ permissions from the token โ€˜wiping contractsโ€™. Guardian UI provides facilities to easily setup these contracts and configure such pools, however the architecture from the start is designed to be decentralised and scalable, such contracts and token pool configurations can be created, deployed and operated by stand-alone entities independently of Standard Registries and/or Guardian instances. It is expected that there would appear multiple โ€˜exchange-likeโ€™ services, which would implement their own retirement contracts (based on โ€˜canonicalโ€™ Guardian implementations) with enhanced and expanded rule sets, which would provide automatic โ€˜match-makingโ€™ services for token owners. The architecture allows anyone to attempt to become such a token retirement โ€˜exchangeโ€™, however the token issuers maintain control over which of these they โ€˜approveโ€™ to operate on their tokens via the ACL in the corresponding wiping contracts.

The high-level flow of the actions which configure token retirement is illustrated on the sequence diagram below:

Guardian contains a full production retirement system implementation which allows the configuration of arbitrary pools of tokens (two-sided, one-sides, with arbitrary โ€˜exchange ratesโ€™ etc), issued by different SRs, operating on different Guardian instances, to be configured for retirement with arbitrary additional rules further controlling their lifecycle.

A simplified architecture diagram of the retirement contracts implementation is shown on the diagram below.

Last updated