Zhuang's Diary

言之有物,持之以恒

reference: https://docs.axelar.dev/

跨链转移Token

情况一:Call sendToken() on an EVM source chain
- step 1: 找到 source chain 的 Gateway 的合约地址。
EVM 链使用 Axelar Gateway 智能合约发送Token。 这些是应用程序层智能合约,用于发送和接收有效负载以及监控交易状态。
Gateway合约的接口如下。

1
2
3
4
5
6
function sendToken(
string memory destinationChain,
string memory destinationAddress,
string memory symbol,
uint256 amount
) external;
- step 2: 调用 source chain 的approve()。
- step 3: 在 source chain 上,利用Gateway合约将调用sendToken()。
1
2
3
4
5
6
sendToken(
"avalanche", // destination chain name
"0xF16DfB26e1FEc993E085092563ECFAEaDa7eD7fD", // some destination wallet address (should be your own)
"axlUSDC", // asset symbol, can be differ by chain, see above
100000000 // amount (in atomic units)
)

此时,token将出现在目标链(destination chain)的地址上。

情况二:## Call sendToken() on a Cosmos-based source chain
基于COSMOS的 source chain的话,sendToken()是一笔IBC的交易。消息(message)被投送到 Axelar 到一个固定的地址上axelar1dv4u5k73pzqrxlzujxg3qp8kvc3pje7jtdvu72npnt5zhq05ejcsn5qme5,该地址在Axelar网络上,被用于接收GMP消息,消息格式如下:

1
2
3
4
5
6
{
destination_chain,
destination_address,
payload: null,
type: 3, // corresponds to the `sendToken` command on Axelar
}

利用AxelarJS SDK调用sendToken()

前端应用可以利用AxelarJS SDK调用sendToken()。

使用存款地址(deposit address)转移资产

存款地址(deposit address)是由 Axelar 中继服务(Relayer)创建和监控的临时一次性地址。 存款地址通常最多可运行 24 小时。如果出现以下情况,请使用存款地址:

  • 您需要 sendToken() 方法未提供的功能,例如 Cosmos-to-X。
  • 您希望允许从不与 Axelar 交互的钱包进行Token转移,例如从中心化交易所提取资金时。
    如需使用存款地址转移资产,需要使用AxelarJS SDK并发起AxelarAssetTransfer。

构建跨链代币(Interchain Token)

链间代币是可在多个区块链上使用的 ERC-20 token。借助 Axelar 的链间代币服务 (Interchain Token Service),可以从头开始创建新的跨链代币,也可以更新以太坊区块链上已存在的Token。如果Token不被 Axelar 支持,将该Token加入链间代币服务 (Interchain Token Service)即可。

Cos-CBDC: Design and Implementation of CBDC on Cosmos Blockchain:
https://www.ieice.org/publications/proceedings/bin/pdf_link.php?fname=p303-han.pdf&iconf=APNOMS&year=2021&vol=67&number=TS8-4&lang=E

  • Cos-CBDC, a CBDC system based on Cosmos blockchain. The transaction capacity of Cos-CBDC can be up to 15,000 TPS depending on the block size and the number of validators in the BFT-based consensus algorithm.
  • R3 Corda and Hyperledger Fabric as the blockchain platforms for CBDC, these platforms are not suitable for implementing cross border payments. COSMOS IBC allow different types of blockchains to trade tokens and data with each other.
  • cos-CBDC propose multi signature (Multisig) and Multi-party computation (MPC). E.g. Central Bank, Commercial Bank, Customer, these 3 parties generate a Group Key with MPC. This Group Key.

The Bank of Korea’s CBDC research:
https://www.bis.org/publ/bppdf/bispap123_m.pdf

  • there is no immediate need to issue CBDC in Korea. Therefore, the BOK is actively engaging in research and preparations so that if a decision is made in the future regarding the introduction of CBDC, it can be issued without any delay.
  • Key considerations in the BOK’s CBDC research
    • The decline in the use of cash.
    • Big tech’s market dominance and concentration of personal information.
    • The proliferation of global stablecoins.

量化交易策略可以分为两大类,具体如下。

  1. 定量策略
    这类策略主要根据定量分析结果进行交易决策。常见的定量策略有以下几种。
    (1) 动量策略:通过动量指标判断市场和股票趋势,在趋势形成时买入,在趋势反转时卖出。
    (2) 价值策略:通过基本面和定量指标判断股票价值,在价值被低估时买人,在价值被高估时卖出。
    (3) 机器学习策略:利用机器学习算法分析大量数据寻找交易信号,进行机器自动化交易。
  2. 定性策略
    这类策略主要根据定性分析和交易者主观判断进行交易。常见的定性策略有以下几种。
    (1) 趋势跟随策略:通过图形分析方法判断市场趋势,跟随上升趋势买人,跟随下跌趋势卖出。
    (2) 消息驱动策略:根据新闻事件和消息判断股票趋势,在利好消息出现时买人,在利空消息出现时卖出。
    (3) 经验主义策略:根据交易者的经验和主观判断进行交易决策,难以形式化与定量化。
    综上,交易策略是交易的指导思想和行动纲领。通过研究市场规律和价格行为,选择适合自己风格与能力的策略,并不断优化和调整,最终实现稳定的投资收益,这是每个交易者和投资者的重要学习课题。选择一种适合自己的交易策略,对交易至关重要。

History and Evolution

What DID Enables

  • Portability
  • Control
  • Authenticity
  • Security
  • Composability
  • Interoperability
  • Privacy

Recent Regulatory Developments

  • European Commission - welcome final agreement on EU Digital Identity Wallet.
  • King of Bhutan - receives first National Digital Identity.
  • 18 states of USA - live or piloting Mobile Driving Licenses, 17 more in legislative process.
  • British Columbia and Ontario launch Digital ID wallets for citizens.

EU Digital Identity Wallet

https://kyc-world.com/eu-digital-identity-wallet-on-the-road-to-implementation/


https://commission.europa.eu/strategy-and-policy/priorities-2019-2024/europe-fit-digital-age/european-digital-identity_en

Regulatory Frameworks

  1. Electronic ID - eIDAS
  2. Trust Frameworks - British, Canada, Australia, New Zealand, Sweden
  3. Privacy Regulations - EU GDPR, California consumer privacy, 香港个人资料隐私专员公署

Relevant Standards

  1. DIF - DIDComm
  2. Hyperledger - Aries
  3. W3C - DID, VC
  4. ISO - MDL
  5. IETF - SD-JWT VC, SD-JWT
  6. OpenID - OIDC 4 VCI, OIDC 4 VP

继续前序学习的DID产品,关于polygonID的进一步学习,本文介绍如何使用polygonID。
前序文章:

  • iden3和polygonID原理应用和实战
  • polygonID SDK部分代码分析
    polygonID Issuer-Node 启动以后,有2台 docker container 服务器运行,1) Issuer Node API; 2) Issuer Node UI。这两个服务都有各自的 API 给到前端 - 手机App 或者 Web site调用。
    其中,
  • Issuer Node API是文档中 Issuer Node Core API 的部分。
  • Issuer Node UI API 是文档中 Issuer Node UI 的部分。
    Issuer Node API只是在 Issuer-Node 启动时,调用一次,用来为 Issuer 生成 DID,其后不再被直接调用。前端应用调用API是调用 Issuer Node UI API。关于 Issuer Node UI API 的文档目前是在 Postman 中。其中:
    • Credential - VC创建,取得,删除,作废,取得状态。
    • Auth - 鉴权 QR Code。即 Link 地址对应的 QR Code。
    • Connection - 如文档所示( https://devs.polygonid.com/docs/issuer-node/issuer-node-guide/ ),Connection 展示 ID Holders 和 Credentials 的所属关系。
    • Schema - 生成 VC 所使用的数据字段管理。
    • State - 管理 Identity State,取得,公开至区块链。
    • Link - 通过 link,进入VC。Link创建,取得,删除,失效,创建鉴权,和取得QR Code。