Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP: Tranche Sequence #7169

Closed
wants to merge 19 commits into from
Closed

Add EIP: Tranche Sequence #7169

wants to merge 19 commits into from

Conversation

pcanwar
Copy link

@pcanwar pcanwar commented Jun 12, 2023

@pcanwar pcanwar requested a review from eth-bot as a code owner June 12, 2023 14:59
@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-erc labels Jun 12, 2023
@eth-bot
Copy link
Collaborator

eth-bot commented Jun 12, 2023

File EIPS/eip-7169.md

Requires 1 more reviewers from @axic, @Pandapip1, @SamWilsn, @xinbenlv

@eth-bot eth-bot changed the title Sequence of Time Management Tranches on-chain Add EIP: Tranche Sequence Jun 12, 2023
@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Jun 12, 2023
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Jun 12, 2023
EIPS/eip-trnache.md Outdated Show resolved Hide resolved
@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Jun 13, 2023
@pcanwar
Copy link
Author

pcanwar commented Jun 19, 2023

Hey @abcoathup, is there anything I have to do? Thanks

@abcoathup
Copy link
Contributor

The draft is still failing validation. You need to address those issues and an EIP editor can review.

@github-actions github-actions bot added w-ci Waiting on CI to pass and removed w-ci Waiting on CI to pass labels Aug 22, 2023
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Aug 22, 2023
@github-actions
Copy link

The commit b6e668d (as a parent of 2d4608b) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Sep 17, 2023
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Oct 9, 2023
@pcanwar
Copy link
Author

pcanwar commented Oct 9, 2023

Hey @abcoathup, I have addressed all issues! Any suggestions? I appreciate it.

@abcoathup
Copy link
Contributor

Hey @abcoathup, I have addressed all issues! Any suggestions? I appreciate it.

You need to wait for an EIP editor to review. There is an EIP office hours meeting that you could attend.

Copy link
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit of overall feedback on this proposal: libraries do not need to be EIPs. Just write the library. You only need an EIP if you expect different independent parties to have to coordinate on a system. For example, ERC-20 is a good proposal because wallets need to interact with any number of different tokens, and every ERC-20 token wants to work with every wallet.

If you wish to standardize the interface for a library, and expect there to be multiple implementations, then an EIP is a good idea.


## Abstract

This concept is extended through a library that builds on [ERC-20](./eip-20.md), [ERC-721](./eip-721.md), and other standards, offering a transparent and structured approach to on-chain time management. With the help of additional functions, the library enables stakeholders to define time milestones and a sequence of opportunities to evaluate and decide on the next steps.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your abstract should be a terse technical summary that gives readers a high level understanding of what the proposal does. I haven't read further down yet, but perhaps something like:

Building on [ERC-20](./eip-20.md), [ERC-721](./eip-721.md), and other standards this proposal
defines a transparent and structured approach to on-chain time management using tranche
sequences. A tranche sequence is a **this is where I would put a definition of a tranche sequence
if I knew what it was**.


## Motivation

The motivation behind this library is to overcome the challenges of managing multi-stage projects or use cases on utility tokens or NFTs while providing a fair and transparent approach to on-chain time management. This structured approach facilitates effective smart contract management and enables stakeholders to progress and make informed decisions. The library can be applied to various use cases, such as salary negotiations, project funding, or resource allocation, promoting trust and collaboration among stakeholders. The library's flexibility and transparency can result in a fairer and more effective decision-making process for all parties involved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The motivation behind this library is to overcome the challenges of managing multi-stage projects or use cases on utility tokens or NFTs while providing a fair and transparent approach to on-chain time management. This structured approach facilitates effective smart contract management and enables stakeholders to progress and make informed decisions. The library can be applied to various use cases, such as salary negotiations, project funding, or resource allocation, promoting trust and collaboration among stakeholders. The library's flexibility and transparency can result in a fairer and more effective decision-making process for all parties involved.
The motivation behind this proposal is to overcome the challenges of managing multi-stage projects or use cases on utility tokens or NFTs while providing a fair and transparent approach to on-chain time management. This structured approach facilitates effective smart contract management and enables stakeholders to progress and make informed decisions. This proposal can be applied to various use cases, such as salary negotiations, project funding, or resource allocation, promoting trust and collaboration among stakeholders. Its flexibility and transparency can result in a fairer and more effective decision-making process for all parties involved.

Comment on lines +21 to +22
The following properties make tranche sequences an effective tool for managing multi-stage use cases and projects on utility tokens or NFTs in a structured and transparent manner:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can uncomment this when ready

Suggested change
The following properties make tranche sequences an effective tool for managing multi-stage use cases and projects on utility tokens or NFTs in a structured and transparent manner:
<!-- The following properties make tranche sequences an effective tool for managing multi-stage use cases and projects on utility tokens or NFTs in a structured and transparent manner: -->


## Specification

Library
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section needs to be better organized. I recommend using a single code block for the interface, followed by sections describing each function in detail. For example:

## Specification

```solidity
interface Tranche {
    function initialize(uint256[] memory sequence) public;
}
```

### Functions

#### `initialize`

The initialize function floops the flob.

### Events

...

Comment on lines +126 to +150
Features

Flexible Time Units: The library allows you to define time in various units: minutes, hours, days, and weeks. This enables flexibility when dealing with different periods.

Customizable Tranches: The library is built around tranches or blocks of time that can be used to represent milestones. These tranches can be initialized according to your needs.

Dynamic Time Sequencing: It enables dynamic time sequencing. The time sequence can be increased based on the existing series in the smart contract.

Rest Time Inclusion: The library includes a feature for a rest time on the sequence. This offers flexibility for stakeholders, allowing for pauses or intervals between different time sequences.

Time Extension: The library allows for the time of a particular sequence to be increased if needed. This is particularly useful when an ongoing event or process needs an extended time duration.

Immutable Time Entries: Once a timestamp is added, it cannot be removed or modified. This feature offers immutability for time entries, ensuring the integrity and reliability of the time sequences.

Milestone Tracking: The library provides utilities to track milestones and understand their progress. You can get the number of completed and missed milestones, check if the current timestamp is within a milestone, and even forcibly advance to the next milestone.

Timestamp Reporting: The library provides utilities for reporting missed timestamps, getting the start and end times of the current milestone, and listing all missing timestamps since the last completed milestone.

Force Increase of Milestones: If needed, milestones can be forcibly advanced manually, regardless of whether they're currently extendable.

Start Time Customization: The library allows the initialization of milestones with a custom start time instead of the current block timestamp, which can be helpful for specific project timelines.

Effective Milestone Management: Functions such as resetMileStone, isCurrentMilestone, isMilestoneStarted, and isMilestoneExpired provide the ability to effectively manage milestones, including initiating, resetting, tracking, and identifying the completion of a milestone.

Precision and Accuracy: The library uses block.timestamp for timekeeping, which ensures precise and accurate timestamps for all operations. This accuracy is essential for a fair and accurate representation of project progress.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EIPs don't usually contain lists of features. Instead, you should convert these into requirements (eg. "The contract MUST ...", or "Implementations SHOULD ...") or explanations in your rationale.


## Rationale

This library is intended to provide a standardized and efficient way to manage time-based milestones in smart contracts, enabling developers to easily integrate this functionality into a variety of applications.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This first line of your rationale should be moved to the motivation section. The rationale section should describe technical decisions made within the EIP itself, while the motivation section justifies the EIP as a whole.

## Rationale

This library is intended to provide a standardized and efficient way to manage time-based milestones in smart contracts, enabling developers to easily integrate this functionality into a variety of applications.
Update, getter, initialization, modification, query, and helper functions provide a set of tools for managing time based milestones and offer the ability to create, manage, update, and query milestones flexibly and efficiently.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a truth, but it doesn't really offer much in the way of explanation. Please expand it or reword it so that it answers a "why" question.


This library is intended to provide a standardized and efficient way to manage time-based milestones in smart contracts, enabling developers to easily integrate this functionality into a variety of applications.
Update, getter, initialization, modification, query, and helper functions provide a set of tools for managing time based milestones and offer the ability to create, manage, update, and query milestones flexibly and efficiently.
The library provides replay protection and ensures security by enforcing time boundaries for each milestone and providing the ability to extend time sequences if necessary.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this is true, but it doesn't explain why it is necessary to provide replay protection.


## Test Cases

The test cases presented in the src directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can link to any file in the /assets/eip-7169/ directory (but not the whole directory.) It's pretty common to include a README.md file, and link to that from the EIP.

@SamWilsn
Copy link
Contributor

I am closing this pull request because we are in the process of separating EIPs and ERCs into distinct repositories. Unfortunately, as far as we are aware, GitHub does not provide any tools to ease this migration, so every pull request will need to be re-opened manually.

As this is a PR to create / modify an ERC, I will kindly ask you to redirect this to the new repository at ethereum/ERCs. We have prepared a guide to help with the process.

If there is relevant history here, please link to this PR from the new pull request.

On behalf of the EIP Editors, I apologize for this inconvenience.

@SamWilsn SamWilsn closed this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-erc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants