Gnosis Developer Portal Conditional Tokens

Gnosis Developer Portal Conditional Tokens

  • Introduction
  • Use Case
  • Documentation
  • Tutorials
  • Support

›Conditional Tokes Tutorial

Conditional Tokes Tutorial

  • Introduction
  • Setup
  • Conditions
  • Bit Arrays
  • Basic Outcome Collections
  • Positions
  • Splitting From Collateral
  • Splitting Unions
  • Combining Outcome Collections
  • Splitting to Deeper Positions
  • Merging Positions
  • Transferring to EOA addresses
  • Transferring to Contract Addresses
  • Reporting Payouts
  • Basic Redemption
  • Deeper Redemptions
  • Reporting Scalar markets
  • Scalar Redemptions

Splitting to Deeper Positions


Now we will return to split position in order to create a stake in these deeper positions.

Splitting

You can call balaceOfBatch() to get the balance of each of the positionIds you have derived thus far.

Let's split your position in (A) into positions in (A) & (hi) and (A) & (lo).

We'll call the splitPosition() function, with use the address of one of your ToyTokens as collateralToken, the collectionId of (A) as parentCollectionId, the conditionId of the condition with outcome slots (hi) & (lo), the index sets for (hi) and (low) for the partition ([1,2]), and finally the amount that you want to split.

Call balanceOfBatch() again to see how your balances have changed.


Now that we have learned how to derive position IDs and split positions, the next sections will focus on recombining positions for their collateral.

← Combining Outcome CollectionsMerging Positions →
Gnosis Ltd.
ImprintCopyright
© 2020 Gnosis LTD
Privacy Policy
Copyright © 2025 Gnosis LTD