Chintai Token Leasing Standard

Chintai
7 min readMay 31, 2019

--

Chinese&Korean Translations Below

Enable Leasing With One Line Of Code

The Chintai token leasing standard is dead simple. Add a single line of code to ANY EOSIO token contract and your token is compatible with leasing on the Chintai platform. All leasing functionality and utility will be automated through the leasing contract.

The standard is designed to be powerful enough to work with any kind of token leasing conceivable. From asset-backed tokens, to composite non-fungible tokens, and everything in between. The benefits of leasing any token can soon be realized for the entire EOSIO community.

CHEX Holders

Chintai 2.0 token leasing with the CHEX token will be significantly enhanced with this standard. By owning CHEX you will have low-cost access to all of the token leasing markets that are enabled by this standard. See more about the CHEX token auction.

Get CHEX!

Partnerships & Feedback

Boid is our first strategic partner to help us design the Chintai token leasing standard and will be using it for the BOID token.

We invite the EOS community to give us feedback! Please join this telegram group.

Getting Setup

For ease of setup, you can use our own version of the contract (located on the EOS mainnet at account “leaseanycoin”). Alternatively you can take the open source code and deploy your own copy of the contract.

Once you have set up your token contract and configured the leasing standard to suit your needs, on-chain tables will be generated that will allow your dApp to keep track of your token utility.

Required Actions

Enable token

This action activates the utility of a token. The word enable here is synonymous with staking or delegating tokens, but is more generic to account for situations where that doesn’t make sense.

ACTION enable(eosio::name owner, std::vector< eosio::name > receivers, eosio::name token_contract, eosio::asset quantity, std::vector< uint128_t > nft_ids, uint64_t type, uint64_t time_period);

  • owner — This is the person who has custodial ownership of the tokens to be enabled.
  • receivers — These are the individuals who will receive the utility of the enabled tokens.
  • token_contract — The name of the token contract.
  • quantity — The amount and symbol of the token to be enabled. If dealing with NFTs, this value should be left empty. Create placeholder EMPTY token.
  • nft_ids — The unique identifying numbers indicating the NFTs to be enabled.
  • type — The aspect of the token that is to be enabled.
  • time_period — The length of time that the token must be enabled before it may be disabled.

Disable token

This action deactivates the token, and is synonymous with unstaking a token.

ACTION disable(eosio::name owner, std::vector< eosio::name > receivers, eosio::name token_contract, eosio::asset quantity, std::vector< uint128_t > nft_ids, uint64_t type);

  • Arguments are the same as for token enabling

Configure token

This action will let you say how your token shall be configured for leasing purposes.

You must call this action for each type of token-enabling functionality you want to add. For example, if you want to create a in-game armour token that can be enabled for ceremonial purposes, and also for battle purposes, then you would call this function twice, specifying a different type depending on the use case, and providing an appropriate description.

ACTION configure(eosio::name token_contract, eosio::symbol token, std::vector< uint128_t > nft_ids, uint64_t disable_wait_period, bool transfer_enabled, uint64_t max_external_receivers, uint64_t type, std::string type_description);

  • token_contract — The contract that controls the token
  • token — The symbol name and precision of the token in the contract. If dealing with NFTs, this value should be left empty.
  • std::vector< uint128_t > nft_ids — The unique identifying numbers indicating the NFTs to be configured.
  • disable_wait_period — The time taken for an enabled token to become disabled and capable of being enabled again.
  • transfer_enabled — Indicates whether an enabled token can be transferred.
  • max_external_receivers — The maximum number of people that the token’s utility can be enabled for. If set to zero, the token can only be enabled for the user who has custody of the token.
  • type_description — Provides a description of one method in which the token can be enabled.

Check transfer

This action will cause a failure if an attempt to transfer a token is made when it is not allowed by the rules of the enabling functionality. This function must be called in the token contract in any function where custody of a token is changed.

ACTION checktransfr(eosio::name owner, eosio::name token_contract, eosio::asset quantity);

  • owner — The custodial owner of the token, who wishes to transfer it.
  • token_contract — The contract that controls the token.
  • quantity — The amount and symbol of the token to be transferred.

Check burn

This action will cause a failure if an attempt to burn a token is made when it is not allowed by the rules of the enabling functionality. This function must be called in the token contract in any function where tokens are removed from supply.

ACTION checkburn(eosio::name owner, eosio::name token_contract, eosio::asset quantity);

  • owner — The custodial owner of the token, who wishes to transfer it.
  • token_contract — The contract that controls the token.
  • quantity — The amount and symbol of the token to be transferred.

Chintai — Lease Everything

Website | Twitter | Telegram | Medium | LinkedIn | Email

【Chinese/中文】

一行代码,开启租赁功能

Chintai 代币租赁标准简单无比。只需在任意 EOSIO 代币合约之中加入一行代码,即可与 Chintai 平台的租赁相兼容。所有的租赁功能和应用特征,都可以通过租赁合约来自动实现。

Chintai 租赁标准的设计具备强大功能,可以处理任何可能的租赁场景,无论是以资产支持的代币,还是非同质代币(NFT),或者介于两者之间的其他代币类型。租赁任何代币所带来的优势,很快就可以为整个 EOSIO 社区所知晓。

CHEX 代币持有人

通过这一标准,将会显著提升使用 CHEX 代币的 Chintai 2.0 代币租赁平台。持有 CHEX 代币,可以低成本的使用本租赁标准所支持的所有代币租赁市场。关于 CHEX 代币拍卖,想了解更多,可以前往:

获取 CHEX!

合作关系 & 反馈

Boid是我们的首个战略合作伙伴,帮助我们设计 Chintai 代币租赁标准,并将在 Boid 代币中使用该标准。

我们邀请EOS社区提供反馈! 请加入电报群

设定

为了简化配置,您可以使用我们所提供的合约(在 EOS 主网之中的合约账户为 EOS_ACCOUNT_HERE),或者,您也可以使用开源代码部署自己的合约。

设置代币合约并根据您的需要配置好租赁标准之后,会自动在链上生成数据表,使得您的 dApp可以 追踪代币应用。

需要的操作

Enable token(激活代币)

该操作会开启代币的效用特性。此处所说的激活(或说开启,enable),与抵押的意思相似但是更为通用,尤其是在未设置抵押/赎回机制的情景下。

ACTION enable(eosio::name owner, std::vector< eosio::name > receivers, eosio::name token_contract, eosio::asset quantity, std::vector< uint128_t > nft_ids, uint64_t type, uint64_t time_period);

字段解释:

  • owner — 指持有代币的所有者,该所有者可以激活代币的应用特性.
  • receivers — 接收者,是指在代币激活应用特性时,接收代币应用特性的账号所有者.
  • token_contract — 代币合约账号.
  • quantity — 待激活代币的数量和代币符号。对 NFT而言,此字段应留空。创建占位符EMPTY 代币.
  • nft_ids — 用于表示待激活 NFT 代币的唯一标识符的数值(unique identifying numbers).
  • type — 代币待激活的功能类型.
  • time_period — 代币激活的时限,在此期间内,代币会一直保持激活状态,等时间结束后可以被禁用.

Disable token(禁用代币)

该操作会使代币的应用性失效,与代币取消抵押(unstake)意思一致。

ACTION disable(eosio::name owner, std::vector< eosio::name > receivers, eosio::name token_contract, eosio::asset quantity, std::vector< uint128_t > nft_ids, uint64_t type);

  • 参数与代币激活操作时的参数一致

配置代币

此操作将允许您决定如何配置代币用于租赁之用途。

对于每一个您希望激活的代币功能,都需要调用该操作。例如,如果你想要创建游戏内的盔甲代币可以用作装饰作用,也可以供战斗使用,那么,你需要调用两次,根据使用场景指定不同类型的类别,并且提供恰当的描述。

ACTION configure(eosio::name token_contract, eosio::symbol token, std::vector< uint128_t > nft_ids, uint64_t disable_wait_period, bool transfer_enabled, uint64_t max_external_receivers, uint64_t type, std::string type_description);

字段解释:

  • token_contract — 控制代币的合约
  • token — 代币的符号及代币合约中的精度。对 NFT而言,该字段留空。
  • std::vector< uint128_t > nft_ids — 用于表示待配置 NFT 的唯一标识符数值。
  • disable_wait_period — 等待时间,表示已激活代币的变为禁用状态后需要等待多久的时间才能够再次激活,类似游戏中的技能冷却时间。
  • transfer_enabled — 表示是否允许激活代币转账。
  • max_external_receivers — 使用该代币效用性的最大许可人数。如果设置为零,则只能为拥有代币托管权的用户激活该代币。
  • type_description — 描述代币所激活的功能特性.

Check transfer(检查代币转账)

该操作会检查代币的转账操作,如果激活代币功能时设定规则为禁止转账,而试图进行代币转账,则该操作会报错。在代币的智能合约中任何涉及到变更代币托管权的函数,都必须调用此方法。

ACTION checktransfr(eosio::name owner, eosio::name token_contract, eosio::asset quantity);

参数解释:

  • owner — 所有者,拥有代币所有权、想要进行代币转账的账号.
  • token_contract — 代币合约.
  • quantity — 代币转账数额及代币符号.

Check burn(检查代币销毁情况)

如果在代币激活功能的规则不允许销毁代币时却尝试进行代币销毁,则此操作将报错。代币智能合约中,在代币的智能合约中任何涉及到减少代币供应量时,都必须调用此方法。

ACTION checkburn(eosio::name owner, eosio::name token_contract, eosio::asset quantity);

参数解释:

  • owner — 所有者,拥有代币所有权、想要进行代币转账者的账号.
  • token_contract — 代币合约.
  • quantity — 代币转账数额及代币符号.

[Korean/한국어]

Chintai 토큰 임대 표준

한 줄의 코드를 통해 임대를 가능하게 하다.

Chintai 토큰 임대 표준은 아주 간단합니다. 모든 EOSIO 토큰 컨트랙트에 한 줄의 코드를 추가하면 토큰은 Chintai 플랫폼에서의 임대와 호환됩니다. 모든 임대 기능과 유틸리티는 임대 계약을 통해 자동화 됩니다.

이 표준은 당신이 상상할 수 있는 모든 유형의 토큰 임대를 사용할 수 있을 만큼 강력하게 설계되었습니다. 자산 기반 토큰, 대체 불가능한 토큰 및 그 중간의 모든 것이 가능합니다. 모든 EOSIO 커뮤니티에서 어떠한 토큰을 임대하실 수 있는 이점이 곧 실현될 것입니다.

CHEX Holders

CHEX 토큰이 통합된 Chintai 2.0 토큰 임대는 이 표준으로 인해 상당히 향상 될 것입니다. CHEX를 소유함으로써 이 표준에 의해 활성화 될 모든 토큰 임대 시장에 저렴한 비용으로 액세스 할 수 있습니다. CHEX 토큰 경매에 대해 자세히 알아보십시오.

Get CHEX!

파트너십 및 피드백

Boid는 Chintai 토큰 임대 표준을 설계하는데 도움이 되는 최초의 전략적 파트너이며, 이 표준은 BOID 토큰에도 적용될 것입니다.

저희는 피드백을 받기 위해 EOS 커뮤니티를 초대합니다!

이 텔레그램 그룹에 들어오세요.

설치 방법

설정을 쉽게 하기 위해, 당신은 저희 버전의 컨트랙트를 사용할 수 있습니다. (EOS메인넷”leaseanycoin” 계정에 있음) 또는 오픈 소스 코드를 받아 자신의 컨트랙트 사본을 배포 할 수도 있습니다.

토큰 컨트랙트을 설정하고 필요에 맞게 임대 표준을 구성한 후에는 당신의 dApp이 당신의 토큰 유틸리티를 추적 할 수 있도록 온-체인 테이블이 생성됩니다.

필요한 작업

Enable token

이 액션는 토큰의 유틸리티를 활성화합니다. 여기에서 활성화라는 단어는 토큰을 스테이킹(staking) 하거나 위임(delegating)하는 것과 동의어이지만 더 이해하기 어려운 상황을 쉽게 설명하기 위함입니다.

ACTION enable(eosio::name owner, std::vector< eosio::name > receivers, eosio::name token_contract, eosio::asset quantity, std::vector< uint128_t > nft_ids, uint64_t type, uint64_t time_period);

  • owner — 활성화 될 토큰의 관리 소유권을 가진 사람입니다.
  • receivers — 활성화 될 토큰의 유틸리티를 받는 개인입니다.
  • token_contract — 토큰 컨트랙트의 이름입니다.
  • quantity — 활성화 될 토큰의 수량과 심볼. 만약 NFT를 다루는 경우 이 값은 empty로 두어야 합니다. 플레이스 홀더 EMPTY 토큰을 만듭니다.
  • nft_ids — 활성화 할 NFT를 나타내는 고유 식별 번호입니다.
  • type — 활성화 될 토큰의 타입
  • time_period — 비활성화 되기까지 활성화 되어 있을 기간

Disable token

이 작업은 토큰을 비활성화하고, 토큰을 언스테이킹 하는 것과 동의어입니다.

ACTION disable(eosio::name owner, std::vector< eosio::name > receivers, eosio::name token_contract, eosio::asset quantity, std::vector< uint128_t > nft_ids, uint64_t type);

  • Arguments 는 토큰활성화와 동일합니다.

Configure token

이 작업을 통해 임대목적으로 토큰을 configure 하는 방법을 알려줍니다.

추가하려는 각 유형의 토큰 enable 기능에 대해 이 조치를 호출해야 합니다. 예를 들어, 이벤트 목적 그리고 전투 목적으로 사용할 수 있는 게임 내 방어구 토큰을 만들려면 이 함수를 두 번 호출하고 사용 케이스에 따라 다른 유형을 지정하고 적절한 설명을 넣습니다.

ACTION configure(eosio::name token_contract, eosio::symbol token, std::vector< uint128_t > nft_ids, uint64_t disable_wait_period, bool transfer_enabled, uint64_t max_external_receivers, uint64_t type, std::string type_description);

  • token_contract — 토큰을 컨트롤 하는 컨트랙트
  • token — 컨트랙트 안 토큰의 심볼과 precision. NFT를 다루는 경우 이 값은 empty로 두어야 합니다.
  • std::vector< uint128_t > nft_ids — 구성할 NFT를 나타내는 고유 식별 번호입니다.
  • disable_wait_period — 활성화 된 토큰이 비활성화 되고 다시 활성화 될 수 있기 까지 걸리는 시간
  • transfer_enabled — 활성화된 토큰이 전송될 수 있는 지 여부를 나타냅니다.
  • max_external_receivers — 토큰 유틸리티를 사용할 수 있는 최대 사용자 수입니다. 0 으로 설정하면 토큰을 들고 있는 사용자에 한해서만 토큰을 사용할 수 있습니다.
  • type_description — 토큰이 활성화 될 수 있는 하나의 방법을 설명합니다.

Check transfer

활성화 기능의 규칙에 의해 허용되지 않았을 때, 토큰 전송 시도가 이루어지면 실패합니다. 이 function 은 토큰의 커스토디안이 변경되는 모든 function 의 토큰 컨트랙트에서 호출되어야 합니다.

ACTION checktransfr(eosio::name owner, eosio::name token_contract, eosio::asset quantity);

  • owner — 전송을 희망하는 토큰의 소유권자
  • token_contract — 토큰을 컨트롤 하는 컨트랙트
  • quantity — 전송되고자 하는 수량과 토큰의 심볼

Check burn

활성화 기능의 규칙에 의해 허용되지 않는 경우 토큰을 소각하려는 시도가 이루어지면 실패하게됩니다. 이 function 은 토큰이 유통 상태에서 제거되는 모든 function 의 토큰 컨트랙트에서 호출되어야 합니다.

ACTION checkburn(eosio::name owner, eosio::name token_contract, eosio::asset quantity);

  • owner —전송을 희망하는 토큰의 소유권자
  • token_contract —토큰을 컨트롤 하는 컨트랙트
  • quantity — 전송되고자 하는 수량과 토큰의 심볼

Chintai — Lease Everything

Website | Twitter | Telegram | Medium | LinkedIn | Email

--

--

Chintai
Chintai

Written by Chintai

Institutional Grade Digital Asset Technology For Capital Markets

No responses yet