Commit and refund
Understand the exact owner calls and asset movements during the timed rounds.
Create or select a locker
A locker is created for a wallet through D17LockerFactory.createLockerFor. It records one immutable owner, the canonical D17 factory, and WETH. A locker may hold positions in more than one launch.
Commit
D17Locker.commitToRound(launch, round, expectedRulesHash) is owner-only and payable.
In one transaction the locker:
- verifies contract code, launch identity, WETH, exact rules hash, and factory registration;
- wraps the supplied native ETH to WETH;
- records the position locally; and
- asks the launch to record the round commitment.
The selected round must currently be open and the amount must meet the launch minimum. A settled position cannot commit again.
Refund an active window
refundCurrentRound(launch) is owner-only. It releases the currently active refundable round. The launch computes gross commitment, returned WETH, and any configured penalty.
- rounds 1–2: the full refundable amount becomes withdrawable;
- rounds 3–4: the published penalty goes to the launch treasury and the remainder becomes withdrawable;
- round 5: no ordinary refund window.
A refund updates the launch and locker accounting but leaves returned WETH in the locker. Use withdrawUnlockedWeth(launch, amount) to move it to the owner wallet.
Failed launch
If round 1 does not satisfy the launch's published success conditions, refundFailedLaunch(launch, expectedRulesHash) releases the locker's remaining round WETH without the ordinary refund penalty. This path has no expiry. The owner then withdraws released WETH from the locker.
Check transaction details
A non-custodial contract limits what valid locker calls can do, but a compromised webpage can still propose an unrelated wallet transaction. Check chain, destination, function, value, and decoded parameters in the wallet before signing.