An open API service indexing awesome lists of open source software.

https://github.com/ilyar/chameleon-escrow

[WIP] 🦎Chameleon Escrow a system separating guarantee logic from asset management across diverse value forms
https://github.com/ilyar/chameleon-escrow

escrow ton tvm

Last synced: 8 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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

```mermaid
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
```

## Escrow contract

```mermaid
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**
```

## Vault contract

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