主页EIPs周刊
EIPsERC-7254
ERC-7254

Token Revenue Sharing

Revenue token is a token that shares rewards for holders.
DraftStandards Track: ERC
创建时间: 2023-06-29
Quy Phan (@quyphandang), Quy Phan <quy.phan@cryptoviet.info>
社区讨论原文链接编辑
1 分钟了解
欢迎补充好内容
去提交
相关视频
欢迎补充好内容
去提交
正文

Abstract

With the aspiration of bringing forth unique functionality and enhancing value for holders of ERC-20 tokens, our project aims to effortlessly reward token holders without necessitating users to lock, stake, or farm their tokens. Whenever the project generates profits, these profits can be distributed to the token holders.

Revenue Sharing is an extended version of ERC-20. It proposes an additional payment method for token holders.

This standard includes updating rewards for holders and allowing token holders to withdraw rewards.

Potential use cases encompass:

  • Companies distributing dividends to token holders.
  • Direct sharing of revenue derived from business activities, such as marketplaces, Automated Market Makers (AMMs), and games.

Specification

Methods

maxTokenReward

Returns max token reward.

function maxTokenReward() public view returns (uint256)

informationOf

Returns the account information of another account with the address token and account, including: inReward, outReward and withdraw.

function informationOf(address token, address account) public view returns (UserInformation memory)

informationOfBatch

Returns the list account information of another account with the account, including: inReward, outReward and withdraw.

function informationOfBatch(address account) public view returns (UserInformation[] memory)

UserInformation

inReward: when user's balance decreases, inReward will be updated outReward: when user's balance increases, outReward will be updated withdraw: total amount of reward tokens withdrawn

struct UserInformation { uint256 inReward; uint256 outReward; uint256 withdraw; }

tokenReward

Returns the list token reward address of the token.

function tokenReward() public view returns (address[] memory)

updateReward

Updates rewardPerShare of token reward. rewardPerShare = rewardPerShare + amount / totalSupply()

function updateReward(address[] memory token, uint256[] memory amount) public

viewReward

Returns the list amount of reward for an account

function viewReward(address account) public view returns (uint256[] memory)

getReward

Gets and returns reward with list token reward.

function getReward(address[] memory token) public

getRewardPerShare

Returns the reward per share of token reward.

function getRewardPerShare(address token) public view returns (uint256)

existsTokenReward

Returns the status of token reward.

function existsTokenReward(address token) public view returns (bool)

Rationale

TBD

Reference Implementation

Security Considerations

Needs discussion.

Copyright and related rights waived via CC0.

扩展阅读
欢迎补充好内容
去提交
相关项目
欢迎补充好内容
去提交

不想错过最新的 EIP 动态?

订阅 EIPs Fun 周刊以跟进相关更新,建⽴你与 EIP 之间的连接 ,更好地建设以太坊。

详情
支持以太坊贡献者,推动生态建设
资源
GitHub
支持社区