# 3-out-of-5 Threshold Signature#

Lets say you want to create a ring spending contract, where either of us can make a transaction from the same address, but we do not want anyone else to know which one of us is spending the funds. That is not possible with Bitcoin, and while Ethereum can, it would be expensive and complicated – especially with a ring size of 10 or 20 members, required for robust privacy.

With Ergo, this kind of application can be created quickly, thanks to integrating Sigma protocols in the core that enables self-sovereign application-level privacy: trustless scripts that can be used to access mixers or other functionality without any third parties required.

val ringScript = s"""
{
atLeast(
3,
Coll(
PK("9f8ZQt1Sue6W5ACdMSPRzsHj3jjiZkbYy3CEtB4BisxEyk4RsNk"),
PK("9hFWPyhCJcw4KQyCGu4yAGfC1ieRAKyFg24FKjLJK2uDgA873uq"),
PK("9fdVP2jca1e5nCTT6q9ijZLssGj6v4juY8gEAxUhp7YTuSsLspS"),

The above is an example 3-out-of-5 threshold signature, which can be compiled to a P2S address.