Skip to content

Commit f2b2fed

Browse files
authored
On DAO Initialization Change Base To Stake to 1.5M Tokens (#413)
1 parent 13891f8 commit f2b2fed

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

programs/v07_launchpad/src/instructions/complete_launch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use crate::error::LaunchpadError;
1717
use crate::events::{CommonFields, LaunchCloseEvent, LaunchCompletedEvent};
1818
use crate::state::{Launch, LaunchState};
1919
use crate::{
20-
fee_recipient, PRICE_SCALE, TOKENS_TO_DAMM_V2_LIQUIDITY_UNSCALED, TOKENS_TO_FUTARCHY_LIQUIDITY,
21-
TOKENS_TO_PARTICIPANTS, TOKEN_SCALE,
20+
fee_recipient, PRICE_SCALE, PROPOSAL_MIN_STAKE_TOKENS, TOKENS_TO_DAMM_V2_LIQUIDITY_UNSCALED,
21+
TOKENS_TO_FUTARCHY_LIQUIDITY, TOKENS_TO_PARTICIPANTS, TOKEN_SCALE,
2222
};
2323
use anchor_spl::metadata::{
2424
mpl_token_metadata::ID as MPL_TOKEN_METADATA_PROGRAM_ID, update_metadata_accounts_v2, Metadata,
@@ -426,7 +426,7 @@ impl CompleteLaunch<'_> {
426426
min_quote_futarchic_liquidity: 0,
427427
min_base_futarchic_liquidity: 0,
428428
pass_threshold_bps: 300,
429-
base_to_stake: TOKENS_TO_PARTICIPANTS / 20,
429+
base_to_stake: PROPOSAL_MIN_STAKE_TOKENS,
430430
seconds_per_proposal: 3 * 24 * 60 * 60,
431431
twap_start_delay_seconds: 24 * 60 * 60,
432432
nonce: 0,

programs/v07_launchpad/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ pub const TOKENS_TO_FUTARCHY_LIQUIDITY: u64 = 2_000_000 * TOKEN_SCALE;
3737
pub const TOKENS_TO_DAMM_V2_LIQUIDITY: u64 = TOKENS_TO_DAMM_V2_LIQUIDITY_UNSCALED * TOKEN_SCALE;
3838
/// we need this to prevent overflow
3939
pub const TOKENS_TO_DAMM_V2_LIQUIDITY_UNSCALED: u64 = 900_000;
40+
/// 15% of the floating supply to stake
41+
pub const PROPOSAL_MIN_STAKE_TOKENS: u64 = 1_500_000 * TOKEN_SCALE;
4042

4143
/// Max 50% premine
4244
pub const MAX_PREMINE: u64 = 15_000_000 * TOKEN_SCALE;

tests/integration/fullLaunch_v7.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export default async function suite() {
489489
} = this.futarchy.getProposalPdas(proposal, META, MAINNET_USDC, dao);
490490

491491
// Stake tokens to meet the baseToStake requirement (100 billion = 100k META tokens)
492-
const stakeAmount = new BN(500_000 * 10 ** 6); // 100k META tokens
492+
const stakeAmount = new BN(1_500_000 * 10 ** 6); // 1.5M META tokens
493493
await this.futarchy
494494
.stakeToProposalIx({
495495
proposal,
@@ -510,6 +510,16 @@ export default async function suite() {
510510
})
511511
.rpc();
512512

513+
// Unstake from the proposal
514+
await this.futarchy
515+
.unstakeFromProposalIx({
516+
proposal,
517+
dao,
518+
baseMint: META,
519+
amount: stakeAmount,
520+
})
521+
.rpc();
522+
513523
await this.conditionalVault
514524
.splitTokensIx(question, baseVault, META, new BN(100 * 10 ** 6), 2)
515525
.rpc();

0 commit comments

Comments
 (0)