Skip to content

[WIP] 🦎Chameleon Escrow a system separating guarantee logic from asset management across diverse value forms

License

Notifications You must be signed in to change notification settings

ilyar/chameleon-escrow

Repository files navigation

Chameleon Escrow

Chameleon Escrow a system separating guarantee logic from asset management across diverse value forms

Overview

Chameleon Escrow is an escrow solution that separates the guarantee logic from the asset custody mechanism, this modularity allows it to work with different types of assets — tokens, digital assets or other transferable values without changing the underlying Escrow contract, interoperating with different Vault implementations, the same escrow structure can easily handle multiple forms of value.

diagram flow

Key Features

TBD

How It Works

TBD

How It Uses

TBD

Life circle contract/account

stateDiagram
    classDef success fill:#EBF9E7
    classDef info fill:#F0FBFF
    classDef warning fill:#FFFCEA
    classDef danger fill:#FFF0F0

    class ACTIVE success
    class NONEXISTENT info
    class UNINIT warning
    class FROZEN danger

    [*] --> NONEXISTENT
    NONEXISTENT --> UNINIT : send value
    note left of UNINIT    : initial state of the account
    UNINIT --> ACTIVE      : initialize
    ACTIVE --> FROZEN      : due payment
    note left of FROZEN    : unfreeze message only
    FROZEN --> ACTIVE      : unfreeze
    FROZEN --> UNINIT      : unfreeze
    FROZEN --> NONEXISTENT : delete
Loading

Escrow contract

stateDiagram
    classDef success fill:#EBF9E7
    classDef info fill:#F0FBFF
    classDef warning fill:#FFFCEA
    classDef danger fill:#FFF0F0

    class DRAFT info
    class PROPOSED success
    class DEPOSITED success
    class PERFORMED success
    class DELIVERED success
    class APPROVED success
    class CLAIMED success
    class DISPUTED warning
    class REJECTED danger
    class REFUNDED danger
    class deadline info

    state "⏳" as deadline

    [*] --> DRAFT           : deploy **Any**
    DRAFT --> PROPOSED      : bind with Vault **Buyer**
    PROPOSED --> DEPOSITED  : deposit <= input from **Vault**

    DEPOSITED --> DISPUTED  : dispute **Buyer**
    DEPOSITED --> PERFORMED : perform **Seller**

    PERFORMED --> deadline  : deadline
    deadline --> DISPUTED   : dispute **Buyer**
    PERFORMED --> DELIVERED : deliver **Seller**

    DELIVERED --> DISPUTED  : dispute **Buyer**
    DELIVERED --> DISPUTED  : dispute **Seller**
    DELIVERED --> APPROVED  : approve **Buyer**

    DISPUTED --> REJECTED   : reject **Guard**
    DISPUTED --> PERFORMED  : perform **Guard**

    REJECTED --> REFUNDED   : claim **Buyer**
    APPROVED --> CLAIMED    : claim **Seller**

    REFUNDED --> [*]        : claim => output to **Vault**
    CLAIMED --> [*]         : claim => output to **Vault**
Loading

Vault contract

stateDiagram
    [*] --> FILLED   : deposit => output to **Escrow**
    FILLED --> EMPTY : claim <= input from **Escrow**
    EMPTY --> [*]
Loading

About

[WIP] 🦎Chameleon Escrow a system separating guarantee logic from asset management across diverse value forms

Topics

Resources

License

Stars

Watchers

Forks