![](https://cdn.prod.website-files.com/62fce47e1be8652e155ff74a/655edae7f4bb20e00c86daba_Group%2043498.png)
Econia Labs took first-place in the “Move’s Most Innovative” track during the Aptos Hackathon held in Singapore September 11–14, 2023. The hackathon, which featured a diverse array of tracks and substantial prizes for the most compelling projects, showcased many cutting-edge ideas in the Web3 space. Econia Labs’ project, “The Lockstream”, a coin distribution mechanism based on the Zahavi handicap principle from evolutionary game theory, was submitted as a community contribution to the Aptos Framework.
Why the Lockstream?
Traditional coin distribution methods such as Airdrops and ICOs/IDOs have faced various issues that hinder their effectiveness and compliance with regulations. Airdrops, although a popular way to distribute coins, are often subject to Know Your Customer (KYC) procedures, which can compromise user privacy and slow down the distribution process. Additionally, permissionless Airdrop variants are vulnerable to Sybil attacks, where malicious actors create multiple fake accounts to receive more tokens, undermining the fairness of the distribution. On the other hand, ICOs and IDOs, which ensure a pro rata distribution mechanism, constitute a public sale, leading to regulatory risks and potential legal complications. The Lockstream offers an innovative approach to coin distribution that not only addresses these issues but also maintains compliance with regulations, offering a more secure and transparent solution for the crypto community.
The Lockstream in Practice
In a lockstream, a creator seeds a pool with an initial base asset supply (e.g. PRO, an unlaunched protocol coin), and specifies several time windows.
During the first time window, the locking period, anyone can permissionlessly lock a quote asset (e.g. APT) in the pool.
Lockers can lock multiple times during the locking period, and the pool automatically tracks the total quote locked amount for each locker across all such locking events.
![](https://cdn.prod.website-files.com/62fce47e1be8652e155ff74a/655ed6cd6672c96cce9b6824_1*UIiwkyWtzbDDNEEDs7l41w.png)
Here, the total quote locked for the pool is 20+80=100 APT.
For a pool created with 2000 PRO, this means the pool has:
![](https://cdn.prod.website-files.com/62fce47e1be8652e155ff74a/655ed6cd7d8cc2992da86891_1*zUBgMQYNt4A81dDo6phkhQ.png)
After the locking period is over the streaming period begins, and lockers can start claiming their pro rata portion of the base asset supply in the pool, based on their individual contribution to the total quote locked for the entire pool.
![](https://cdn.prod.website-files.com/62fce47e1be8652e155ff74a/655ed6cd935e3a11c54f10d3_1*fUE4TjXyphzWpruAYvHYdg.png)
Moreover, lockers can also claim back their original locked quote amount, but not all at once: like a constant stream of water slowly filling up a bucket, the lockstream only permits base and quote assets to be claimed in proportion to how much of the streaming window has elapsed.
Lockers can claim whenever they want and as many times as they want, but the lockstream tracks the total amount that each locker has already claimed and only returns the difference between their eligible claim amount and total claims so far:
![](https://cdn.prod.website-files.com/62fce47e1be8652e155ff74a/655ed6cd654af148848620f3_1*uGnSp7Opl3KQkpIs-QAjFw.png)
After the streaming period has completed, lockers have an additional “claim last call period” during which they can claim any eligible assets that they didn’t claim during the streaming period: the claim last call period prevents the otherwise contentious situation of everyone trying to submit claim transaction right at the end of the streaming period, which would be expected in the absence of a claim last call period.
Lockstream Implications
The lockstream incorporates the Zahavi handicap principle, a game theoretic concept from the field of sexual selection theory, which can be summarized as:
Costly signals are reliable signals
For example, the male Peacock’s extravagant tail is in one sense tantamount to declaring, “look here female, my genes are so good and I am so fit that no predator will hunt me down, and I can afford to have this wasteful plumage, so mate with me and your offspring will prosper.”
Or more generally, in the words of evolutionary biologist Geoffrey Miller, “the handicap principle suggests that prodigious waste is a necessary feature of courtship.” (See reference below.)
Similarly, in a lockstream, lockers are essentially signaling their worth as holders of the base asset by surrendering the opportunity cost of the locked quote asset:
“I have so much APT that I can afford to lock this much up, so give me PRObecause I make sound asset allocation decisions and will treat the coin with as much care as I treat my APT bags."
Here, total APT holdings is taken as a proxy for ecosystem engagement, faith in the longevity of the Aptos blockchain, etc.
Notably, since lockers end up getting all of their locked quote asset back, the lockstream does not constitute a token sale, because the pool creator gets nothing in return for the base asset they seed the pool with: the pool creator is giving away the base asset.
Moreover, the streaming mechanism that gradually introduces the unlocked base asset into circulation smooths out volatility traditionally associated with large coin distribution events.
Reference
Miller, Geoffrey. The Mating Mind: How Sexual Choice Shaped the Evolution of Human Nature. New York: Anchor Books, 2001. pp. 123–135
Configuration
During pool creation, the creator transfers in the locked base asset and configures the following time parameters, all specified in UNIX seconds:
![](https://cdn.prod.website-files.com/62fce47e1be8652e155ff74a/655ed6cd09e863ce99a583e4_1*5zNbYhGgk4cWdKiurfItuQ.png)
These result in the following periods:
![](https://cdn.prod.website-files.com/62fce47e1be8652e155ff74a/655ed6cd0ca0432ba7ebfe3d_1*oDUjMtkERS1W-jcuhg93zg.png)
Note: If a locker fails to claim assets, the lockstream implements a sweep function, which allows a single locker to drain all unclaimed assets from the pool after the claim last call period has ended, in a winner-take-all fashion.
Econia is a hyper-parallelized on-chain order book DEX for Aptos. Econia Labs is set to launch the high-performance order book on the Aptos Blockchain soon.