PoCs

기관 커스터디 스터디

MPC · 승인 플로우 · AA · AML — 그리고 VASP 없이 만들 수 있는 부분은 어디까지인가.

아직 만들지 않았습니다

이 페이지는 카드에 적힌 내용을 펼쳐 보여줄 뿐입니다 — 돌아가는 코드도, 열어볼 데모도 아직 없습니다. 무엇을 왜 만들려는지가 아래에 있습니다.

어떻게 보나

아직 범위 미정 — 먼저 정독, 그다음 라이선스 질문을 통과한 PoC 항목만.

기술 노트

각 항목이 실제로 무엇을 보여주고 어떻게 동작하는지 — 위 카드보다 자세한 기술 설명입니다.

기관 커스터디 스터디준비 중

목적: 이 카탈로그의 나머지는 전부 「지갑 하나가 자기 자신을 위해 행동한다」입니다. 기관 커스터디는 정반대 모양입니다 — 키는 MPC 정족수로 쪼개지고, 트랜잭션은 승인 워크플로가 막고, 컴플라이언스 표면은 기술이 아니라 법입니다. 유용한 산출물은 분리입니다: 어디까지가 엔지니어링(MPC·승인 상태기계·AA 정책)이고, 어디부터가 있거나 없거나인 라이선스인가.

동작 방식: 배포가 아니라 정독 스터디입니다: MPC 서명(임계 방식 vs. 여기 DVT 카드에서 이미 다룬 키 분할), 상태기계로서의 승인 워크플로, 계정 추상화의 정책 계층이 커스터디 정책과 겹치는 지점, 그리고 AML·트래블룰 의무. PoC 후보는 VASP 등록이 필요 없는 것들 — 승인 플로우 시뮬레이터, 정족수 caveat을 가진 AA 정책 컨트랙트 — 이고, 이 카드가 실제로 될 것도 그것들입니다.

관련 코드:
"""Institutional custody study PoC -- M-of-N threshold approval gate.
Illustrates the core mechanism behind MPC custody and approval workflows: a transaction
only executes once a quorum of independent signers has approved it.
"""

from dataclasses import dataclass, field


@dataclass
class Transaction:
    id: str
    description: str
    approvals: set[str] = field(default_factory=set)


class ApprovalQuorum:
    def __init__(self, signers: list[str], threshold: int):
        self.signers = set(signers)
        self.threshold = threshold  # "M" of "N"

    def approve(self, tx: Transaction, signer: str) -> str:
        if signer not in self.signers:
            return f"REJECTED: {signer} is not a registered quorum member"
        if signer in tx.approvals:
            return f"NOOP: {signer} already approved {tx.id}"
        tx.approvals.add(signer)
        return f"recorded approval from {signer} ({len(tx.approvals)}/{self.threshold})"

    def can_execute(self, tx: Transaction) -> bool:
        return len(tx.approvals) >= self.threshold

    def execute(self, tx: Transaction) -> str:
        if not self.can_execute(tx):
            return f"BLOCKED: {tx.id} has {len(tx.approvals)}/{self.threshold} approvals"
        return f"EXECUTED: {tx.id} ({tx.description}) -- quorum of {self.threshold} met"


if __name__ == "__main__":
    quorum = ApprovalQuorum(signers=["alice", "bob", "carol", "dave"], threshold=3)
    tx = Transaction(id="withdraw-001", description="withdraw 100 ETH to cold wallet")

    for signer in ["alice", "eve", "bob", "alice", "carol"]:
        print(" ", quorum.approve(tx, signer))
        print("  execute?", quorum.execute(tx))

docs/code/pocs/dsrv-portal.py