---
library: "bootstrap"
slug: "OsmoticFilter"
name: "OsmoticFilter"
ref: "OsmoticFilter#b968"
hash: "sema:OsmoticFilter#mh:SHA-256:b968c9f47a45740f884f6963dc171b91877c02cc61536e6d6279d97a06312122"
type: "Protocols"
layer: "Society"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/OsmoticFilter"
---

# OsmoticFilter

Spam prevention via pressure thresholds

Society · Protocols

## Mechanism

Agents operate inside a semi-permeable membrane. Inbound messages are rejected unless they carry sufficient 'pressure' (stake, reputation, or relevance score) to overcome the membrane's current tension. The filter supports Multi-Solvent extraction, allowing different types of pressure (Money vs Trust) to be converted at defined rates per the [Criteria](https://semahash.org/vocabularies/bootstrap/patterns/Criteria.md) criteria. It uses [Hysteresis](https://semahash.org/vocabularies/bootstrap/patterns/Hysteresis.md) to prevent oscillation and [Canary](https://semahash.org/vocabularies/bootstrap/patterns/Canary.md) messages to test permeability.

## Invariants

- Normalized Pressure: Sum(Weighted_Solvents) > Membrane.tension
- Permeability: If Queue < Capacity, tension must approach zero (membrane relaxes)
- Snapback: If Queue drops rapidly, tension must reset instantly (anti-hysteresis)

## Parameters

- decay_rate: type=Float, range=[0.1, 0.9], description=Linear relaxation
- snapback_threshold: type=Float, range=[0.0, 0.2], description=Queue depth % triggering instant reset

## Failure modes

- Starvation of low-stake but high-importance messages (mitigated by Whitelist).

## Where this came from

—

## Builds on

- [Canary](https://semahash.org/vocabularies/bootstrap/patterns/Canary.md) (references)
- [Hysteresis](https://semahash.org/vocabularies/bootstrap/patterns/Hysteresis.md) (references)
- [Criteria](https://semahash.org/vocabularies/bootstrap/patterns/Criteria.md) (accepts)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: OsmoticFilter#b968
- Hash: sema:OsmoticFilter#mh:SHA-256:b968c9f47a45740f884f6963dc171b91877c02cc61536e6d6279d97a06312122

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/OsmoticFilter
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/OsmoticFilter.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
