Skip to main content
The UMA CTF Adapter has been deployed to multiple networks. All deployments have been audited by OpenZeppelin.

Latest Version (v3.1.0)

Released on August 25, 2023
Mumbai testnet is deprecated. Use Amoy for testing new integrations.

Deployment Details

Network Information

NetworkChain IDDeployment AddressBlock Explorer
Polygon1370x157Ce2d672854c848c9b79C49a8Cc6cc89176a49Polygonscan
Mumbai800010x157Ce2d672854c848c9b79C49a8Cc6cc89176a49Mumbai Polygonscan
Amoy800020x2F6f8DA6A21023E62399801945eed1b1975A4e12Amoy Polygonscan

Security Audit

OpenZeppelin Security Audit

The UMA CTF Adapter has been audited by OpenZeppelin. The full audit report is available in the repository.
All findings from the audit have been addressed in version 3.1.0:
  • High severity issues (H01)
  • Medium severity issues (M01, M02, M03)
  • Low severity issues (L01, L02, L03)
  • Informational issues (N01-N05)

Release History

Major Updates:
  • Security fixes addressing all OpenZeppelin audit findings
  • Added support for Amoy testnet
  • Improved external interface pragma handling
  • Various code quality improvements
Deployments:
  • Polygon: 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49
  • Mumbai: 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49
  • Amoy: 0x2F6f8DA6A21023E62399801945eed1b1975A4e12
View Release
Major Updates:
  • Breaking changes to contract interface
  • Enhanced market reset functionality
  • Improved dispute handling
View Release
Major Updates:
  • Major architectural improvements
  • Gas optimizations
View Release
Bug Fixes:
  • Minor bug fixes and improvements
View Release
Initial Release:
  • First production deployment
  • Core functionality for UMA-based market resolution
View Release

Verify Deployment

You can verify the deployed contract matches the source code:

Using Cast

# Get deployed bytecode
cast code 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49 --rpc-url https://polygon-rpc.com

# Check contract interfaces
cast interface 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49 --rpc-url https://polygon-rpc.com

Read Contract State

# Check immutable variables
cast call 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49 "ctf()" --rpc-url https://polygon-rpc.com
cast call 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49 "optimisticOracle()" --rpc-url https://polygon-rpc.com
cast call 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49 "collateralWhitelist()" --rpc-url https://polygon-rpc.com

Check Constants

# Query contract constants
cast call 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49 "SAFETY_PERIOD()" --rpc-url https://polygon-rpc.com
cast call 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49 "YES_OR_NO_IDENTIFIER()" --rpc-url https://polygon-rpc.com
cast call 0x157Ce2d672854c848c9b79C49a8Cc6cc89176a49 "MAX_ANCILLARY_DATA()" --rpc-url https://polygon-rpc.com

Deploy Your Own

To deploy the adapter to your own network or fork:
1

Configure Environment

Create a .env file with your deployment parameters:
PK=your_private_key
ADMIN=your_admin_address
CTF=conditional_tokens_address
FINDER=uma_finder_address
OPTIMISTIC_ORACLE=uma_oo_address
RPC_URL=your_rpc_url
2

Run Deployment Script

Execute the deployment script:
cd deploy/scripts
./deploy_adapter.sh
3

Verify Contract

Verify the contract on the block explorer:
forge verify-contract \
  --chain-id YOUR_CHAIN_ID \
  --compiler-version v0.8.15+commit.e14f2714 \
  --optimizer-runs 1000000 \
  YOUR_DEPLOYED_ADDRESS \
  src/UmaCtfAdapter.sol:UmaCtfAdapter \
  --constructor-args $(cast abi-encode "constructor(address,address,address)" $CTF $FINDER $OPTIMISTIC_ORACLE) \
  --etherscan-api-key $ETHERSCAN_API_KEY
4

Configure Admin

The deployment script automatically configures the admin address specified in your .env file.
Make sure you have the correct UMA contract addresses for your target network. See the Configuration page for details.

Integration Testing

Before integrating with production deployments, test your integration on Amoy testnet:
  1. Get Test Tokens: Use a Polygon faucet to get test MATIC
  2. Deploy Test Market: Initialize a test question using the Amoy deployment
  3. Test Resolution Flow: Propose and resolve your test market
  4. Verify Results: Ensure payouts are distributed correctly
The Amoy testnet deployment (0x2F6f8DA6A21023E62399801945eed1b1975A4e12) is ideal for integration testing before going to production.

Next Steps

Initialize Markets

Learn how to initialize prediction markets

Resolve Markets

Understand the market resolution process

Build docs developers (and LLMs) love