forked from 0xSplits/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cafa5cd
commit 618bd58
Showing
4 changed files
with
192 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import Callout from 'nextra-theme-docs/callout' | ||
|
||
# Liquid Module | ||
|
||
<Callout emoji="🛠"> | ||
This module is currently being developed and it not yet in production. You can | ||
read more | ||
[here](https://songcamp.mirror.xyz/UkR2nfVcYYKuePHzck6UnWTY35zW4uFxRnXllkk99Hw#:~:text=What%20are%20Liquid%20Splits%3F%C2%A0). | ||
</Callout> | ||
|
||
This module uses NFTs to represent ownership in a Split. Recipients are | ||
automatically updated according to the percent of NFT Total Supply each | ||
Recipient owns. To accomplish this, an NFT contract is the Controller of a | ||
Mutable Split. Tokens are sent to the NFT contract, and when released to the | ||
Split, the Recipients are updated and tokens are distributed. | ||
|
||
## How It Works | ||
|
||
- Each Liquid Module has a payable address to which ETH and ERC20 tokens can be | ||
sent. | ||
- Each Liquid Module has a Total Supply of NFTs, where each NFT represents the | ||
corresponding percent ownership in the Split. For example: a Total Supply of | ||
50 means each NFT represents 2% ownership in the Split, since `100 / 50 = 2`. | ||
- Tokens sent to the Liquid Module are held until the balance is released to the | ||
Split. Two things happen when tokens are released. First, the Split Recipients | ||
are updated according to each Recipient's balance (as a percentage) of Total | ||
Supply. Second, the tokens sitting in the Liquid Module are sent to the Split | ||
and immediately distributed to the Recipients. | ||
|
||
``` | ||
EXTERNAL ACCOUNT/SMART CONTRACT | ||
│ | ||
│ | ||
▼ | ||
NFT Contract──────────────────────────────────┐ | ||
│ │ | ||
│ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │ | ||
│ │ | ||
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ | ||
│ │ Owner │ │ Owner │ │ Owner │ ●─┼──────────┐ | ||
│ │ └─────────┘ └─────────┘ └─────────┘ │ │ │ | ||
│ │ │ | ||
│ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │ │ | ||
│ │ Split recipients | ||
└─────────────────────────────────────────────┘ change according | ||
│release funds ────────── to the % of the | ||
0xSplits───────────────┼──────────────────────┐ NFTs they own | ||
│ │ │ │ | ||
│ ▼ │ │ | ||
│ ┌─────────────────────────┐ │ │ | ||
│ │ Split Contract Mutable │ │ │ | ||
│ └─────────────────────────┘ │ │ | ||
│ │ │ │ | ||
│ │ │ │ | ||
│ ┌───────────┼───────────┐ │ │ | ||
│ │ │ │ │ │ | ||
│ ┌ ─ ─ ─ ┼ ─ ─ ─ ─ ─ ┼ ─ ─ ─ ─ ─ ┼ ─ ─ ─ ┐ │ │ | ||
│ ▼ ▼ ▼ │ │ | ||
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ │ | ||
│ │Recipient│ │Recipient│ │Recipient│ ●─┼──────────┘ | ||
│ │ └─────────┘ └─────────┘ └─────────┘ │ │ | ||
│ │ │ │ │ | ||
│ └ ─ ─ ─ ┼ ─ ─ ─ ─ ─ ┼ ─ ─ ─ ─ ─ ┼ ─ ─ ─ ┘ │ | ||
│ │ │ │ │ | ||
└──────────┼───────────┼───────────┼──────────┘ | ||
│ │ │ | ||
▼ ▼ ▼ | ||
EOA/SC EOA/SC EOA/SC | ||
``` | ||
|
||
## Notes | ||
|
||
- Tokens should only be sent to the Liquid Module's address, not the Split | ||
directly. There is no guarantee that tokens sent to the Split directly will be | ||
distributed among current NFT holders. This is because the Liquid Module calls | ||
[`updateAndDistribute`](/smartcontracts/SplitMain#updateanddistributeeth) on | ||
when transfering tokens to the Split, which ensures the Recipients accurately | ||
reflect current NFT holders prior to each distribution. | ||
- A higher Total Supply means higher distribution costs, since on each | ||
distribution the Liquid Module looks for all accounts holding at least 1 NFT | ||
and then updates the Split accordingly. Given Split Recipients shouldn't | ||
exceed ~500 in aggregate, Total Supply should not be meaningfully higher | ||
(unless you expect a fairly concentrated distribution of NFTs). If the number | ||
of NFT holders exceeds the maximum number of Recipients in a Split (~500), | ||
tokens sitting in the Liquid Module will be locked until the number of NFT | ||
holders falls below that threshold. See | ||
[Gas Estimates](/appendices/gas-estimates#total-gas) to understand expected | ||
distribution costs. | ||
- Total Supply must be greater than 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"overview": "Overview", | ||
"vesting": "Vesting" | ||
"vesting": "Vesting", | ||
"liquid": "Liquid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.