> For the complete documentation index, see [llms.txt](https://snowball-mns.gitbook.io/snowball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://snowball-mns.gitbook.io/snowball/decentralized-identity-layer/technical-documentation/smart-contracts/salecontroller.md).

# SaleController

### **Purpose**:&#x20;

Manages marketplace logic for buying/selling identities.

### **Key Methods**:

* `list()`: Lists an identity for sale.
* `buy()`: Purchases a listed identity.
* `update()`: Modifies sale parameters.
* `cancel()`: Cancels an active sale.

### **Events**:

* `NameListed(name, node, price)`
* `NameSoldOut(name, node, buyer)`

### **Data Structures**:

* `struct Sale { id, start, end, price }`

### **Interactions**:

* Validates ownership via `SnowRegistry`.
