PotLock / grantpicks

Pairwise voting mechanism for Stellar built on Soroban and NEAR Protocol.
https://grantpicks.com
MIT License
3 stars 1 forks source link

[FEATURE] Round Contract #12

Open codingshot opened 6 months ago

codingshot commented 6 months ago

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_applicationlive 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

Resources

ekkirinaldi commented 4 months ago

https://github.com/PotLock/grantpicks/pull/36

To be reviewed

ekkirinaldi commented 4 months ago

on progress: refactor auth and add application disable/enable