Docs
Tranches and partial settlement
Several Terms in series inside one Deal, each settling on its own.
What a tranche is
A tranche is one slice of a Deal's earnest with its own Term. A Deal has between 1 and 8 tranches. Each tranche has:
- a Term address,
- the Term's parameters, encoded as
termData, - a share in basis points.
Shares must sum to 10 000 bps. The factory rejects any other total. A Deal with one tranche of 10 000 bps is the common case.
Each tranche's amount is the earnest times its share. The last tranche takes any rounding remainder, so the tranches always add up to the earnest exactly.
Settling one at a time
settle(trancheIndex) acts on one tranche. Each tranche is evaluated, released or refunded independently of the others. A released tranche is closed; calling settle on it again reverts with TrancheClosed.
The deal stays Active until every tranche is closed. Then:
- if anything was released, the final state is Settled;
- if nothing was released, the final state is Refunded.
Example: 30 / 30 / 40
A launch pays a KOL 1 000 HYPE in three steps.
| Tranche | Term | Share | Amount |
|---|---|---|---|
| 0 | Graduated | 30 % | 300 HYPE |
| 1 | Listed on HyperCore | 30 % | 300 HYPE |
| 2 | Oath score at least 80 | 40 % | 400 HYPE |
The token graduates in week one. Anyone calls settle(0). The payee receives 297 HYPE, the Treasury 3 HYPE. The deal stays Active.
The token is listed in week three. settle(1) pays another 297 HYPE.
The oath score never reaches 80. The deadline passes. settle(2) refunds 400 HYPE to the payer. Every tranche is now closed and something was released, so the deal ends Settled. Total: 594 HYPE to the payee, 6 HYPE to the Treasury, 400 HYPE back to the payer.
Partial Terms
Most Terms are true or false. The Clock Term is different: it returns a fraction, the share of its tranche that has vested so far.
Settling a Clock tranche releases the vested share minus what was already released. The tranche stays open until it is fully vested. When the deadline passes, a final settle releases whatever has vested and refunds the rest to the payer.
If nothing new has vested, settle reverts with NothingVested.
Handshake deals
Handshake deals have exactly one tranche with no Term. The tranche covers the whole earnest.