TrustToken is a general assurance system. You provide assurance on any assurance opportunity, you get rewards in exchange for taking on risk. Each assurance opportunity has a pre-defined trigger for when TrustToken assurance is liquidated.
git submodule update --init --recursive
npm install
brew install python3
brew install gmp leveldb
python3 -m venv vyper-env
source ~/vyper-env/bin/activate
pip install vyper
If vyper fails, try installing a newer version or vyper==0.1.0b4.
- The TrustToken token smart contract will be behind an upgradable proxy which will allow it to be upgraded by our team (similar to the TrueUSD smart contract)
- GasBoost will be supported similar to TUSD
- Initial minting version
- Minting enabled
- Transfers are disabled
- Upgrade will occur once all tokens have been minted for purchasers and the company. Only the owner key can perform the upgrade to the final version.
- Upgraded final version
- Minting disabled
- Transfers enabled
- Supports AutoSweep
- You can stake only TrustTokens
- Stake is transferable and is represented as a fungible ERC20 token.
- The staking opportunity itself will not be an ERC20 token, it'll just have a bunch of children that are ERC20 tokens (one for each asset)
- Each staking opportunity has a name which is a string, we are not going to enforce uniqueness
- TRU staked on "TUSD" will have symbol "TRU:TUSD"
- Unclaimed rewards are transferred with TRU:TUSD and TUSD:TUSD as they are transferred.
- Justification: Unclaimed rewards stay in the pool until they are claimed by an account that has passed KYC. If you sell your staked tokens or transfer your stake to another account you control, your unclaimed rewards travel with your stake. This allows you to move your stake to a multisig or between exchange accounts without unstaking or claiming. This prevents unclaimed rewards from becoming stuck in systems that don't know about them.
- This token will be on a whitelist if and only if staking itself requires a whitelist
- Stake that's in the process of being pulled out is not a tradable ERC20 token
- Staking rewards are given out proportionally to stake in the smart contract when the staking reward comes in
- You must be on the Registry's KYC/AML list in order to claim rewards
- The claimer can specify a recipient address, and either the recipient address or the claimer must be KYC'd in the registry
- Slashing stake
- Slashing stake will dilute the value of TRU:TUSD and sTUSD by pulling TUSD and TRU
- See Liquidation Contract section below
- The TrustToken staking smart contract will be behind an upgradable proxy which will allow it to be easily upgraded by the owner multisig and then the auditor multisig
- You must wait for 21 days to pull out stake
- You don't get rewards when you are in this pending state
- Your stake can be slashed while you are in this pending state
- If pulling out all stake would leave behind unclaimed rewards, they are distributed to the remaining stakers.
- Slashing stake
- Stake is slashed proportionally for everyone with respect to the obtainable TrueCurrency value.
- Ergo more TRU will be sold by prior value, though less by resulting value
- Only as much stake as is required to fill the declared deficit will be liquidated
- TRU can be sold for TUSD atomically via Airswap or similar if registered offers are better than Uniswap. TRU will never be sold at a worse slippage than is achievable in the primary Uniswap. Supported exchanges may include:
- Airswap
- Uniswap V1
- Uniswap V2: TRU/TUSD
- Uniswap V2: 2-hop pairings (eg TRU/MKR;MKR/TUSD)
- Uniswap V2: TRU:TUSD/TUSD (in the case all TRU is liquidated)
- Uniswap V2: sTUSD/TUSD (in the case all TUSD is liquidated)
- If the TrustTokens cannot be liquidated for enough due TrueCurrency, all TrustTokens will be liquidated, and the remaining loss will come from:
- Unclaimed dividends to TrustTokens
- Staked TrueCurrencies
- Unclaimed TrueCurrency Dividends
- If the slash amount is greater than the obtainable TrueCurrency, all assets in the contract are slashed to zero, and all obtainable TrueCurrency is burned
- In this case the contract will deploy a copy of itself and redirect future deposits and rewards to the copy.
- TrueCurrency from stake or from TRU sale is burned by the smart contract in order to bring the market cap down to be in line with the assets backing it
- Stake is slashed proportionally for everyone with respect to the obtainable TrueCurrency value.
The goal of the staking factory is that anyone (including but not limited to TrustToken) can create new things to stake on. For example:
- stocks
- bonds
- trusted off-chain financial opportunity
- uncollateralized loans
- Smart contract bugs