Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Polymarket/uma-ctf-adapter/llms.txt
Use this file to discover all available pages before exploring further.
Overview
PayoutHelperLib provides validation utilities for payout arrays in the UMA CTF Adapter. It ensures that payout structures conform to the expected binary outcome format.
Source: src/libraries/PayoutHelperLib.sol
Functions
isValidPayoutArray
payouts(uint256[]): The payout array to validate
- (bool):
trueif the payout array is valid,falseotherwise
- Have exactly 2 elements - Binary outcomes require exactly two payout values
- Match one of the following patterns:
[1, 0]- Full payout to the first outcome[0, 1]- Full payout to the second outcome[1, 1]- Equal payout to both outcomes (tie/indeterminate)
[0, 0]- No payout to either outcome (invalid)- Arrays with length != 2
- Any values other than 0 or 1
Usage Example
Binary Outcome Context
This library is designed specifically for binary prediction markets where:- Each market has two possible outcomes
- Payouts are represented as normalized values (0 or 1)
- A payout of
[1, 0]means the first outcome wins - A payout of
[0, 1]means the second outcome wins - A payout of
[1, 1]represents an indeterminate result or tie