Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ In the final response to the user for docs-changing tasks, summarize the text-re
- If a deployment workflow ever requires committing generated artifacts, update this policy in the same PR and add a freshness check that regenerates the artifacts and fails on a dirty tracked diff.
- The generated artifact freshness rule in Validation Selection is the source of truth for when to run artifact freshness checks.

# Protocol ABI Policy

- The protocol is not live yet. Do not preserve legacy contract ABIs, storage accessors, events, function names, or compatibility shims solely for backwards compatibility with previous development deployments. Prefer clean contract interfaces and redeploy contracts when Solidity changes require ABI changes. Only keep compatibility surface area when a current source consumer, test, deployment script, or documented launch requirement needs it.

# Code Style Guidelines

- **Immutable imported contracts**: Do not modify `solidity/contracts/peripherals/openOracle/OpenOracle.sol`, `solidity/contracts/peripherals/WETH9.sol`, or `solidity/contracts/peripherals/Multicall3.sol`. These contracts are treated as externally sourced/compatibility contracts; address warnings or integration issues in tooling, wrappers, tests, or documented exceptions instead.
Expand Down
19 changes: 13 additions & 6 deletions docs/auction-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,25 @@ enough to find a clearing tick. Only ticks below that found clearing tick can be
withdrawn through the pre-finalization refund path; binding or potentially
winning bids stay in the auction.

In the underfunded branch, finalization computes `underfundedThreshold` from
aggregate accepted bid ETH, and only ticks whose `tickToPrice` is at or above
that threshold win.

After finalization, paged settlement handles both claim and refund cases:

- losing bids receive ETH refunds
- winning bids convert ETH into purchased REP at the uniform clearing price
- normal-clearing winning bids convert ETH into purchased REP at the uniform
clearing price
- marginal clearing-tick bids may be partially filled and partially refunded
- underfunded winning bids receive REP pro rata by ETH contribution
- underfunded ticks whose `tickToPrice` is at or above
`underfundedThreshold` receive only the REP demanded at each tick's bid limit
price, and same-tick bids share that tick's REP demand pro rata by ETH

Zero-effective-price ticks are rejected when bids are submitted, so underfunded
settlement cannot assign REP to bids whose rounded ETH/REP price is zero.
Both finalized allocation paths carry division dust across paged withdrawals:
normal clearing carries `clearingRemainder` through the uniform-price
ETH-to-REP division, and underfunded clearing carries `underfundedRemainder`
through the pro-rata winning-ETH division. Later withdrawals may receive the
remainder carried from earlier integer division so bid-level withdrawals
reconcile to the aggregate finalized REP.
ETH-to-REP division, and underfunded clearing carries a per-tick remainder
through the same-tick ETH-to-REP allocation. Later withdrawals at the same tick
may receive the remainder carried from earlier integer division so bid-level
withdrawals reconcile to the aggregate finalized REP demanded at that tick.
16 changes: 8 additions & 8 deletions docs/mainnet-deployment-addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"id": "deploymentStatusOracle",
"label": "Deployment Status Oracle",
"address": "0x6a113C80D973D59b059809D94A0f9e099B7Fe9D3"
"address": "0x50e0A81b17d68c2C904c8643024368ef93574A55"
},
{
"id": "multicall3",
Expand All @@ -23,7 +23,7 @@
{
"id": "uniformPriceDualCapBatchAuctionFactory",
"label": "UniformPriceDualCapBatchAuctionFactory",
"address": "0x71761Fa073a1b5FA49154637Cf61b85172E8cA15"
"address": "0x5E4c12371fd630C7c83c7fB756135BeEbf9E1F24"
},
{
"id": "scalarOutcomes",
Expand Down Expand Up @@ -53,34 +53,34 @@
{
"id": "shareTokenFactory",
"label": "ShareTokenFactory",
"address": "0xF965Ae5776a65F48f22eF1ef3e92Ddb3aB72b13E"
"address": "0x0ed8986e0fA90e41CC228D756af65e8650Bf3385"
},
{
"id": "priceOracleManagerAndOperatorQueuerFactory",
"label": "Price Oracle Manager Factory",
"address": "0x09Dc79b3d5FFd48960B37D6037A24ADa7394113f"
"address": "0x195E1F0f7B609051136B2032cf06599ee2a37C38"
},
{
"id": "securityPoolForker",
"label": "Security Pool Forker",
"address": "0x62e4E6Ee0d6615Cd4727D9a297cd4380930e2934"
"address": "0x0F4a1a36479e82fF700fb245ADbA6eF6E3fAC005"
},
{
"id": "escalationGameFactory",
"label": "Escalation Game Factory",
"address": "0x8D3a9588EB7ab1515ddc334E4570d80165f33717"
"address": "0x4aD8a16554df40FD08341471b9972E5C34F3ee73"
},
{
"id": "securityPoolFactory",
"label": "Security Pool Factory",
"address": "0xB95B8D998C1eb3e366afDa6562eEB10B04aD8E47"
"address": "0xd15d68DABac17568e2ffe505a40dA90646DB1Fd2"
}
],
"derivedContracts": [
{
"id": "escalationGameProofVerifier",
"label": "Escalation Game Proof Verifier",
"address": "0x06FbE3754D955AD6A5E7457891196E9f0ac3D9BE"
"address": "0xD98f29750D7b436D975327545F4aEc25D6EdaC20"
}
]
}
16 changes: 8 additions & 8 deletions docs/mainnet-deployment-addresses.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ These values are derived from the frozen mainnet protocol config, current contra
| ID | Label | Expected Address |
| --- | --- | --- |
| proxyDeployer | Proxy Deployer | `0x7A0D94F55792C434d74a40883C6ed8545E406D12` |
| deploymentStatusOracle | Deployment Status Oracle | `0x6a113C80D973D59b059809D94A0f9e099B7Fe9D3` |
| deploymentStatusOracle | Deployment Status Oracle | `0x50e0A81b17d68c2C904c8643024368ef93574A55` |
| multicall3 | Multicall3 | `0x77609e84c39893D5fB99049FE0F461aEB4F4Ec79` |
| uniformPriceDualCapBatchAuctionFactory | UniformPriceDualCapBatchAuctionFactory | `0x71761Fa073a1b5FA49154637Cf61b85172E8cA15` |
| uniformPriceDualCapBatchAuctionFactory | UniformPriceDualCapBatchAuctionFactory | `0x5E4c12371fd630C7c83c7fB756135BeEbf9E1F24` |
| scalarOutcomes | ScalarOutcomes | `0x375993210Bd295D329CaB7EeD4CEE17C73493af5` |
| securityPoolUtils | SecurityPoolUtils | `0x04349f6A0302F32f8c87bb8555648AD77634343C` |
| openOracle | OpenOracle | `0x51DED022c087758c187ce636aa5f6adE6B919abB` |
| zoltarQuestionData | ZoltarQuestionData | `0x3fDE26F6C206DDc4991087FCeB5f13EC9f6F3E94` |
| zoltar | Zoltar | `0x5FaE7E52e81250Fad0fCF05db42eCCCB3B0Bed95` |
| shareTokenFactory | ShareTokenFactory | `0xF965Ae5776a65F48f22eF1ef3e92Ddb3aB72b13E` |
| priceOracleManagerAndOperatorQueuerFactory | Price Oracle Manager Factory | `0x09Dc79b3d5FFd48960B37D6037A24ADa7394113f` |
| securityPoolForker | Security Pool Forker | `0x62e4E6Ee0d6615Cd4727D9a297cd4380930e2934` |
| escalationGameFactory | Escalation Game Factory | `0x8D3a9588EB7ab1515ddc334E4570d80165f33717` |
| securityPoolFactory | Security Pool Factory | `0xB95B8D998C1eb3e366afDa6562eEB10B04aD8E47` |
| shareTokenFactory | ShareTokenFactory | `0x0ed8986e0fA90e41CC228D756af65e8650Bf3385` |
| priceOracleManagerAndOperatorQueuerFactory | Price Oracle Manager Factory | `0x195E1F0f7B609051136B2032cf06599ee2a37C38` |
| securityPoolForker | Security Pool Forker | `0x0F4a1a36479e82fF700fb245ADbA6eF6E3fAC005` |
| escalationGameFactory | Escalation Game Factory | `0x4aD8a16554df40FD08341471b9972E5C34F3ee73` |
| securityPoolFactory | Security Pool Factory | `0xd15d68DABac17568e2ffe505a40dA90646DB1Fd2` |

## Derived Side-Effect Contracts

These contracts are deployed by one of the deterministic deployment steps and are not separate user-triggered deployment steps.

| ID | Label | Expected Address |
| --- | --- | --- |
| escalationGameProofVerifier | Escalation Game Proof Verifier | `0x06FbE3754D955AD6A5E7457891196E9f0ac3D9BE` |
| escalationGameProofVerifier | Escalation Game Proof Verifier | `0xD98f29750D7b436D975327545F4aEc25D6EdaC20` |

Security pool deployments are deterministic per pool input rather than globally fixed. Their addresses are derived from the deployed factory set plus parent universe, universe ID, question ID, and security multiplier.
Loading
Loading