DWOJ PRESALE CONTRACT

The PresaleV2 contract is the beating heart of our token launch, transforming ETH, USDT or USDC contributions into $DWOJ allocations across multiple pricing rounds—and even letting you stake in one seamless flow. From start to finish, it ensures fair pricing, secure fund handling, dynamic round progression and an irrevocable burn of leftovers. Here’s how it all comes together:


1. Dynamic, Multi-Round Pricing

Instead of a single flat rate, PresaleV2 breaks your opportunity into successive “rounds.” Each round defines:

  • Cap: How many tokens can be sold at this price tier.

  • Price: A USD-denominated rate pulled from a reliable oracle for USDT/USDC, or converted on-the-fly for ETH.

  • Time Window: When this round expires (or when its cap is reached).

The calculatePrice function automatically allocates your purchase across current and next rounds if you straddle a boundary—so you always pay exactly the right blended rate.


2. Flexible Payment Methods

Whether you prefer USDT, USDC, or ETH, PresaleV2 has you covered:

  • USDT / USDC: The contract pulls live USD pricing, pulls tokens from your wallet and immediately splits the proceeds to designated “wallets” in configured percentages.

  • ETH: Using an on-chain price feed, it computes the exact Ether amount required, refunds any ETH excess, then distributes the funds just like a stablecoin purchase.

  • WERT Integration: For specialized on-ramp partners, the buyWithETHWert function lets whitelisted addresses buy on behalf of users, so you can preserve a streamlined UX.

All of these buy functions are protected by ReentrancyGuard, check that the sale is live (Pausable + timestamp checks), and enforce per-wallet caps via maxTokensToBuy.


3. Staking Straight from Presale

Opt in to stake your tokens immediately: each buy function accepts a boolean stake flag. If true—and if you’re whitelisted—PresaleV2 routes your allocation straight to our StakingManager contract, crediting your future rewards without ever touching your wallet again.


4. Rigorous Fund Splitting

Once a purchase is confirmed, the contract calls splitETHValue, splitUSDTValue or splitUSDCValue to distribute incoming funds across multiple payment wallets.

  • Configurable Percentages: You can set up as many recipient addresses as needed, each with its share of proceeds.

  • Fallback to Single Wallet: If no split is defined, all proceeds go to a single paymentWallet.

  • On-chain Safety: All transfers use low-level calls checked for success, so missing approvals or missing balances revert the entire transaction—no rogue funds slip through.


5. Claim Phase & Vesting Launch

After tokens are deposited into PresaleV2, an owner-only call to startClaim kicks off the claim window:

  • The sale tokens are transferred in bulk to the contract.

  • A claimStart timestamp is set.

  • From that moment on, participants call claim() (or claimAndStake()) to retrieve or stake their purchased tokens, subject to optional whitelisting.


6. Automatic Burn of Unsold Tokens

Once the sale period has ended, any leftover $DWOJ still held by PresaleV2 can be irreversibly destroyed via the burnUnsoldTokens function. Because it calls the token’s native burn(amount) method, all unsold supply vanishes on-chain—no locks, no multisig approvals, no second chances. This final act turbocharges scarcity and seals the deal on a clean, fair launch.


In short, PresaleV2 is more than a simple crowdsale: it’s a fully audited, multi-asset, multi-round LaunchPad that rewards early decision-makers, automates fund routing, integrates seamless staking, and leaves zero loose ends through an immutable burn of any unsold tokens.

Last updated