ZivoeTranches.sol
Minting Tranche Tokens
Introduction
This contract will facilitate ongoing liquidity provision to Zivoe tranches - Junior, Senior.
This contract will be permissioned by $zJTT and $zSTT to call mint().
This contract will support a whitelist for stablecoins to provide as liquidity.
State Variables
Type | Name | Description |
---|---|---|
address | GBL | The ZivoeGlobals contract. |
uint256 | maxTrancheRatioBIPS | This ratio represents the maximum size allowed for junior tranche, relative to senior tranche. A value of 2,000 represent 20%, thus junior tranche at maximum can be 20% the size of senior tranche. |
uint256 | minZVEPerJTTMint | These two values control the min/max $ZVE minted per stablecoin deposited to ZivoeTranches. |
uint256 | maxZVEPerJTTMint | These two values control the min/max $ZVE minted per stablecoin deposited to ZivoeTranches. |
uint256 | lowerRatioIncentiveBIPS | Basis points ratio between zJTT.totalSupply():zSTT.totalSupply() for maximum rewards (affects above slope). |
uint256 | upperRatioIncentiveBIPS | Basis points ratio between zJTT.totalSupply():zSTT.totalSupply() for maximum rewards (affects above slope). |
bool | tranchesUnlocked | Prevents contract from supporting functionality until unlocked. |
bool | paused | Temporary mechanism for pausing deposits. |
uint256 | BIPS | Private constant, |
Sections
canPush() - Permission for owner to call
pushToLocker()
. See ZivoeLocker.solcanPull() - Permission for owner to call
pullFromLocker()
. See ZivoeLocker.solcanPullPartial() - Permission for owner to call
pullFromLockerPartial()
. See ZivoeLocker.solisJuniorOpen() - Checks if stablecoins deposits into the Junior Tranche are open.
rewardZVEJuniorDeposit() - Returns the total rewards in $ZVE for a certain junior tranche deposit amount.
rewardZVESeniorDeposit() - Returns the total rewards in $ZVE for a certain senior tranche deposit amount.
pushToLocker() - This pulls capital from the DAO, does any necessary pre-conversions, and escrows ZVE for incentives.
depositJunior() - Deposit stablecoins into the junior tranche. Mints Zivoe Junior Tranche ($zJTT) tokens in 1:1 ratio.
depositSenior() - Deposit stablecoins into the senior tranche. Mints Zivoe Senior Tranche ($zSTT) tokens in 1:1 ratio.
switchPause() - Pauses or unpauses the contract, enabling or disabling depositJunior() and depositSenior().
updateLowerRatioIncentiveBIPS() - Updates the lower ratio between tranches for minting incentivization model.
updateMaxTrancheRatio() - Updates the maximum size of junior tranche, relative to senior tranche.
updateMaxZVEPerJTTMint() - Updates the maximum $ZVE minted per stablecoin deposited to ZivoeTranches.
updateMinZVEPerJTTMint() - Updates the minimum $ZVE minted per stablecoin deposited to ZivoeTranches.
updateUpperRatioIncentiveBIPS() - Updates the upper ratio between tranches for minting incentivization model.
unlock() - Unlocks this contract for distributions, sets some initial variables.
Read Functions
canPush()
canPush()
Permission for owner to call pushToLocker()
. See ZivoeLocker.sol
canPull()
canPull()
Permission for owner to call pullFromLocker()
. See ZivoeLocker.sol
canPullPartial()
canPullPartial()
Permission for owner to call pullFromLockerPartial()
. See ZivoeLocker.sol
isJuniorOpen()
isJuniorOpen()
Checks if stablecoins deposits into the Junior Tranche are open.
Type | Name | Description |
---|---|---|
uint256 | amount | The amount to deposit. |
address | asset | The asset (stablecoin) to deposit. |
Returns
Type | Name | Description |
---|---|---|
bool | open | Will return "true" if deposits into the Junior Tranche are open. |
rewardZVEJuniorDeposit()
rewardZVEJuniorDeposit()
Returns the total rewards in $ZVE for a certain junior tranche deposit amount.
Type | Name | Description |
---|---|---|
uint256 | deposit | The amount supplied to the junior tranche. |
Returns
Type | Name | Description |
---|---|---|
uint256 | reward | The rewards in $ZVE to be received. |
rewardZVESeniorDeposit()
rewardZVESeniorDeposit()
Returns the total rewards in $ZVE for a certain senior tranche deposit amount.
Type | Name | Description |
---|---|---|
uint256 | deposit | The amount supplied to the senior tranche. |
Returns
Type | Name | Description |
---|---|---|
uint256 | reward | The rewards in $ZVE to be received. |
Write Functions
pushToLocker()
pushToLocker()
This pulls capital from the DAO, does any necessary pre-conversions, and escrows ZVE for incentives.
Type | Name | Description |
---|---|---|
uint256 | asset | The asset to pull from the DAO. |
address | amount | The amount of asset to pull from the DAO. |
bytes | data | Accompanying transaction data. |
depositBoth()
depositBoth()
Deposit stablecoins to both tranches simultaneously
Type | Name | Description |
---|---|---|
uint256 | amountSenior | The amount to deposit to senior tranche |
address | assetSenior | The asset to deposit to senior tranche |
uint256 | amountJunior | The amount to deposit to senior tranche |
address | assetJunior | The asset to deposit to senior tranche |
depositBothInverse()
depositBothInverse()
Deposit stablecoins to both tranches simultaneously, inverse order
Type | Name | Description |
---|---|---|
uint256 | amountSenior | The amount to deposit to senior tranche |
address | assetSenior | The asset to deposit to senior tranche |
uint256 | amountJunior | The amount to deposit to senior tranche |
address | assetJunior | The asset to deposit to senior tranche |
depositJunior()
depositJunior()
Deposit stablecoins into the junior tranche. Mints Zivoe Junior Tranche ($zJTT) tokens in 1:1 ratio.
Type | Name | Description |
---|---|---|
uint256 | amount | The amount to deposit. |
address | asset | The asset (stablecoin) to deposit. |
Emits the JuniorDeposit() event
depositSenior()
depositSenior()
Deposit stablecoins into the senior tranche. Mints Zivoe Senior Tranche ($zSTT) tokens in 1:1 ratio.
Type | Name | Description |
---|---|---|
uint256 | amount | The amount to deposit. |
asset | asset | The asset (stablecoin) to deposit. |
Emits the SeniorDeposit() event
switchPause()
switchPause()
Pauses or unpauses the contract, enabling or disabling depositJunior() and depositSenior().
updateLowerRatioIncentiveBIPS()
updateLowerRatioIncentiveBIPS()
Updates the lower ratio between tranches for minting incentivization model.
Type | Name | Description |
---|---|---|
uint256 | _lowerRatioIncentiveBIPS | The lower ratio to incentivize minting. |
Emits the UpdatedLowerRatioIncentiveBIPS() event
updateMaxTrancheRatio()
updateMaxTrancheRatio()
Updates the maximum size of junior tranche, relative to senior tranche.
Type | Name | Description |
---|---|---|
uint256 | ratio | The new ratio value. |
Emits the UpdatedMaxTrancheRatioBIPS() event
updateMaxZVEPerJTTMint()
updateMaxZVEPerJTTMint()
Updates the maximum $ZVE minted per stablecoin deposited to ZivoeTranches.
Type | Name | Description |
---|---|---|
uint256 | max | Maximum $ZVE minted per stablecoin. |
Emits the UpdatedMaxZVEPerJTTMint()
updateMinZVEPerJTTMint()
updateMinZVEPerJTTMint()
Updates the minimum $ZVE minted per stablecoin deposited to ZivoeTranches.
Type | Name | Description |
---|---|---|
uint256 | min | Minimum $ZVE minted per stablecoin. |
Emits the UpdatedMinZVEPerJTTMint() event
updateUpperRatioIncentiveBIPS()
updateUpperRatioIncentiveBIPS()
Updates the upper ratio between tranches for minting incentivization model.
Type | Name | Description |
---|---|---|
uint256 | _upperRatioIncentivBIPS | The upper ratio to incentivize minting. |
Emits the UpdatedUpperRatioIncentiveBIPS() event
unlock()
unlock()
Unlocks this contract for distributions, sets some initial variables.
Events
JuniorDeposit()
JuniorDeposit()
Emitted during depositJunior()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | account | The account depositing stablecoins to junior tranche. |
address | True | asset | The stablecoind deposited. |
uint256 | False | amount | The amount of stablecoins deposited. |
uint256 | False | incentives | The amount of incentives ($ZVE) distributed. |
SeniorDeposit()
SeniorDeposit()
Emitted during depositSenior()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | account | The account depositing stablecoins to senior tranche. |
address | True | asset | The stablecoind deposited. |
uint256 | False | amount | The amount of stablecoins deposited. |
uint256 | False | incentives | The amount of incentives ($ZVE) distributed. |
UpdatedLowerRatioIncentiveBIPS()
UpdatedLowerRatioIncentiveBIPS()
Emitted during updateLowerRatioIncentiveBIPS()
Type | Indexed | Name | Description |
---|---|---|---|
uint256 | False | oldValue | The old value of lowerRatioJTT. |
uint256 | False | newValue | The new value of lowerRatioJTT. |
UpdatedMaxTrancheRatioBIPS()
UpdatedMaxTrancheRatioBIPS()
Emitted during updateMaxTrancheRatio()
Type | Indexed | Name | Description |
---|---|---|---|
uint256 | False | oldValue | The old value of maxTrancheRatioBIPS. |
uint256 | False | newValue | The new value of maxTrancheRatioBIPS. |
UpdatedMaxZVEPerJTTMint()
UpdatedMaxZVEPerJTTMint()
Emitted during updateMaxZVEPerJTTMint()
Type | Indexed | Name | Description |
---|---|---|---|
uint256 | False | oldValue | The old value of maxZVEPerJTTMint. |
uint256 | False | newValue | The new value of maxZVEPerJTTMint. |
UpdatedMinZVEPerJTTMint()
UpdatedMinZVEPerJTTMint()
Emitted during updateMinZVEPerJTTMint()
Type | Indexed | Name | Description |
---|---|---|---|
uint256 | False | oldValue | The old value of minZVEPerJTTMint. |
uint256 | False | newValue | The new value of minZVEPerJTTMint. |
UpdatedUpperRatioIncentiveBIPS()
UpdatedUpperRatioIncentiveBIPS()
Emitted during updateUpperRatioIncentiveBIPS()
Type | Indexed | Name | Description |
---|---|---|---|
uint256 | False | oldValue | The old value of upperRatioJTT. |
uint256 | False | newValue | The new value of upperRatioJTT. |
Last updated