-
Notifications
You must be signed in to change notification settings - Fork 40
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
Arbitrary conditional vault #244
Arbitrary conditional vault #244
Conversation
759409e
to
d0bf35f
Compare
I will try to give this a read through when i get a chance if that's helpful |
/// Once resolved, the sum of all outcome resolutions is exactly 1. | ||
#[account] | ||
pub struct Question { | ||
pub question_id: [u8; 32], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
32 characters might be kinda smol, if its just an ID (and not characters) why do it like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's supposed to be a hash
54dd6fa
into
metaDAOproject:arbitrary-conditional-vault
|
||
total_redeemable += ((user_conditional_token_account.amount as u128 | ||
* question.payout_numerators[payout_index] as u128) | ||
/ question.payout_denominator as u128) as u64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing a mix of Solana Context
and (unsafe) math logic within one function. would be great to split up math and state modification logic from solana account loader stuff. this makes rust tests much easier to write and lets you fuzz more easily
No description provided.