Polymarket UMA Adapter

Polygon PoS Polymarket

0x2f5e3684cb1f318ec51b00edba38d79ac2c0aa9d

Solidity v0.8.15+commit.e14f2714

🤖
Query this contract from your AI
Reference: polymarket-uma-adapter-v3-polygon 0x2f5e3684cb1f318ec51b00edba38d79ac2c0aa9d
Sample prompt: "Tell me the current state of polymarket-uma-adapter-v3-polygon"
No AI wired up yet? → mcp.smarts.md

Admin & Risk

Who can change the rules?

Detected pausable controls from the verified ABI.

Polymarket contract governance
Ask your AI who can pause, upgrade, or change roles on this Polymarket contract.
Pausable

Architecture

Polymarket contract role

Polymarket UMA Adapter

polymarket-uma-adapter-v3-polygon

Connects Polymarket questions to UMA's optimistic oracle, including initialization, disputes, and final answers.

Question initialized Answer proposed Dispute window Question resolved CTF payout

Overview

Read Functions
17
Write Functions
13
Events
11

Read Functions

Block #87,442,580 · just now
EMERGENCY_SAFETY_PERIOD() view → 172,800

Return the contract's emergency safety period in seconds.✨ AI

Returns

Name Type Description
uint256 Duration of the emergency safety period, in seconds, used to limit actions during emergency scenarios.✨ AI
MAX_ANCILLARY_DATA() view → 8,139

Return the maximum allowed ancillary data size for UMA oracle requests.✨ AI

Returns

Name Type Description
uint256 Maximum allowed ancillary data length in bytes (uint256).✨ AI
YES_OR_NO_IDENTIFIER() view → 0x5945535f4f525f4e4f5f51554552590000000000000000000000000000000000

Returns the UMA identifier the adapter uses for yes/no (binary) questions.✨ AI

Returns

Name Type Description
bytes32 bytes32 UMA identifier used to represent the Yes/No (binary) outcome for oracle requests.✨ AI
admins(address) view

Get the stored admin value for the specified address.✨ AI

Parameters

Name Type Description
address

Returns

Name Type Description
uint256 Unsigned integer stored for that address in admins mapping representing admin state.✨ AI
collateralWhitelist() view → 0x1020ae36548ab28bc0c41fd2a08d24132c82cc55

Returns the address of the collateral whitelist used to validate allowed collateral.✨ AI

Returns

Name Type Description
address The address of the collateral whitelist contract used to verify allowed collateral tokens.✨ AI
ctf() view → 0x71523d0f655b41e805cec45b17163f528b59b820

Returns the address of the CTF contract used for final payout and claim processing.✨ AI

Returns

Name Type Description
address The address of the CTF contract that receives payouts and handles claims.✨ AI
getExpectedPayouts(questionID: bytes32) view

Retrieves the expected payout array of the question

Parameters

Name Type Description
questionID bytes32 - The unique questionID of the question

Returns

Name Type Description
uint256[]
getLatestUpdate(questionID: bytes32, owner: address) view

Gets the latest update for a questionID and owner

Parameters

Name Type Description
questionID bytes32 - The unique questionID
owner address - The address of the question initializer

Returns

Name Type Description
tuple
getQuestion(questionID: bytes32) view

Gets the QuestionData for the given questionID

Parameters

Name Type Description
questionID bytes32 - The unique questionID

Returns

Name Type Description
tuple
getUpdates(questionID: bytes32, owner: address) view

Gets all updates for a questionID and owner

Parameters

Name Type Description
questionID bytes32 - The unique questionID
owner address - The address of the question initializer

Returns

Name Type Description
tuple[]
isAdmin(addr: address) view

Checks if an address is an admin

Parameters

Name Type Description
addr address - The address to be checked

Returns

Name Type Description
bool
isFlagged(questionID: bytes32) view

Checks if a question has been flagged for emergency resolution

Parameters

Name Type Description
questionID bytes32 - The unique questionID

Returns

Name Type Description
bool
isInitialized(questionID: bytes32) view

Checks if a question is initialized

Parameters

Name Type Description
questionID bytes32 - The unique questionID

Returns

Name Type Description
bool
optimisticOracle() view → 0xee3afe347d5c74317041e2618c49534daf887c24

Returns the address of the UMA optimistic oracle used by this adapter.✨ AI

Returns

Name Type Description
address Address of the UMA optimistic oracle contract used for proposals, disputes, and final answers.✨ AI
questions(bytes32) view

Return metadata and current status for a Polymarket UMA question identified by a bytes32 id.✨ AI

Parameters

Name Type Description
bytes32

Returns

Name Type Description
requestTimestamp uint256 requestTimestamp: uint256 - timestamp when the UMA request for this question was created✨ AI
reward uint256 reward: uint256 - amount offered as reward for providing the answer✨ AI
proposalBond uint256 proposalBond: uint256 - bond required to propose an answer to the UMA oracle✨ AI
liveness uint256 liveness: uint256 - dispute liveness period in seconds for proposed answers✨ AI
emergencyResolutionTimestamp uint256 emergencyResolutionTimestamp: uint256 - timestamp after which emergency resolution is allowed✨ AI
resolved bool resolved: bool - whether the question has a final resolved answer✨ AI
paused bool paused: bool - whether question actions are currently paused✨ AI
reset bool reset: bool - whether the question has been reset after a dispute✨ AI
refund bool refund: bool - whether the reward is eligible for refunding✨ AI
rewardToken address rewardToken: address - ERC20 token address used for the reward (zero address for ETH)✨ AI
creator address creator: address - address that created the question✨ AI
ancillaryData bytes ancillaryData: bytes - ancillary data submitted to the UMA optimistic oracle✨ AI
ready(questionID: bytes32) view

Checks whether a questionID is ready to be resolved

Parameters

Name Type Description
questionID bytes32 - The unique questionID

Returns

Name Type Description
bool
updates(bytes32, uint256) view

Fetch the latest UMA optimistic oracle update for a given Polymarket question.✨ AI

Parameters

Name Type Description
bytes32
uint256

Returns

Name Type Description
timestamp uint256 timestamp: Unix timestamp of the returned update.✨ AI
update bytes update: ABI-encoded update payload containing the answer and related metadata.✨ AI

Write Functions

addAdmin(admin: address) nonpayable

Adds an Admin

Parameters

Name Type Description
admin address - The address of the admin
emergencyResolve(questionID: bytes32, payouts: uint256[]) nonpayable

Allows an admin to resolve a CTF market in an emergency

Parameters

Name Type Description
questionID bytes32 - The unique questionID of the question
payouts uint256[] - Array of position payouts for the referenced question
flag(questionID: bytes32) nonpayable

Flags a market for emergency resolution

Parameters

Name Type Description
questionID bytes32 - The unique questionID of the question
initialize(ancillaryData: bytes, rewardToken: address, reward: uint256, proposalBond: uint256, liveness: uint256) nonpayable

Initializes a question Atomically adds the question to the Adapter, prepares it on the ConditionalTokens Framework and requests a price from the OO. If a reward is provided, the caller must have approved the Adapter as spender and have enough rewardToken to pay for the price request. Prepares the condition using the Adapter as the oracle and a fixed outcome slot count = 2.

Parameters

Name Type Description
ancillaryData bytes - Data used to resolve a question
rewardToken address - ERC20 token address used for payment of rewards and fees
reward uint256 - Reward offered to a successful OO proposer. Must be chosen carefully, to properly economically incentize OO proposers.
proposalBond uint256 - Bond required to be posted by OO proposers/disputers. If 0, the default OO bond is used. Must be chosen carefully, to properly economically incentize OO proposers and disputers. Questions expected to secure a large amount of value should consider a larger proposal bond.
liveness uint256 - OO liveness period in seconds. If 0, the default liveness period of 2 hours is used. Must be chosen carefully, depending on the value backed by the question. Questions expected to secure a large amount of value should consider a longer liveness period.

Returns

Name Type Description
questionID bytes32
pause(questionID: bytes32) nonpayable

Allows an admin to pause market resolution in an emergency

Parameters

Name Type Description
questionID bytes32 - The unique questionID of the question
postUpdate(questionID: bytes32, update: bytes) nonpayable

Post an update for the question Anyone can post an update for any questionID, but users should only consider updates posted by the question creator

Parameters

Name Type Description
questionID bytes32 - The unique questionID
update bytes - The update for the question
priceDisputed(bytes32, uint256, ancillaryData: bytes, uint256) nonpayable

Callback which is executed on dispute Resets the question and sends out a new price request to the OO

Parameters

Name Type Description
bytes32
uint256
ancillaryData bytes - Ancillary data of the request
uint256
removeAdmin(admin: address) nonpayable

Removes an admin

Parameters

Name Type Description
admin address - The address of the admin to be removed
renounceAdmin() nonpayable

Renounces Admin privileges from the caller

reset(questionID: bytes32) nonpayable

Allows an admin to reset a question, sending out a new price request to the OO. Failsafe to be used if the priceDisputed callback reverts during execution.

Parameters

Name Type Description
questionID bytes32 - The unique questionID
resolve(questionID: bytes32) nonpayable

Resolves a question Pulls price information from the OO and resolves the underlying CTF market. Reverts if price is not available on the OO Resets the question if the price returned by the OO is the Ignore price

Parameters

Name Type Description
questionID bytes32 - The unique questionID of the question
unflag(questionID: bytes32) nonpayable

Unflags a market for emergency resolution

Parameters

Name Type Description
questionID bytes32 - The unique questionID of the question
unpause(questionID: bytes32) nonpayable

Allows an admin to unpause market resolution in an emergency

Parameters

Name Type Description
questionID bytes32 - The unique questionID of the question

Events

AncillaryDataUpdated(questionID: bytes32, owner: address, update: bytes)

Emitted when an ancillary data update is posted

Name Type Indexed Description
questionID bytes32
owner address
update bytes
NewAdmin(admin: address, newAdminAddress: address)

Emitted when a new admin is added

Name Type Indexed Description
admin address
newAdminAddress address
QuestionEmergencyResolved(questionID: bytes32, payouts: uint256[])

Emitted when a question is emergency resolved

Name Type Indexed Description
questionID bytes32
payouts uint256[]
QuestionFlagged(questionID: bytes32)

Emitted when a question is flagged by an admin for emergency resolution

Polymarket context A UMA question was flagged for review, the on-chain signal Polymarket uses for disputed or abnormal resolution flow.

Name Type Indexed Description
questionID bytes32
QuestionInitialized(questionID: bytes32, requestTimestamp: uint256, creator: address, ancillaryData: bytes, rewardToken: address, reward: uint256, proposalBond: uint256)

Emitted when a questionID is initialized

Polymarket context A market question entered the UMA adapter resolution flow.

Name Type Indexed Description
questionID bytes32
requestTimestamp uint256
creator address
ancillaryData bytes
rewardToken address
reward uint256
proposalBond uint256
QuestionPaused(questionID: bytes32)

Emitted when a question is paused by an authorized user

Name Type Indexed Description
questionID bytes32
QuestionReset(questionID: bytes32)

Emitted when a question is reset

Name Type Indexed Description
questionID bytes32
QuestionResolved(questionID: bytes32, settledPrice: int256, payouts: uint256[])

Emitted when a question is resolved

Polymarket context The UMA adapter finalized an answer and can drive market settlement.

Name Type Indexed Description
questionID bytes32
settledPrice int256
payouts uint256[]
QuestionUnflagged(questionID: bytes32)

Emitted when a question is unflagged by an admin

Name Type Indexed Description
questionID bytes32
QuestionUnpaused(questionID: bytes32)

Emitted when a question is unpaused by an authorized user

Name Type Indexed Description
questionID bytes32
RemovedAdmin(admin: address, removedAdmin: address)

Emitted when an admin is removed

Name Type Indexed Description
admin address
removedAdmin address