当前位置: 玩币圈首页 > 行情分析 > 针对RChain创世区块诈骗代币的排除政策

针对RChain创世区块诈骗代币的排除政策

2020-02-05 RChain 来源:火星财经


Scam token exclusion policy for RChain genesis block

This document describes how the scam tokens and tainted addresses will be handled for the genesis ceremony. There is a simple recursive algorithm that tracks the taint and handles tokens mixed in with legitimate addresses without much burden on the whole community.

Suppose that Alice has t tokens at an address on an exchange, call it A. She is conned into accepting s tainted tokens, say for BTC or fiat, or something else of value. The total tokens at A are s+t. Now, let us say that after the address A is tainted with the scammer’s tokens, Alice sends x tokens to Bob and y tokens to Carrol, and this is the total list of transactions between when Alice received the tainted tokens and block 9371743. We know that x + y + balance(A) = s+t. Therefore,

1 = x/s+t + y/s+t + balance(A)/s+t

We use these fractions to calculate the taint in each of Bob’s address (B), Carrol’s address (C), and Alice’s remaining balance. Specifically,

x/(s+t) * s is the number of tainted tokens that have landed at B

y/(s+t) * s is the number of tainted tokens that have landed at C

(x + y)/s+t * s is number of tainted tokens remaining in A.

Example

Say, s = 10, t = 90, s+t = 100, x = 25, y = 25

25/100 * 10 = 2.5 tainted tokens Bob received

25/100 * 10 = 2.5 tainted tokens Carrol received

50/100 * 10 = 5 tainted tokens remaining in A

--------------------------------------------------------------

total 10 tainted tokens originally sent to Alice

Notice that once tainted tokens have landed at B the same procedure applies. If Bob sends tokens from B, then a percentage of each transaction originating from B after the address has been tainted will be considered tainted tokens and deducted accordingly from the addresses receiving tokens from B at the genesis ceremony.

Covering all tainted addresses

Now, we begin at the scammer’s original address and take the transitive closure of all the addresses involved in transactions that originate from the scammer address and we can calculate the tainted tokens at every address, including addresses where tainted tokens are mixed with legitimate tokens.

Let A be an address tainted by transaction T, with balance t(A) prior to receiving s(A) tainted tokens in transaction T. Let T1, …, Tn be transactions such that src(Ti) = A and Ti all occur after T and before blockheight. Without loss of generality, we assume there are no transactions, U, occurring after T and before blockheight such that trgt(U) = A. Let amt(Ti) represent the amount of tokens being transferred out of A.

taintedTokensTransmitted(Ti) = (amt(Ti)/s(src(T))+t(src(T))) * s(src(T))

Write T > S if T occurs after S. Write T < blockHeight if T occurs before blockHeight.

transitiveClosure(A,S,blockheight) =

{ T | src(T) = A or src(T) ∈ map(src, transitiveClosure(A,S)), blockheight > T > S }

adjustedBalance(Addr,A,S,blockheight) =

balance(Addr) - ∑_{T ∈ transitiveClosure(A,S,blockheight) | trgt(T) = Addr } taintedTokensTransmitted(T)

Genesis block adjustment

The genesis block balances will be adjusted from the snapshot taken at 9371743 according to these rules. The balances of the tainted RHOC will be returned to the Cooperative.

--------------------------------------------------------------------------------------------------

针对RChain创世区块诈骗代币的排除政策

本文档介绍了如何处理创世仪式上的诈骗代币和污染地址。有一个简单的递归算法,可以跟踪污染点并对那些与合法地址混合在一起的代币进行处理,并却不会给整个社区造成太大负担。

假设Alice在交易所的某个地址上有t个代币,将其称为A。她被诱使接受受污染的代币,我们称它为BTC、法币或其他有价值的东西。在A处的代币总数为s + t。现在,我们假设在地址A被诈骗者的代币污染之后,爱丽丝将x代币发送给Bob,将y代币发送给Carrol,这就是Alice收到污染代币与区块9371743之间的交易总数。我们知道 x + y + 余额(A)= s + t。 因此,

1 = x/s+t + y/s+t + 余额(A)/s+t

我们使用这些分数来计算Bob的地址(B),Carrol的地址(C)和Alice的剩余余额中的污染点。尤其是,

x/(s+t) * s是落在B上的污染代币的数量

y/(s+t) * s是落在C上的污染代币的数量

(x + y)/s+t * s是A中剩余的污染代币的数量。

举例

假设,s = 10, t = 90, s+t = 100, x = 25, y = 25

25/100 * 10 = 2.5 Bob收到的污染代币

25/100 * 10 = 2.5 Carrol收到的污染代币

50/100 * 10 = 5 A中剩余的污染代币

--------------------------------------------------------------

共计 原先发送给Alice的10个污染代币

请注意,一旦污染代币落在B处,相同的过程也同样适用。如果Bob从B处发送代币,则在地址被污染之后,源自B的每笔交易的特定百分比都将被视为污染代币,并在创世仪式上从接收B代币的地址中相应扣除。

涵盖所有污染地址

现在,我们从诈骗者的原始地址开始,对涉嫌诈骗者地址发起的交易中涉及的所有地址进行可传递性关闭,然后就可以计算每个地址处的污染代币,包括污染代币与合法代币混合的地址。

假设A是被交易T所污染的地址,在收到交易T中的s(A)污染代币之前的余额为t(A)。令T1,…,Tn为交易,这样一来src(Ti)= A和Ti都在T之后和区块高度之前发生。在不失一般性的前提下,我们假设在T之后和区块高度之前没有发生交易U,因此trgt(U)=A。令amt(Ti)表示从A转移出的代币数量。

转移的污染代币(Ti) = (amt(Ti)/s(src(T))+t(src(T))) * s(src(T))

如果T在S之后出现,则写T>S。如果T在区块高度之前出现,则写T < 区块高度。

可传递性关闭(A,S, 区块高度) =

{ T | src(T) = A or src(T) ∈ map(src, 可传递性关闭(A,S)), 区块高度 > T > S }

调整后余额(Addr,A,S, 区块高度) =

余额(Addr) - ∑_{T ∈ 可传递性关闭(A,S, 区块高度) | trgt(T) = Addr } 转移的污染代币(T)

创世区块调整

根据以上规则,从9371743处拍摄的快照中调整创世区块余额。污染RHOC的余额将退还给合作社。

—-

编译者/作者:RChain

玩币圈申明:玩币圈作为开放的资讯翻译/分享平台,所提供的所有资讯仅代表作者个人观点,与玩币圈平台立场无关,且不构成任何投资理财建议。文章版权归原作者所有。