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
- Host: GitHub
- URL: https://github.com/ilyar/chameleon-escrow
- Owner: ilyar
- License: agpl-3.0
- Created: 2025-01-20T03:50:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-23T12:57:50.000Z (over 1 year ago)
- Last Synced: 2025-02-23T13:22:23.838Z (over 1 year ago)
- Topics: escrow, ton, tvm
- Language: TypeScript
- Homepage:
- Size: 114 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: LICENSE
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.
## 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 --> [*]
```