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

flow: Add start block to campaign creation #71

Closed
5-mark opened this issue Jul 18, 2022 · 13 comments · Fixed by #87
Closed

flow: Add start block to campaign creation #71

5-mark opened this issue Jul 18, 2022 · 13 comments · Fixed by #87
Assignees
Labels
Chain Story User Story

Comments

@5-mark
Copy link
Contributor

5-mark commented Jul 18, 2022

User Story

As user i want to create campaigns which start in the future, so that I can get my audience ready for funding.

Acceptance Criteria

Statement of Value

As a Creator
I want to create an "Upcoming" campaign
So that Contributors will be aware of it before it's activation

Acceptance Criteria

  1. Add “Start date” parameter createCampaign extrinsic.
  2. The “Start date” is the blocktime when a campaign will become active and a contributor will be able to contribute to it.
  3. In status "0" (Init - not started) it is not possible to fund into a campaign
  4. The “Start date” cannot be <= the expiry Daten
  5. The minimum duration of a campaign is 24h
  6. The maximum duration of a campaign is 60d.

Additional Information:

Campaign Statuses: https://docs.google.com/spreadsheets/d/1H6ZQMjveL5weN146BbKlXXdDAUxvDiVa9mSHruerq0s/edit?usp=sharing

related to frontend task: gamedaoco/gamedao-haiku#270

How to test

  1. create a campaign with startdate bigger than expiry date --> not possible
  2. create a campaign with blocktimes less than ~24h --> not possible
  3. create a campaign with blocktimes bigger than ~60d --> not possible
  4. create a campaign with startdate in the future and try to contribute into it --> not possible
@5-mark 5-mark added Story User Story BR-present to be presented to team Chain labels Jul 18, 2022
@5-mark 5-mark transferred this issue from gamedaoco/gamedao-refinement Jul 29, 2022
@5-mark 5-mark removed the BR-present to be presented to team label Jul 29, 2022
@5-mark 5-mark added this to the Dungeons & Dragons S1 milestone Jul 29, 2022
@vovacha
Copy link
Contributor

vovacha commented Aug 8, 2022

The minimum duration of a campaign is 24h

For the standalone chain we have 3 sec block time and for the parachain it's 12 seconds.
The question is - which block time I should use in order to get these min and max durations?
@5-mark

@vovacha
Copy link
Contributor

vovacha commented Aug 8, 2022

While creating a campaign, what's the purpose of token_symbol and token_name?
I'd like to replace it with the currency_id instead.

@vovacha
Copy link
Contributor

vovacha commented Aug 8, 2022

We have created Campaign's field as a UnixTime. It's not a common practice, and we have it only for the Campaign type. Should we reconsider it and use a block number instead?

@vovacha
Copy link
Contributor

vovacha commented Aug 8, 2022

What is the purpose of the update_state extrinsic? Any manual state change will result in unpredictable campaign behavior (not finalized or not activated, etc.).

These are the main campaign's states:

  • Created
  • Activated
  • Paused
  • Succeeded
  • Failed
  • Locked

Created -> Activated works on reaching the start block.
Activated -> Succeeded (Failed) works on reaching the expiry block.

Only Pause could actually be the case for update_state. I assume it means stop gathering contributions?
What is the Locked status about?

@5-mark
Copy link
Contributor Author

5-mark commented Aug 8, 2022

The minimum duration of a campaign is 24h

For the standalone chain we have 3 sec block time and for the parachain it's 12 seconds. The question is - which block time I should use in order to get these min and max durations? @5-mark

@vovacha either we need something which calculates a corresponding blocktime into time (mins/hours/days)
1 min is 20 blocks for one chain
1 min is 5 blocks for another chain

or we need configurations per chain specifically for the validation. I would go with the first. In the frontend something like this was done already. @DarkNebula0 might be able to explain.

@5-mark
Copy link
Contributor Author

5-mark commented Aug 8, 2022

While creating a campaign, what's the purpose of token_symbol and token_name? I'd like to replace it with the currency_id instead.

@vovacha I would agree. However I dont know what @2075 intended with this. I agree that 1 parameter should be sufficient to determine the currency.

@5-mark
Copy link
Contributor Author

5-mark commented Aug 8, 2022

We have created Campaign's field as a UnixTime. It's not a common practice, and we have it only for the Campaign type. Should we reconsider it and use a block number instead?

@vovacha also here I am not aware why @2075 used that field only in campaign. Please proceed with the blocktime.

@5-mark
Copy link
Contributor Author

5-mark commented Aug 8, 2022

What is the purpose of the update_state extrinsic? Any manual state change will result in unpredictable campaign behavior (not finalized or not activated, etc.).

These are the main campaign's states:

  • Created
  • Activated
  • Paused
  • Succeeded
  • Failed
  • Locked

Created -> Activated works on reaching the start block. Activated -> Succeeded (Failed) works on reaching the expiry block.

Only Pause could actually be the case for update_state. I assume it means stop gathering contributions? What is the Locked status about?

@vovacha So far I know that Paused and Locked should be the statuses GameDAO DAO shall be able to set.
If sth. is wrong with a campaign or their initiators GameDAO puts a veto and can "lock" the campaign. I guess its not implemented yet that when having theses statuses contributions are not possible.
That should be implemented but we need to talk with @2075 and specify properly.
Not everyone should be able to perform this action. Only GameDAO.

@2075
Copy link
Member

2075 commented Aug 8, 2022

The minimum duration of a campaign is 24h

For the standalone chain we have 3 sec block time and for the parachain it's 12 seconds. The question is - which block time I should use in order to get these min and max durations? @5-mark

  • initially we had presets for typicla runtimes of a campaign, 1 day, 1 week, 1month, 3 months. we should stick to this as it makes the interface much easier to comprehend. also the calculation will be based on the configured block time and selected duration. we could let the FE calc the duration in blocks based on user input.

While creating a campaign, what's the purpose of token_symbol and token_name? I'd like to replace it with the currency_id instead.

no, the two params are for setting up a new custom token if creators want to conduct a token generation event. therefore these two are optionals and would result in a TGE dropping fungible token with a new currency id to contributors.

@2075
Copy link
Member

2075 commented Aug 8, 2022

We have created Campaign's field as a UnixTime. It's not a common practice, and we have it only for the Campaign type. Should we reconsider it and use a block number instead?

i would not agree that it is not a common practice, most timestamps in tech are based on unix timestamps. but i agree that we could store the start block, but we will possibly not be able to derive a reliable timestamp for the campaign anymore. (also true for all other transactions which could end in an audit log or so, but maybe also reasonable to store events with there timestamp separately, so this could be removed eventually)

@2075
Copy link
Member

2075 commented Aug 8, 2022

What is the purpose of the update_state extrinsic? Any manual state change will result in unpredictable campaign behavior (not finalized or not activated, etc.).

These are the main campaign's states:

* Created

* Activated

* Paused

* Succeeded

* Failed

* Locked

Created -> Activated works on reaching the start block. Activated -> Succeeded (Failed) works on reaching the expiry block.

Only Pause could actually be the case for update_state. I assume it means stop gathering contributions? What is the Locked status about?

update state was/is needed to execute external action e.g. through a council vote and related.

@2075
Copy link
Member

2075 commented Aug 8, 2022

The minimum duration of a campaign is 24h

For the standalone chain we have 3 sec block time and for the parachain it's 12 seconds. The question is - which block time I should use in order to get these min and max durations? @5-mark

@vovacha either we need something which calculates a corresponding blocktime into time (mins/hours/days) 1 min is 20 blocks for one chain 1 min is 5 blocks for another chain

or we need configurations per chain specifically for the validation. I would go with the first. In the frontend something like this was done already. @DarkNebula0 might be able to explain.

the estimated time can be derived by blocktime. thats why we either need unix timestamps for relevant events and also the reason why i did not use calendars in the past but preset time frames for the duration. we should also normalise the startpoint in blocks ( estimated hours ) instead of this calendar picker in the FE which suggests people can pick an exact time which is not the case.

@2075
Copy link
Member

2075 commented Aug 8, 2022

super hard to discuss like this, we should use the discussion option in github to discuss features here instead of the issue imho: we can create threads per topic and issue, etc : https://github.com/gamedaoco/gamedao-protocol/discussions

@vovacha vovacha linked a pull request Aug 12, 2022 that will close this issue
@vovacha vovacha closed this as completed Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chain Story User Story
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants