Skip to content

Commit

Permalink
Clean up, add notes for future work
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeHartnell committed Nov 17, 2023
1 parent 5379ccc commit dc34b0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
14 changes: 0 additions & 14 deletions contracts/external/cw-abc/src/abc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ pub struct HatchConfig {
pub contribution_limits: MinMax,
/// The initial raise range (min, max) in the reserve token
pub initial_raise: MinMax,
/// The initial price (p0) per reserve token
/// TODO: initial price is not implemented yet
/// TODO: do we need this or is it just calculated?
pub initial_price: Uint128,
/// The initial allocation (θ), percentage of the initial raise allocated to the Funding Pool
pub initial_allocation_ratio: StdDecimal,
/// Exit tax for the hatch phase
Expand All @@ -68,16 +64,6 @@ impl HatchConfig {
)
);

ensure!(
!self.initial_price.is_zero(),
ContractError::HatchPhaseConfigError(
"Initial price must be greater than zero.".to_string()
)
);

// TODO: define better values
// Q: is zero valid for initial allocation value? Isn't the whole point of the
// hatch phase to initialize the DAO treasury?
ensure!(
self.initial_allocation_ratio <= StdDecimal::percent(100u64),
ContractError::HatchPhaseConfigError(
Expand Down
9 changes: 9 additions & 0 deletions contracts/external/cw-abc/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub enum UpdatePhaseConfigMsg {
exit_tax: Option<StdDecimal>,
allocation_percentage: Option<StdDecimal>,
},
/// TODO include curve type so we know what happens when a DAO dies?
/// Update the closed phase configuration
Closed {},
}
Expand All @@ -64,8 +65,16 @@ pub enum ExecuteMsg {
/// Update the hatch phase configuration
/// This can only be called by the admin and only during the hatch phase
UpdatePhaseConfig(UpdatePhaseConfigMsg),
// TODO Close the bonding curve
// Closing the bonding curve means no more buys are enabled and exit tax is set
// to zero. This could be used in the event of a project shutting down for example.
//
// Q: do we allow updating of the curve type? Is it passed in here?
// Close {},
}

// TODO Price queries:
// - Price to buy a certain amount?
#[cw_ownable::cw_ownable_query]
#[cw_serde]
#[derive(QueryResponses)]
Expand Down

0 comments on commit dc34b0a

Please sign in to comment.