A project for learning smart-contract-full-stack-whizz-bang-dApp-buidling using the incredible austintgriffith/scaffold-eth.
π‘ The idea: "Strong πβ hands" get a bonus from "weak π§ hands"'s penalties for early withdrawals.
-
Price effect: like "staking", but without the inflation
- Raises the price by reducing amount in circulation π₯.
- Builds trust in the asset by proving an amount commited to be held π.
- Makes HODLing more attractive by providing a positive economic incentive π€.
-
Social proof / network effects: like "time lock", but with an incentive to participate
- Makes HODLing provable and shareable π¦ .
- Increases trust in the community's / project team's long term commitment, provides a social incentive to demonstrate "skin in the game" πββοΈ .
-
Yield generating: like AMMs LP or lending, but without AMM's impermanent loss and doesn't depend on borrowing demand
- Vs. liquidity providing in AMMs: no dependence on trading volume, no exposure to additional assets, no bleeding value to arbitrageurs (
not-so""impermanent"" loss) π©Έ. - Vs. lending: earns yield on tokens that don't have a borrowing market with high interest rates π (or any borrowing market).
- Vs. liquidity providing in AMMs: no dependence on trading volume, no exposure to additional assets, no bleeding value to arbitrageurs (
-
Volatility bonus: market volatility causes higher bonuses
- Asset price "moons" π₯³ - more "weak hands" will withdraw early to take profits, increasing the bonus πΈ.
- Asset price "tanks" π’ - more "weak hands" will withdraw early to panic-sell, increasing the bonus πΈ.
-
So what tokens this should / shouldn't be used for?
- βοΈ Most tokens which don't have profitable AMM / staking / lending usage.
- βοΈβοΈ Community driven tokens like meme-tokens.
- βοΈβοΈβοΈ Smaller (new) project tokens instead of time-lock mechanism .
- π Stablecoins: they can be profitably and safely lended, or provided as liquidity in AMMs.
- π Tokens which have very high trading volume but don't change in price much: they can be LPed in AMMs.
- π Tokens which have profitable staking mechanisms: they can be staked for guaranteed yield.
-
v0 βοΈ (PoC)
- goal: π end-to-end bare skeleton first version deployed (to testnet).
- scope: fixed commitment params & bonus depends on ratio of current pool, only eth
- deliver βοΈ repo βοΈ, tests + CI βοΈ, basic UI βοΈ, kovan testnet deployed & verified contract βοΈ and frontend (eth) βοΈ
- stretch βοΈ: erc20 support βοΈ (supporting a single token)
-
v1 βοΈ (alpha)
- goal: handle all tokens & ETH in one contract
- scope: any ERC20 token βοΈ (even fee-on-transder tokens βοΈ), handle ETH as WETH βοΈ, single contract for all tokens βοΈ
- deliver: UI βοΈ frontend (ERC20 tokens / eth) βοΈ, explanations βοΈ, kovan testnet deployed & verified contract βοΈ, some feedback βοΈ
-
v2 βοΈ (alpha+)
- goal & scope: bonus depends on time held βοΈ, flexible commitment params when depositting βοΈ
- deliver: UI βοΈ, frontend βοΈ, kovan testnet deployed & verified contract βοΈ
-
v3 βοΈ :
- Goal & added scope: deposit is β¨ERC721 NFTβ¨ (transferable, view on supporting platforms) βοΈ, multiple deposits for same account βοΈ,
depositFor
on behalf someone else βοΈ, all-deposits view βοΈ. - UI:
- Contract:
- Kovan βοΈ
- Mainnet(s): β³
- Goal & added scope: deposit is β¨ERC721 NFTβ¨ (transferable, view on supporting platforms) βοΈ, multiple deposits for same account βοΈ,
Basic V2 demo (Try it out):
System dependencies: Node & Yarn
- Install dependecies:
yarn install
- Start a local chain:
yarn chain
- In second terminal: deploy the contract to the chain -
yarn deploy
oryarn watch
- In third terminal: start the frontend react server
yarn start
- All tests:
yarn test
- Run some tests matching a pattern (in their description strings):
- Go to contracts package:
cd packages/hardhat
- Start a local chain:
yarn chain
- In second terminal: run e.g. "deployment" related tests -
yarn mocha -g deployment
- Go to contracts package:
In in packages/hardhat
:
- Gas report:
yarn gas-report
. It's saved topackages/hardhat/gasReportResults.txt
. - slither report:
- To install:
yarn install-slither
(this creates a python.venv
virtual environment withslither
) - To run:
yarn slither
. Report is saved topackages/hardhat/slitherReport.txt
.
- To install: