Skip to main content

Limbo

Use Limbo when you want to build a wager around a target multiplier.

What the builder does

createBetTransaction('limbo', options) converts your multiplier into the fixed-point values expected by the contract, then builds the Limbo play transaction.

Required options

  • owner
  • coinType
  • stake
  • targetMultiplier

Optional game-specific options

  • scale

Shared optional options

  • cashStake
  • betCount
  • metadata
  • gasBudget
  • allowGasCoinShortcut

Example

const tx = client.suigar.tx.createBetTransaction('limbo', {
owner: '0x123',
coinType: '0x2::sui::SUI',
stake: 1_000_000_000n,
betCount: 3,
targetMultiplier: 2.5,
});

Typical usage

The usual Limbo flow is:

  1. read live stake and multiplier bounds
  2. collect a human multiplier such as 2.5
  3. build the transaction with the human value, not the scaled integer
  4. sign and execute it
  5. decode results if you want to display the resolved multiplier or payout details

Read current limits

Use live parameters when you need the current allowed stake or multiplier bounds before building the transaction:

import { fromMoveFloat } from '@suigar/sdk/utils';

const parameters = await client.suigar.getGameParameters('limbo', {
coinType: '0x2::sui::SUI',
});

const minMultiplier = fromMoveFloat(parameters.min_target_multiplier);
const maxMultiplier = fromMoveFloat(parameters.max_target_multiplier);

This is useful when your UI needs to:

  • clamp a user-entered multiplier to the current allowed range
  • show live min and max multiplier guidance beside the input
  • compare a custom targetMultiplier against the current onchain bounds before building the transaction

Notes

  • The SDK uses DEFAULT_LIMBO_MULTIPLIER_SCALE from @suigar/sdk/utils as the default multiplier scale. Its current value is 100.
  • targetMultiplier: 2.5 becomes 250 before being sent to Move.
  • Use a custom scale only if your integration needs to stay aligned with a different fixed-point representation.
  • partner attribution is injected automatically when the extension is registered with partner
  • reserved metadata keys such as partner and referrer are ignored with a warning when passed manually
  • fields such as min_target_multiplier, max_target_multiplier, min_rtp, and max_rtp are returned as generated Move float structs, so decode them with fromMoveFloat()