Skip to content

Conversation

@sklppy88
Copy link
Collaborator

No description provided.

@sklppy88 sklppy88 self-assigned this Dec 15, 2025
@sklppy88 sklppy88 requested a review from critesjosh December 15, 2025 19:32
@sklppy88 sklppy88 removed their assignment Dec 15, 2025
current_supply: u128,
total_liquidity: u128,
) -> (u128, u128) {
assert(total_liquidity > 0 as u128, "ZERO_LIQUIDITY");
Copy link
Contributor

Choose a reason for hiding this comment

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

is this cast necessary?

///
/// Returns: (price_before, price_after, price_impact_percentage)
/// All as fixed-point values
pub fn calculate_price_impact(
Copy link
Contributor

Choose a reason for hiding this comment

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

how is this function intended to be used? is it just a helper? I see its not called from anywhere

};
use dep::uint_note::uint_note::{UintNote, PartialUintNote};

// Storage slots for deriving partial note locations
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be helpful to add another line or 2 about why this is needed, or link to a relevant docs page

collateral_balances: Map<AztecAddress, PrivateSet<UintNote, Context>, Context>,
yes_supply: PublicMutable<u128, Context>,
no_supply: PublicMutable<u128, Context>,
liquidity_constant: PublicMutable<u128, Context>,
Copy link
Contributor

Choose a reason for hiding this comment

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

this isn't actually a constant right? maybe rename to something like "total_liquidity" or something that is more clear

## Overview

This contract allows users to:
- **Vote on binary outcomes** (YES/NO) **anonymously** - no one knows WHO voted
Copy link
Contributor

Choose a reason for hiding this comment

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

Would consider this a vote or a bet? Are users actually using this contract to make decisions, or just to bet on them?

aztec-up 3.0.0-devnet.4

# Install npm dependencies
npm install
Copy link
Contributor

Choose a reason for hiding this comment

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

wdyt about updating this to be yarn install instead, to keep it consistent with our other repos/examples/docs? we pretty much use yarn everywhere else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants