跳到主要内容

BountiableToken, On-Chain Bounties for Transaction Execution

CIP-109Category: CBCTag: DRAFT阅读需 2 分钟

BountiableToken, On-Chain Bounties for Transaction Execution

Abstract

This CIP proposes the "BountiableToken" contract, an innovative extension of the BaseToken contract that introduces a bounty mechanism. This mechanism allows token holders to incentivize the execution of specific transactions by attaching a bounty reward. This feature enhances interaction possibilities within the Core Blockchain network by encouraging third-party execution of transactions.

Motivation

The primary motivation behind this proposal is to solve the challenge of incentivizing on-chain execution of specific transactions or tasks. By enabling token holders to assign a reward in tokens for executing a transaction, the BountiableToken contract can stimulate activity and enhance transaction efficiency within decentralized applications.

Specification

The "BountiableToken" Contract

Key Features:

  • Bounty Struct: A data structure to hold bounty details, including the owner, target, data, reward, nonce, deadline, energy limit, and signature.
  • Bounty Execution Mechanism: Functionality to allow users to 'cash' bounties, executing the specified transaction and claiming the reward.
  • Nonce Management: Each bounty has a unique nonce to ensure one-time execution.
  • Signature Verification: Ensures that the token holder authorizes the bounty.

Technical Details

  • Blockchain Compatibility: Core Blockchain (Ylem Version >0.8.0)
  • Core Functions:
    • cashBounty(Bounty[] calldata bounties): Executes specified bounties and transfers rewards.
  • Security: Includes checks to ensure that the caller is the authorized contract.

Rationale

Introducing a bounty mechanism in the BountiableToken contract addresses the need to incentivize specific Core Blockchain network actions. This feature is particularly beneficial when token holders wish to encourage the execution of specific tasks but cannot execute them personally.

Backward Compatibility

This contract maintains compatibility with the CBC20 standard, ensuring it can be integrated seamlessly into the Core Blockchain ecosystem.

Security Considerations

Security is paramount, especially in handling signatures and executing transactions. The contract should undergo thorough security audits to ensure its robustness and to identify and mitigate potential vulnerabilities.

Conclusion

The BountiableToken contract extends the functionality of the standard CBC20 token by introducing an on-chain bounty mechanism. This innovation has the potential to significantly enhance the utility and interactivity of tokens in the Core Blockchain ecosystem.

Copyright and related rights waived via CC0.