值得注意的是,它引入了一种称为初始模型发行(Initial Model Offering,简称 IMO)的用例。许多开源 AI 模型在通过其贡献获利方面面临挑战,从而导致贡献者和组织都缺乏动力。本提案旨在通过引入内在收益分成代币来增强开源 AI 模型和组织的能力。在利用代币进行 IMO 时,开源 AI 组织可以进行筹款,以获取激励 AI 模型持续开发所需的基本资金。此外,任何利用这些开源模型的项目都会通过向收益池支付指定费用来为生态系统的可持续性做出贡献。该费用构成了收益分成机制的基础,允许内在收益分成代币持有者申领相应比例的份额,从而建立一个系统且公平的分配机制。重要的是,这种收益分成功能可作为代币持有者的保证,从而促进长期的收益利益并鼓励持续参与开源 AI 社区。
定义一个 claimableRevenue 视图函数,用于计算代币持有者在某个快照处可申领的 ETH 数量。
定义一个 claim 函数,供代币持有者根据某个快照处的代币余额申领 ETH。
定义一个 snapshot 函数,用于创建代币余额和可申领收益代币余额的快照。
定义一个 redeemableOnBurn 视图函数,用于计算代币持有者在燃烧代币时可赎回的 ETH 数量。
定义一个 burn 函数,供代币持有者燃烧代币并赎回相应数量的收益代币。
pragmasolidity^0.8.24;/**
* @dev An interface for ERC-7641, an ERC-20 extension that integrates a revenue-sharing mechanism, ensuring tokens intrinsically represent a share of a communal revenue pool
* @dev ERC-7641 的接口,是 ERC-20 扩展,集成了收益分成机制,确保代币从本质上代表了公共收益池中的一部分
*/interfaceIERC7641isIERC20{/**
* @dev A function to calculate the amount of ETH claimable by a token holder at certain snapshot.
* @param account The address of the token holder
* @param snapshotId The snapshot id
* @return The amount of revenue token claimable
* @dev 用于计算代币持有者在特定快照处可申领的 ETH 数量的函数。
* @param account 代币持有者的地址
* @param snapshotId 快照 ID
* @return 可申领的收益代币数量
*/functionclaimableRevenue(addressaccount,uint256snapshotId)externalviewreturns(uint256);/**
* @dev A function for token holder to claim ETH based on the token balance at certain snapshot.
* @param snapshotId The snapshot id
* @dev 代币持有者根据特定快照处的代币余额申领 ETH 的函数。
* @param snapshotId 快照 ID
*/functionclaim(uint256snapshotId)external;/**
* @dev A function to snapshot the token balance and the claimable revenue token balance
* @return The snapshot id
* @notice Should have `require` to avoid ddos attack
* @dev 拍摄代币余额和可申领收益代币余额快照的函数
* @return 快照 ID
* @notice 应该有 `require` 以避免 ddos 攻击
*/functionsnapshot()externalreturns(uint256);/**
* @dev A function to calculate the amount of ETH redeemable by a token holder upon burn
* @param amount The amount of token to burn
* @return The amount of revenue ETH redeemable
* @dev 用于计算代币持有者在燃烧时可赎回的 ETH 数量的函数
* @param amount 要燃烧的代币数量
* @return 可赎回的收益 ETH 数量
*/functionredeemableOnBurn(uint256amount)externalviewreturns(uint256);/**
* @dev A function to burn tokens and redeem the corresponding amount of revenue token
* @param amount The amount of token to burn
* @dev 燃烧代币并赎回相应数量的收益代币的函数
* @param amount 要燃烧的代币数量
*/functionburn(uint256amount)external;}
pragmasolidity^0.8.24;/**
* @dev An optional extension of the ERC-7641 standard that accepts other ERC-20 revenue tokens into the contract with corresponding claim function
* @dev ERC-7641 标准的可选扩展,它接受其他 ERC-20 收益代币到合约中,并具有相应的申领函数
*/interfaceIERC7641AltRevTokenisIERC7641{/**
* @dev A function to calculate the amount of ERC-20 claimable by a token holder at certain snapshot.
* @param account The address of the token holder
* @param snapshotId The snapshot id
* @param token The address of the revenue token
* @return The amount of revenue token claimable
* @dev 用于计算代币持有者在特定快照处可申领的 ERC-20 数量的函数。
* @param account 代币持有者的地址
* @param snapshotId 快照 ID
* @param token 收益代币的地址
* @return 可申领的收益代币数量
*/functionclaimableERC20(addressaccount,uint256snapshotId,addresstoken)externalviewreturns(uint256);/**
* @dev A function to calculate the amount of ERC-20 redeemable by a token holder upon burn
* @param amount The amount of token to burn
* @param token The address of the revenue token
* @return The amount of revenue token redeemable
* @dev 用于计算代币持有者在燃烧时可赎回的 ERC-20 数量的函数
* @param amount 要燃烧的代币数量
* @param token 收益代币的地址
* @return 可赎回的收益代币数量
*/functionredeemableERC20OnBurn(uint256amount,addresstoken)externalviewreturns(uint256);}