Skip to content

Elysium testnet. Tokens have no value.

DanakeDanake
Build

Contracts

Danake is six small, immutable contracts with no owner and no admin powers over user funds; addresses below come from the deployment file.

Addresses#

ContractAddress on Elysium testnet (chain 99801)Role
FareMarket0x731B1AbA9cE9b9B207f6860cDB60890f1b6b5871All Fares, crossings, settlement and claims
FeeVault0x05b5aA7B41E7829FFD01093A075D8E65CE251023Holds the 3% fee; no owner, no withdrawal
CurveDeathOracle0x29Db91342640A2719f99b703C5bD37A290143FDFDecides whether a demo token is dead
DemoCurveFactory0x6CBb5DF44872B633C78961c868844cE4fE03cf9BDemo launchpad (testnet only)
LiveToken ($LIVE)0x075061931f251D148Bb78E0ACce045a9e3DAa309Demo payout token with a daily faucet
WHYPE0xCD57F65c2B0e5881CFC2E609F7CD53b746E1F234Canonical wrapped HYPE

The table is generated from packages/config/deployments/99801.json, written by pnpm deploy:testnet. The source is in packages/contracts/src, built with Solidity 0.8.28 and OpenZeppelin Contracts 5. ABIs are exported to packages/config/src/abis.ts.

FareMarket#

One contract holds every Fare. Main functions:

FunctionWhoWhat
openFare(params, rollRoot)PayerOpens a Fare on a dead token, pulls the budget (or wraps the HYPE sent), sends 3% to the fee vault.
cancel(fareId)PayerDuring Pending: the whole budget returns to the payer, fee included.
cross(fareId, amount, bag, lossWei, proof)HolderBurns amount of the dead token and records the counted loss.
settle(fareId)AnyoneAfter the window: fixes the rate and the surplus.
claim(fareId)HolderClaims what has vested; applies the Stay check.
enforceStay(fareId, wallet)AnyoneForfeits a stream whose Stay clause is broken.
withdrawSurplus(fareId)PayerWithdraws surplus and forfeited streams.

Views: getFare, statusOf, crossingOf, entitlementOf, claimable, stayBroken, previewRate, fareCount, totalCrossings, totalWallets, hasCrossed, lossUsedAt.

Events#

EventSignature
ClaimedClaimed(uint256 indexed fareId, address indexed wallet, uint256 amount)
CrossedCrossed(uint256 indexed fareId, address indexed wallet, uint256 burned, uint256 lossWei, uint256 countedLoss)
FareCancelledFareCancelled(uint256 indexed fareId, uint256 returned)
FareOpenedFareOpened(uint256 indexed fareId, address indexed payer, address indexed target, address payoutToken, uint256 budget, bytes32 rollRoot)
FareSettledFareSettled(uint256 indexed fareId, uint256 rate, uint256 allocated, uint256 surplus)
StayBrokenStayBroken(uint256 indexed fareId, address indexed wallet, uint256 forfeited)
SurplusWithdrawnSurplusWithdrawn(uint256 indexed fareId, address indexed payer, uint256 amount)

Custom errors#

ErrorSignature
AlreadyCrossedAlreadyCrossed()
AmountAboveBagAmountAboveBag()
InvalidDurationsInvalidDurations()
InvalidProofInvalidProof()
LossAlreadyUsedLossAlreadyUsed(uint64 usedAt)
NoStayClauseNoStayClause()
NotCrossedNotCrossed()
NotPayerNotPayer()
NothingToClaimNothingToClaim()
NothingToWithdrawNothingToWithdraw()
ReentrancyGuardReentrantCallReentrancyGuardReentrantCall()
SafeERC20FailedOperationSafeERC20FailedOperation(address token)
SameTokenSameToken()
SnapshotNotPastSnapshotNotPast()
StayHeldStayHeld()
StreamForfeitedStreamForfeited()
TargetNotDeadTargetNotDead()
UnknownFareUnknownFare()
UnsupportedTokenUnsupportedToken()
VestingOutOfRangeVestingOutOfRange(uint64 min, uint64 max)
WindowOutOfRangeWindowOutOfRange(uint64 min, uint64 max)
WrongStatusWrongStatus(uint8 status)
WrongValueWrongValue()
ZeroAddressZeroAddress()
ZeroAmountZeroAmount()
ZeroBudgetZeroBudget()
ZeroCapZeroCap()
ZeroLossZeroLoss()
ZeroRateZeroRate()
ZeroRootZeroRoot()

WrongStatus(status) carries the Fare's status as a number: 0 Pending, 1 Open, 2 Ended, 3 Settled, 4 Closed, 5 Cancelled.

FeeVault#

Deployed by FareMarket in its constructor; the market is its only caller. It records fees per token and exposes totalFees, held and tokens for the UI. It has no owner and no withdrawal function. Its only outflow returns the fee to the payer of a Fare cancelled during Pending.

CurveDeathOracle#

Implements IDeathOracle.isDead(token) for tokens of the demo launchpad, plus deadAt(token) for countdowns. See Dead-token rules.

FunctionSignature
DEAD_AFTERDEAD_AFTER() view
deadAtdeadAt(address token) view
factoryfactory() view
isDeadisDead(address token) view

Demo launchpad (testnet only)#

DemoCurveFactory.create(name, symbol) deploys a DemoToken (fixed supply of 1,000,000,000, burnable, all minted to its curve) and its DemoCurve, a constant-product bonding curve with a virtual HYPE reserve. Anyone can call it. Names or symbols containing "danake" are refused.

Curve events#

EventSignature
RugRug(address indexed creator, uint256 hypeRemoved, uint256 hypeReserveAfter, uint256 tokenReserveAfter, uint256 virtualHypeAfter, uint256 timestamp)
TradeTrade(address indexed trader, bool isBuy, uint256 hypeAmount, uint256 tokenAmount, uint256 hypeReserveAfter, uint256 tokenReserveAfter, uint256 timestamp)
EventSignature
CurveCreatedCurveCreated(address indexed creator, address indexed token, address indexed curve, string name, string symbol, uint256 virtualHype, uint256 tokenReserve, uint256 timestamp)

Curve errors#

ErrorSignature
AlreadyRuggedAlreadyRugged()
NotCreatorNotCreator()
ReentrancyGuardReentrantCallReentrancyGuardReentrantCall()
SafeERC20FailedOperationSafeERC20FailedOperation(address token)
SlippageExceededSlippageExceeded(uint256 out, uint256 minOut)
TransferFailedTransferFailed()
ZeroAmountZeroAmount()

rug() is demo-only and marked so in code and in the app.

LiveToken ($LIVE, "Demo Live Token") gives 1,000,000 tokens per wallet once a day through mint(). It is a payer budget for testing and has no value.

Immutability and no admin powers#

  • No proxies. The code at each address cannot change.
  • No owner, no pause, no upgrade, no fee switch. Nobody can move funds held by FareMarket except through the rules above: holders claim their streams, payers withdraw their surplus or cancel during Pending.
  • Every duration (window range, dispute period, vesting range, DEAD_AFTER) is a constructor parameter, fixed at deployment.
  • FEE_BPS is a constant: 300, or 3%.
  • The only privileged action anywhere is the demo rug(), limited to the creator of a demo token, once, on testnet.

The contracts have not been audited. See Risks and limitations.