# dutchauction
> ⚠️ **Experimental — generated with no human supervision.** This realm was
> produced automatically by an MCP-driven agent to exercise the gno MCP server
> and tooling, and to generate test content for gno compilers, linters and
> formatters. **Not audited. Not for production.** Full context & folder README:
> [r/moul/x/daily](https://github.com/moul/gno-contracts/blob/main/r/moul/x/daily/README.md)
---
A Gno port of the classic Solidity Dutch-auction pattern: list an item at a
high starting price that decays linearly, block by block, down to a floor.
The first buyer to call `Buy` gets it at whatever the price is at that exact
block — no bidding war, just a clock ticking against the seller. Payment is
real `ugnot`, escrowed by the chain with the transaction; overpayment is
refunded automatically and the settled price is forwarded straight to the
seller.
Realm path: `gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/dutchauction`
## Example calls
```
# list an item: 1000 ugnot down to a 100 ugnot floor over 100 blocks
List(cur, "vintage synth", 1000, 100, 100) -> "1"
# anyone can check the live price without paying anything
CurrentPrice("1") -> 1000, decaying toward 100 as blocks pass
# buy at the current price, sending >= CurrentPrice("1") ugnot with the tx;
# any excess is refunded in the same call
Buy(cur, "1") -> price actually paid
# the seller can pull a listing before anyone buys it
Cancel(cur, "1")
```
`Render("")` lists every auction with its live price, floor, start price,
and status.
## Toolchain status
`gno test .` passes (7/7) against `gnolang/gno` master (`master.3130+bf5b31eda`)
with `GNOROOT` pointed at a full checkout — the local `gno` on `PATH` ships
without a bundled stdlib tree, so `GNOROOT` had to be set explicitly to
resolve `chain`, `chain/banker`, `chain/runtime`, and
`gno.land/p/nt/avl/v0`/`testutils/v0`. `gno lint .` is clean. Target chain is
sapphire (gno 0.9); code sticks to the documented `chain/*` stdlib family and
crossing-function (`cur realm`) convention used by the other realms in this
batch.
<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->
---
Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
**Dependency graph:**

> 🧪 **Highly experimental — potentially vibe-coded.** Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: [DISCLAIMER](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).
<!-- END GNOCONTRACTS FOOTER -->
AuctionInfo(id string) (item string, seller string, status string, currentPrice int64, floorPrice int64, startPrice int64)
Buy(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, id string) int64
Cancel(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, id string)
CurrentPrice(id string) int64
List(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, item string, startPrice int64, floorPrice int64, durationBlocks int64) string
Render(path string) string
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.