OCL_ZVE.sol
OCL -> On-Chain Liquidity (Sushi, Uniswap)
Last updated
OCL -> On-Chain Liquidity (Sushi, Uniswap)
Last updated
Zivoe Finance - Official Documentation
This contract manages liquidity provisioning for a Uniswap V2 or Sushi pool.
This contract has the following responsibilities:
Allocate capital to a $ZVE/pairAsset pool.
Remove capital from a $ZVE/pairAsset pool.
Forward yield (profits) every 30 days to the YDL with compounding mechanisms.
canPushMulti() - Permission for owner to call pushToLockerMulti()
. See ZivoeLocker.sol
canPull() - Permission for owner to call pullFromLocker()
. See ZivoeLocker.sol
canPullPartial() - Permission for owner to call pullFromLockerPartial()
. See ZivoeLocker.sol
fetchBasis() - Returns amount of pairAsset redeemable with current LP position.
pushToLockerMulti() - This pulls capital from the DAO and adds liquidity into a $ZVE/pairAsset pool.
pullFromLocker() - This burns all LP tokens owned by the contract from the $ZVE/pairAsset pool and returns them to the DAO.
pullFromLockerPartial() - This burns LP tokens from the $ZVE/pairAsset pool and returns them to the DAO.
forwardYield() - This forwards yield to the YDL in the form of pairAsset.
updateCompoundingRateBIPS() - Updates the compounding rate of this contract.
updateOCTYDL() - Updates the OCT_YDL endpoint.
canPushMulti()
Permission for owner to call pushToLockerMulti()
. See ZivoeLocker.sol
canPull()
Permission for owner to call pullFromLocker()
. See ZivoeLocker.sol
canPullPartial()
Permission for owner to call pullFromLockerPartial()
. See ZivoeLocker.sol
fetchBasis()
Returns amount of pairAsset redeemable with current LP position.
Returns
pushToLockerMulti()
This pulls capital from the DAO and adds liquidity into a $ZVE/pairAsset pool.
Emits the LiquidityTokensMinted() event
pullFromLocker()
This burns all LP tokens owned by the contract from the $ZVE/pairAsset pool and returns them to the DAO.
Emits the LiquidityTokensBurned() event
pullFromLockerPartial()
This burns LP tokens from the $ZVE/pairAsset pool and returns them to the DAO.
Emits the LiquidityTokensBurned() event
forwardYield()
This forwards yield to the YDL in the form of pairAsset. Requires that the block timestamp is greater than nextYieldDistribution
variable, see above.
Emits the YieldForwarded() event
updateCompoundingRateBIPS()
Updates the compounding rate of this contract. A value of 2,000 represent 20% of the earnings stays in this contract, compounding.
Emits the UpdatedCompoundingRateBIPS() event
updateOCTYDL()
Updates the OCT_YDL endpoint.
Emits the UpdatedOCTYDL() event
LiquidityTokensBurned()
Emitted during pullFromLocker(), pullFromLockerPartial(), and forwardYield()
LiquidityTokensMinted()
Emitted during pushToLockerMulti()
UpdatedCompoundingRateBIPS()
Emitted during updateCompoundingRateBIPS()
UpdatedOCTYDL()
Emitted during updateOCTYDL()
YieldForwarded()
Emitted during forwardYield()
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Name | Description |
---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
Type | Indexed | Name | Description |
---|---|---|---|
address
GBL
The ZivoeGlobals contract.
address
factory
Address for the Factory (Uniswap v2 or Sushi).
address
pairAsset
ERC20 that will be paired with $ZVE for Sushi pool.
address
router
Address for the Router (Uniswap v2 or Sushi).
address
OCT_YDL
Facilitates swaps and forwards distributedAsset() to YDL.
uint256
basis
The basis used for forwardYield() accounting.
uint256
compoundingRateBIPS
The % of returns to retain, in BIPS.
uint256
nextYieldDistribution
Determines next available forwardYield() call.
uint256
BIPS
Private constant, 10000
uint256
amount
Current pairAsset harvestable.
uint256
lp
Current ZVE/pairAsset LP tokens.
address[]