译文/Translated:
智能合约通过去信任化的方式让权力和义务的绑定和推进更加容易,从而带来了经济效率。若想在合约中设定权力转移限制—费用、时间锁定、选票购买、不可分割性等–智能合约都能产生深远的影响。如果你想通过设定人为限制执行博弈结果,你必须先读一读这篇文章。
想象这么一个场景:你想制定代币智能合约,任何人转移代币的时候都需要支付2%的费用。实践上这就是一个无法执行的限制。任何人都可以设定新的智能合约接受你的代币存款(支付2%的费用)然后重新发行新的可转移的代币,收取更低的费用,甚至不收取任何费用。别人就会在执行无限次数的交易并最终支付2%的费用之后把代币从这个新合约中提取出去,大多数人会接受和无交易费用的代币,因为合约可以是不可变化的,且中间不涉及任何信任问题。这只是智能合约让市场更高效、避开高费用等人为限制的一个例子而已。
现在再假设你想创建一个代币,实现长期合约中锁定价值,但你的代币现在被质押在不同的锁定时间段里。实现时间锁定就像收取2%的转移费用一样简单,但是,利用其它智能合约绕过(该限制)也是一样简单的。
在时间锁定的例子中,我们可以建立一个新的账户,把代币锁定在质押合约中,然后分配新的、可交易的代币。这个可交易代币可以被视为零风险债券,需要在未来某个时间点做出支付。假设标定资产是有价值的,且有零风险债券的需求,那么我们没有办法阻止债券的标的价值被出售和/或放入另一个智能合约中。
EOS RAM市场也是有人为限制的资产,用户只能付费购买和销售RAM。RAM可以通过在一个交易中同时购买或出售进行转移,中间只会产生1%的转移费用。如果有人只想交易RAM的经济价值,保留RAM的实用价值,他就可以创建一个基础合约,发布无需费用就可以转移的RAM代币。这也就为建立免交易费的二级RAM市场创造了可能。
但有一个事情是不能绕过的,那就是标的资产的实用价值。RAM代币和真正的RAM不是一回事,因为你不能真的使用RAM代币储存任何东西,你必须首先把它转化成真正的RAM并支付1%的转移费用(通过同时购买/出售)。质押代币也是这样的情况:你可以对质押代币的交易价值进行交易,但是你不能轻易地映射质押代币的任何额外的实用价值,如投票权和CPU时间等(取决于其实用价值是怎么样的)。
比如说,假定质押代币提供了投票的功能。代表一个团体质押并重新发行代币的合约必须“作为团体投票”。假设每个质押账户只能投票给一个人,那么整个团体就需要组织一个元投票决定团体应该如何投票。对于团体中的少数成员,他们获得的功能就会减少,因为他们必须和大多数人共同投票。
如果质押代币系统让每个质押头寸把投票分配给很多选项,那么质押流量的代币就可以简单地映射元投票,标的质押代币的大多数功能就可以转移到质押流量的代币上。
但哪怕是限制每个质押头寸只能投一次,这还不是真正的限制。质押流量的代币合约管理任何数量的质押头寸、根据流量代币持有人的元投票不同,每个质押头寸有不同的投票,这样的事情也很平常。
虽然是老生常谈,但是我还是要说:这样的解决方案在实施之前必须从法律、法规、税收的角度进行慎重考虑。
防止通过智能合约管理
如果想避免有人绕过人为限制,那就需要防止账户被智能合约管理。我们可以通过要求受限合约的所有交互都必须由真实的密钥签署、每次交易只能有一个动作实现该目的。但因为要求某人持有和使用密钥,所以这么做重新引入了“信任”元素。
假设我们的代币需要2%的交易费用,某个时间里它屏蔽了其它智能合约发出的所有动作。这个信任模型就变成一个中心化的交易所,它重新发行了类稳定币的工具。这就有可能从根本上改变流程的合规性并阻碍了变通。
尽管这个做法可能可以预防人们绕过限制,但是使用安全的多方计算、硬件安全设施或者使用最低信任的限制,这些都足以实现避开人为限制的目标。而且,这个方法还会减少广义上智能合约平台上该合约的安全性和整体灵活性。
拥抱合约自由
与其抵制金融自由的市场需求,还不如一开始就拥抱它。我们不应该收取2%的费用,而应该通过免费消灭竞争。我们不应该阻止RAM转移,我们就应该让它可以自由转移。我们不应该强迫个人锁仓,而应该让质押头寸可替代、可交易。费用只有在规避摩擦高于费用支出或存在某些稀缺或不可复制的实用性(市场流量等)情况下才是可行的方案。
在基于EOSIO的很多公链上,系统代币能够提供了一定比例的CPU时间的功能。RAM代币持有者一定要把该代币赎回获得标的的CPU或RAM资源才能利用RAM;同理,CPU代币直接提供标的的CPU时间。
假设有个市场想让用户长期锁定CPU价值。它就会让人们质押现在的CPU换取未来更多的CPU时间。时间上,你就是把自己的CPU通过长期合约租赁出去,获得的利润以CPU时间形式出现。
现在再假设某人把大量资金锁定在一年期的CPU质押合约中,但是现在他的现金流出现问题,今天就需要现金。理论上,他们应该能够把他们的CPU质押头寸卖给他人。他们能从交易中获得的是根据预期的利率CPU现交割的净现值。一年期的CPU质押产生的长期价值变化和/或产生利率让长期的CPU价值远远高于现在的CPU。
让质押头寸产生流量不会影响到投票激励的价值。如果持有长期质押头寸的选民今天的行为会损害到CPU未来的预期价值,那么持有一年质押的每个人都会马上遭受金钱上的损失。反之,如果他们今天的投票决定会提升未来的CPU需求(即使用),他们马上就会获得收益。
质押头寸的持有人不需要等待一年才获得收益/损失,他们能够马上知道现在的行为带来的长期影响。质押头寸的流动性反过来让人们更愿意进行质押,因为它能减少质押的平均收益,同时增加基于长期质押的投票系统的攻击成本。
要求代币质押十年且没有去信任化的流动性选项的投票系统参与度一定会低,于是黑客会低价购入少量代币,然后牺牲这笔代币、质押十年、并借此攻击网络。但是在质押流动性的解决方案中,这样的攻击就会贵得多。但再次重申,法律、法规、税收问题可能会影响这样的解决方式实践中怎么执行。
结论
智能合约应该拥抱自由,避免增加人为限制,因为这些限制都可以很容易被绕过。收费是可以的,但应该只有在付费比绕开更方便的情况下才是如此。质押头寸保持流动性有利于投票人的长远观,同时也增加他们的参与度。当下管理决定产生的长远影响带来的实时市场反馈可能比期货到期用户才知道自己的收益情况有效得多。这样有利于唤起群众的智慧,如果有些投票人错误地认为他们现在的行动有利于长远价值,结果导致损失,那么其他人现在就可以惩罚他们,而不是等到为时已晚。
免责声明:本文仅代表个人观点,不代表我雇主或公司任何人的观点。本文提到的所有信息请勿预设一定会被任何区块链使用或应用。任何考虑使用相应解决方案的个人应先咨询相应专家了解相关法律、法规和税收问题。
原文/Original:
Smart contracts make the economy more efficient by making it easy to bundle and forward rights and obligations in a trustless manner. This has profound implications for those who attempt to build limitations on transferability of rights into contracts whether in the form of fees, time locks, vote buying, indivisibility, or some other restriction. Anyone designing smart contracts that attempt to rely upon artificial limits to enforce a certain game theory outcome should read this article first.
Imagine for a moment that you wish to create a token smart contract that charges everyone 2% any time they transfer the token. This is a practically unenforceable restriction. Anyone can create a new contract that accepts deposits of your token (paying a 2% fee) and then reissuing a new transferable token that charges a lower fee or no fee at all. Others can then withdraw tokens from this new contract after performing an unlimited number of transfers and paying a final 2% fee. Most people will accept and trade the feeless token because the contract can be made immutable and there is no trust involved. This is one example of how smart contracts make markets more efficient and bypass artificial restrictions like high fees.
Now suppose you wanted to create a new token that attempts to lock value in a long-term contract, where your tokens are now staked at different locked-in time periods. It is simple enough to implement the timelock just like it is simple enough to charge a 2% fee on transfers; however, it can be just as simple to bypass by use of other smart contracts.
In the time-lock case a new account can be created which locks tokens into the staking contract and then distributes a new tradable token. The tradable token would be valued like a zero risk bond payable at a future date. Assuming the underlying asset was valuable and there was a demand to trade zero risk bonds, there would be no way to prevent the underlying value of the bond from being sold and/or placed into another smart contract.
The EOS RAM market is another example of an asset with an artificialrestriction, allowing users to only buy and sell RAM with a fee. RAM can be effectively transferred by simultaneously buying or selling in a single transaction, incurring an effective 1% transfer fee. If someone simply wanted to trade in the economic value of RAM rather than the utility of RAM, then a trivial contract could be constructed which would issue RAM-backed tokens that can be transferred without fees. This even creates the potential for a secondary RAM market without trading fees.
The one thing that is not easily bypassed is the utility of the underlying asset. Token-RAM is not the same thing as actual RAM because you cannot actually use Token-RAM to store anything without first convert it to actual RAM and paying the 1% transfer fee (via simultaneous buy/sell). A similar thing could be said for staked tokens, you might be able to trade the economic value of the staked tokens but you would not be able to easily mirror any extra utility, such as voting rights or CPU time, of the staked token (depending upon the design of such utility).
For example, assume staked tokens provide the utility of voting. A contract that stakes on behalf of a group, and then reissued tokens, would have to “vote as a group”. Assuming each staked balance could only vote for one person, then the entire group would need to organize a meta-vote to determine which way the group would vote. This would provide less utility to minority members of the group because they would be forced to have their stake vote with the majority.
If the stake token system allowed each staked position to divide its vote among many options, then a liquid-stake token could mirror the meta-vote trivially, and the vast majority of the utility from the underlying staked tokens would be passed on to the liquid-stake tokens.
Even limiting voting to one vote per staked position isn’t a true limit. It is trivial for the liquid stake token contract to manage any number of staked positions and cast different votes for each staked position based upon the meta-vote of the liquid token holders.
It should go without saying, but I’ll say it anyway. These types of solutions should also be carefully considered from legal, regulatory and tax perspectives before being implemented.
Preventing Management by Smart Contract
One way to frustrate attempts to bypass intended restrictions is to prevent an account from being managed by a smart contract. This can be achieved by requiring all interactions with the restricted contract to be signed by an actual private key and requiring only one action per transaction. What this does is reintroduce an element of “trust” by requiring someone to hold and use a private key.
Assume for a moment that our token with a 2% transfer fee blocked all actions originating from other smart contracts. The trust model changes to one of a centralized exchange that reissues a tether-like instrument. This has the potential to fundamentally change the legal nature of the arrangement and discourage work-arounds.
While this approach would likely discourage attempts to work around the limits, the use of secure multi-party computation, hardware security devices, or the utilization of a minimal level of trust is sufficient to achieve the goal of bypassing artificial restrictions. This would also reduce the security and overall flexibility of your contract within the broader smart contract platform.
Embracing Freedom to Contract
An alternative to fighting market demand for financial freedom is to embrace it in the first place. Instead of attempting to charge a 2% fee, cut the competition off by using a 0% fee. Rather than trying to prevent RAM transfers, make it transferable. Instead of trying to force one person to hold their stake, make staked positions fungible and tradable. Fees are only viable to the extent that the friction from workarounds is greater than the cost of the fee or there is some utility (such as market liquidity) which is not easy or possible to reproduce.
On many public blockchains based on EOSIO, the system token is designed to provide the utility representing a pro-rata share of the available CPU time. This underlying utility cannot be provided by a CPU-backed token any more than RAM can be utilized by the holder of a RAM-backed token without first redeeming the token for the underlying CPU or RAM resource.
Imagine there was a market that wanted to lock people into a long-term interest in the value of CPU. It would allow people to stake their CPU today in exchange for more CPU time in the future. In effect, you lend your CPU for a long-term contract and receive interest in the form of CPU time.
Now let’s assume someone had a large sum of money locked in a one year CPU staking contract and they had a liquidity crunch and needed cash today. In theory they should be able to sell their CPU staking position to others. The value they would receive on the sale would be the net present value of CPU delivered in one years time given the projected interest rates. Changes in the long-term value and/or interest rate paid on one year CPU staking would move the value of long-term CPU to a much greater extent than present CPU.
Making staked positions liquid doesn’t undermine the value of aligning voting incentives. If voters holding long-term staking positions act in ways today that impact the expected value of future CPU negatively then everyone holding one year stake will realize an immediate and painful loss of capital due to market reaction. On the other hand if their voting decisions today raise future expectations of CPU demand (aka adoption) then they might be able to realize an immediate profit.
Instead of having to wait a year to realize the profit or loss, holders in staked positions realize the predicted long-term consequences of their present actions immediately. The liquidity of the staked positions in turn makes more people willing to stake by reducing the average yield paid on staking and, at the same time, increasing the cost of attacking a voting system based on long-term staking.
A voting system that requires tokens to be staked for 10 years, with no trustless liquidity options, would have low participation rates, making it cheaper for someone to buy a small amount of sacrificial tokens, stake them for 10 years, and then attack the network. The same attack on a liquid staking solution would be much more expensive. Once again, the legal, regulatory and tax issues may affect how such a solution can be implemented in practice.
Conclusion
Smart contracts should embrace freedom and avoid adding artificial limits, which can be trivially bypassed. It is possible to charge some fees, but only to the extent that the fee is more convenient than the workaround. Making staked positions liquid retains the incentive for long-term thinking of voters while increasing voter participation. Real-time market feedback on the long-term consequences of present day governance decisions is likely more powerful than making voters wait until the future arrives to realize their gains or losses. This leverages the wisdom of the crowds in punishing voters who mistakenly believe their actions will improve long term value by causing losses today rather than in the future after it is too late to correct.
Disclaimer: Everything in this post is my opinion and not that of my employer or anyone affiliated with it. Do not assume anything in this post will be implemented or adopted by any blockchain. Anyone considering implementing the proposed solutions should consult relevant advisors to address any legal, regulatory or tax consequences.
原文链接/Original URL: