Shaft
Payout—:—:—
Docs

Contracts

Chain

GodlRun runs on Robinhood Chain, chain ID 4663.

Deployed addresses

Deployment

ContractAddress
FeeDistributor[TBD]
$TOKEN[TBD]

This section will be updated with real addresses once a production launch occurs. Anything claiming to be the production GodlRun contract that is not listed here should be treated as unverified.

User-facing contract surface

GodlRun's FeeDistributor contract exposes a small set of functions that any user or integrator needs. This document only covers that user-facing surface. The contract also has a set of owner-restricted administrative functions used for protocol configuration and maintenance, which are out of scope for this page; see security.md for how that privileged access is bounded and what it can and cannot touch.

claimSlot()

Claims the slot at the current live price, displacing whoever holds it (if anyone).

  • Payable. Send at least the value returned by currentPrice() as msg.value. Sending more is safe: any excess above the required price is refunded automatically in the same transaction.
  • Requires prior approval. The caller must have approved the contract to pull at least currentDeposit() of $TOKEN beforehand (a standard ERC-20 approve call).
  • Reverts if:
    • msg.value is below the current required price.
    • The current holder's post-claim immunity period has not yet ended.
    • The token deposit transfer fails (for example, insufficient allowance or balance).
  • Emits: SlotClaimed(buyer, previousBeneficiary, pricePaid, depositPaid, timestamp).
  • Also triggers HolderSettled and, on a genuine in-window flip, BuyerRebateCredited, see below.

claim()

Withdraws all of the caller's accumulated ETH, WETH, and $TOKEN balances in one transaction. This is the only way funds ever leave the contract into a user's wallet: claiming is always pulled by the user, never pushed by the contract.

  • Reverts if: the caller has nothing owed in any of the three legs.
  • Emits: Claimed(user, ethAmount, wethAmount, tokenAmount).

poke()

A permissionless heartbeat. Anyone (a user, an integrator, or an automated keeper) can call this at any time to pull any newly accrued LP fees out of the fee source and credit them to whoever is currently active. If nobody holds the slot, or the current holder's window has already expired, the accrued fees are credited to the protocol balance instead.

  • Never reverts due to "nothing to collect": that case is handled gracefully and the call simply does nothing observable.
  • Does not touch slot ownership, price, or deposit state in any way.
  • Emits: FeesCollected(creditedTo, creditedToBeneficiary, wethAmount, tokenAmount) when there is something to credit.

View functions

currentPrice() → uint256

Returns the live ETH price (in wei) required to call claimSlot() right now. This is always the up-to-the-second value: escalated if the slot is actively held and within its window, or decayed if the window has expired, or the floor price if the slot has never been claimed.

currentDeposit() → uint256

Returns the live $TOKEN deposit (in base units) required to call claimSlot() right now, computed on the identical schedule as currentPrice().

windowEndsAt() → uint256

Returns the unix timestamp at which the current holder's active window ends. Returns 0 if the slot has never been claimed.

immunityEndsAt() → uint256

Returns the unix timestamp at which the current holder's post-claim immunity period ends (no flip is possible before this). Returns 0 if the slot has never been claimed.

claimableFor(address user) → (uint256 ethAmount, uint256 wethAmount, uint256 tokenAmount)

Returns the amounts already credited to user and immediately withdrawable via claim().

pendingFor(address user) → (uint256 ethAmount, uint256 wethAmount, uint256 tokenAmount)

Returns everything claimableFor would return, plus, if user is the current holder and their window is still active, a forward-looking estimate of the ETH refund they would receive if displaced right this moment. This estimate exists purely for UI display; it disappears once the window expires, since an expired holder's refund is always zero (see overview.md for why).

Events users can index

EventFired when
SlotClaimed(buyer, previousBeneficiary, pricePaid, depositPaid, timestamp)Every successful claimSlot() call
HolderSettled(previousBeneficiary, ethRefunded, tokenAbsorbed, inWindowFlip)Every time an outgoing holder is settled, on both flip and expiry-takeover paths. inWindowFlip tells you which path applied.
BuyerRebateCredited(buyer, previousBeneficiary, rebateAmount)Only on a genuine in-window flip that produces a nonzero rebate. Never fires on an expiry takeover
FeesCollected(creditedTo, creditedToBeneficiary, wethAmount, tokenAmount)Any time poke() (directly, or via the internal call inside claimSlot()) pulls a nonzero amount of newly accrued fees
Claimed(user, ethAmount, wethAmount, tokenAmount)Every successful claim() call

Verification

Deployed source for the test deployment can be checked against Blockscout's contract verification page for the addresses listed above once verification is complete. Always confirm you are reading the verified source tab, not an unverified bytecode-only view, before trusting any claim about contract behavior. Better yet, read this documentation set alongside the source directly.