스팀 토큰 프로토콜 업데이트

in Korea • 한국 • KR • KO8 days ago

스팀의 온체인 데이터만 이용하여 fungible 토큰을 만드는 프로토콜을 업데이트 했습니다.

비트코인의 runes 프로토콜 방식과 유사하게 온체인 데이터만 이용하여 프로토콜을 설계했습니다.

이 방식은 스팀엔진과 같은 사이드체인이 필요없는 방식입니다. 단 토큰 정보를 추적하고 업데이트하는 프로그램이 필요합니다.

SPTP (Steem Post-Based Token Protocol) Specification

1. 개요

Steem Post-Based Token Protocol(SPTP)은 Steem 블록체인의 기존 기능을 활용하여 사용자 정의 토큰을 생성, 관리 및 전송할 수 있는 프로토콜입니다. SPTP는 Steem의 포스팅 및 커스텀 JSON 기능을 사용하여 완전히 온체인 방식의 토큰 시스템을 구현합니다.

2. 프로토콜 구조

2.1 프로토콜 정의 포스트

프로토콜 규칙과 토큰 생성/관리 로직을 정의하는 Steem 포스트 형식:

{
  "protocol_version": "1.1",
  "protocol_name": "SPTP",
  "token_creation_rules": {
    "symbol_format": "^[A-Z]{3,7}$",
    "max_supply_format": "^[0-9]{1,10}\\.[0-9]{0,8}$",
    "required_fields": ["symbol", "name", "max_supply", "precision"]
  },
  "token_issuance_rules": {
    "issuer_must_be_creator": true,
    "max_issuance_per_operation": "1000000.00000000"
  },
  "token_transfer_rules": {
    "min_transfer_amount": "0.00000001"
  },
  "validation_function": "
    function validateToken(tokenData) {
      if (!/^[A-Z]{3,7}$/.test(tokenData.symbol)) {
        return [false, 'Invalid symbol format'];
      }
      if (!/^[0-9]{1,10}\\.[0-9]{0,8}$/.test(tokenData.max_supply)) {
        return [false, 'Invalid max supply format'];
      }
      if (tokenData.precision < 0 || tokenData.precision > 8) {
        return [false, 'Precision must be between 0 and 8'];
      }
      return [true, 'Token data is valid'];
    }
  ",
  "created_tokens": []
}

2.2 토큰 생성 포스트

새로운 토큰을 생성하기 위한 포스트 형식:

{
  "protocol": "SPTP",
  "protocol_post": "sptp_admin/sptp-protocol-v1.1",
  "action": "create_token",
  "token_data": {
    "symbol": "EXAMPLE",
    "name": "Example Token",
    "max_supply": "1000000.00000000",
    "precision": 8,
    "metadata": {
      "website": "https://exampletoken.com",
      "logo": "https://exampletoken.com/logo.png"
    }
  }
}

2.3 토큰 전송

토큰 전송을 위한 Steem custom_json 작업 형식:

{
  "required_auths": ["sender_account"],
  "required_posting_auths": [],
  "id": "sptp_transfer",
  "json": {
    "symbol": "EXAMPLE",
    "amount": "100.00000000",
    "to": "receiver_account",
    "memo": "Payment for services"
  }
}

3. 기술적 세부사항

3.1 토큰 생성 및 검증 프로세스

  1. 사용자가 토큰 생성 포스트를 작성
  2. SPTP 노드가 포스트 감지 및 처리
  3. 노드는 프로토콜 정의 포스트의 validation_function 실행
  4. 검증 성공 시, 토큰 생성 정보의 해시 계산
  5. 노드는 프로토콜 정의 포스트에 해시값을 댓글로 추가

3.2 토큰 잔액 관리

  • 온체인 트랜잭션 기록: custom_json 작업으로 모든 전송 기록
  • 오프체인 상태 관리: SPTP 노드가 잔액 계산 및 관리
  • 잔액 계산 방법: 초기 발행량 + 수신 금액 - 송신 금액
  • 인덱싱 및 캐싱: 빠른 조회를 위한 계정별, 토큰별 인덱스 유지
  • 정기적인 상태 검증: 전체 거래 내역 재검증

3.3 동적 함수 실행

RestrictedPython을 사용한 안전한 검증 함수 실행:

class SPTPFunctionExecutor:
    def execute_validation_function(self, function_str, token_data):
        # RestrictedPython을 사용한 안전한 함수 실행 로직
        ...

4. 보안 고려사항

  • Steem의 기존 권한 시스템 활용
  • 제한된 환경에서의 동적 함수 실행
  • 독립적인 SPTP 노드들의 상호 검증

5. 응용 프로그램

  • 커뮤니티 포인트 시스템
  • 디지털 자산 표현
  • 투표 및 거버넌스 토큰
  • 리워드 프로그램
  • 분산형 거래소(DEX) 구현

    Posted through the ECblog app (https://blog.etain.club)
Sort:  

Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
image.png
please click it!
image.png
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)

The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.029
BTC 58157.69
ETH 3122.82
USDT 1.00
SBD 2.42