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

[FEATURE] Round Contract #12

Open
codingshot opened this issue May 13, 2024 · 2 comments · Fixed by #36
Open

[FEATURE] Round Contract #12

codingshot opened this issue May 13, 2024 · 2 comments · Fixed by #36
Assignees
Labels
feature-request new feature request smart-contracts Sorobon smart contract stellar stellar specific build

Comments

@codingshot
Copy link
Member

Problem

Need independent round contracts

User Story(s):

Description

Round contracts are contracts that control voting permission. If it is a vault contract this means that means the money lives on the contract and additional funds can be added. Otherwise, on the contract we can specify payout afterward. While vaults custody funds, this ensures that both

Based on estimated gas costs the actual payouts. Payouts can only be to projects that are on the approved [rojects in the round to enforce any malicious withdrawal of funds from vaults. As a result of this we may add a cooldown period with on chain challenges that must be resolved in order to prevent from malicious payouts and enforce

Data
Name
Description
roundID
Eligible Voters
Admin(s) optional
Voting Start and end date (cannot
accountId owner
Int Amount //This is the total vault amount or what is set if not a vault (how much the owner is supposed to pay in funding)
Results[]: sets each project with an amount to payout
Applications(projectID[], status) // pulls in projectID from registry, statuses can changed
Payout_complete bool
Write
init() // what most parameters are initialize within round factory
Change_voting_period
change_number_of_votes(int) // can only work if
Change_application_period // only can be done if voting period is not live
apply(projectInfo) // error is already applied
review_application(application_id, approval) // only works for admins
add_admin(accountID)
remove_admin(accountId) // only from owner
deposit_to_vault(asset) // anyone can deplosit to vault
calculate_results():
flag_voter() // can flag a vote – nice to have for mvp
trigger_payouts() // if vault then this triggers the payout // if not a vault then must pass through each payout to be considered done. Each result must be paid out and can be done piecemeal
Read
get_all_votes
can_account_vote(account_id) // checks whether an account can vote
is_voting_live(
Are_application_live_
get_all _applications
get_approved_applications
is_payouts_done()
user_has_voted(): bool // helper function to check whether user has voted
Total_funding_amount // if the vault pulls from assets within the vault, if not just shows the amount
Cast vote

Our initial vaults will only be able to accept XLM initially before we improve other assets.

Limitations

  • cross contract calls to registry
  • holding money in vault
  • allowing for multiple assets
  • allowing for admins
  • watch out for logic based on all the timing

Resources

@codingshot codingshot added feature-request new feature request smart-contracts Sorobon smart contract labels May 13, 2024
@codingshot codingshot added the stellar stellar specific build label Jun 21, 2024
@emarai emarai linked a pull request Jun 27, 2024 that will close this issue
@cryingraven cryingraven removed a link to a pull request Jul 5, 2024
@cryingraven cryingraven linked a pull request Jul 5, 2024 that will close this issue
@ekkirinaldi
Copy link

#36

To be reviewed

@ekkirinaldi
Copy link

on progress: refactor auth and add application disable/enable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request new feature request smart-contracts Sorobon smart contract stellar stellar specific build
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants