Liqee Project

http://www.liqee.io/

Config History

Update Interest Rate for iMUSX (10-18)

Owner: 0xbD206d0677BEf61f3abA309f84473fCF5C44C880

BSC

Set interestPerblock to 1416373303
Time Lock: https://bscscan.com/address/0x511b05f37e27a88e284322af0bde41a91771316d#writeContract

executeTransaction:

target: 0x0BCb6Be12022c1881031F86C502daA49909b74a1
value: 0
signature: _setBorrowRate(address,uint256)
data: 0x000000000000000000000000ee0d3450b577743eee2793c0ec6d59361eb9a45400000000000000000000000000000000000000000000000000000000546c2437

Ethereum

Set interestPerblock to 6137759723
Time Lock: https://etherscan.io/address/0xbb247f5ac912196a5aa80e9dd6ab252b79d6ea25#writeContract

executeTransaction:
target: 0x22961D0Ba5150f97AE0F3248b4c415875cBf42d5
value: 0
signature: _setBorrowRate(address,uint256)
data: 0x0000000000000000000000004c3f88a792325ad51d8c446e1815da10da3d184c000000000000000000000000000000000000000000000000000000016dd6c7eb

Reward Distribution (10-01)

验证方法:7440476190476191288007/10**18

Liqee BSC Supply:
https://bscscan.com/address/0xAa272a00e0d6F763AcC8Fe6DdEdf2684A122B215#writeProxyContract

[0x09d0D2C90d09dD817559425479a573faA354c9d2,0x4E673bed356912077c718CBAB286BC135fAA5FB6,0x9A05Eed908D0C4c2A6bd860027C2a4BbB1deeBd8]
[0,7440476190476191,7440476190476191],

Reward Distribution (9-24)

Liqee BSC Supply:
["0x7E3b8eB001396334DA14d4bb209b0dA77725939d","0x4E673bed356912077c718CBAB286BC135fAA5FB6","0x9A05Eed908D0C4c2A6bd860027C2a4BbB1deeBd8"]
['0','17361111111111112','17361111111111112'],

Liqee Mainnet Supply:
["0x983E0df5CCCef64fCaa54F99b0945bcCf154EE80"]
["0"]

Reward Distribution (9-17)

Liqee BSC Supply:
["0x7E3b8eB001396334DA14d4bb209b0dA77725939d","0x09d0D2C90d09dD817559425479a573faA354c9d2","0x4E673bed356912077c718CBAB286BC135fAA5FB6","0x9A05Eed908D0C4c2A6bd860027C2a4BbB1deeBd8"]
["2480158730158731","2480158730158731","27281746031746032","9920634920634921"],
Liqee BSC Borrow:
["0x88131dd9f6A78d3d23aBcF4960D91913d2dC2307","0xF51422c47c6C3e40CFCA4a7b04232aeDb7f49948","0xAdCF9619C404de591766B33e696c737ebe341A87"]
["0", "0", "0"]

Liqee Mainnet Supply:
["0x983E0df5CCCef64fCaa54F99b0945bcCf154EE80"]
["10747603284467564"]
Liqee Mainnet Borrow:
["0x9C02b8409a2CD04DFDA7b824235625f9C7DFb0E2"]
["0"]



about rTokens


Kovan Contracts

Kovan-v2

Kovan-v1

tToken

  • tFIL
    发行量:100,000
    symbol:tFIL
    name:tFIL
  • tXTZ
    发行量:500,000
    symbol:tXTZ
    name:tXTZ

Liquidity


API Description

NETWORK

  • kovan
  • mainnet
  • bsc

USER

  • 0xd8c4e4674A0Fd739333159C4Fab24B028A2f434d

TIMESTAMP

  • startTimeStamp
  • endTimeStamp

BASE URL:

  • checkUserSource

https://app.liqee.io/getData/?platforms=Liqee&network={NETWORK}&from={TIMESTAMP}&to={TIMESTAMP}

response:
{
    "liqee":
        {
            "address": "0xdFe89CAF65862c5B46FA22e8fA2296e05BfCBF94",
            "operation": "Supply",
            "source": "web",
            "timestamp": "2021-08-30 10:11:32",
            "token": "0xB5102CeE1528Ce2C760893034A4603663495fD72",
            "value": 2708.4704572954124
        }
}
  • updateUserSource <>(method = "POST")

https://app.liqee.io/update/

parameters:
{
    "sources": "liqee",
    "operation": "supply",
    "platforms": "Liqee",
    "address": "0xd8c4e4674A0Fd739333159C4Fab24B028A2f434d",
    "network": "kovan",
    "token": "usx",
    "decimal": 18,
    "price": 1000000000000000000,
    "value": 123
}

success response
{
    "code": "0",
    "status": "Successful data insertion"
}

PATH

  • markets

https://app.liqee.io/pos/markets?network={NETWORK}

response:
{
    "supplyMarkets":[{
        "symbol": "iBUSD",
        "name": "dForce BUSD",
        "underlying_symbol": "BUSD",
        "decimals": "18",
        "address": "0x5511b64Ae77452C7130670C79298DEC978204a47",
        "supplyAPY": "0",
        "borrowAPY": "11006611770092223",
        "cash": "952879321925223294956952",
        "supplyValue": "1660735130520729016979459",
        "borrowValue": "710197810083155701055949"
    }],
    "mintMarkets":[{
        "symbol": "iMUSX",
        "name": "dForce USD",
        "underlying_symbol": "USX",
        "decimals": "18",
        "address": "0x36f4C36D1F6e8418Ecb2402F896B2A8fEDdE0991",
        "supplyAPY": "0",
        "borrowAPY": "30000000003489108",
        "cash": "0",
        "supplyValue": "0"
    }],
    "underlyingToken":[{
        "underlying": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
        "symbol": "BUSD",
        "price": "1000157630000000000",
        "priceStatus": "true"
    }],
    "totalSupplyValue": "20705384365443991577534855",
    "totalBorrowsValue": "3061906536013724871248720",
    "totalMintValue": "1536353211879959304383056"
}
  • distribution

https://app.liqee.io/liqee/distribution?network={NETWORK}

{
    "supplyMaining": [
        {
            "dailyDistribution": {
                "0x370390b024146e53dd1490928d4a3a9a837d7727": "0",
                "0x79E40d67DA6eAE5eB4A93Fc6a56A7961625E15F3": "108000000000000000000000",
                "0xe73A9e37c2bAbe188231694ac98906FA1F0354DF": "21600000000000000000000"
            },
            "rewardBorrowApy": {
                "0x370390b024146e53dd1490928d4a3a9a837d7727": "0",
                "0x79E40d67DA6eAE5eB4A93Fc6a56A7961625E15F3": "294799001787248934912",
                "0xe73A9e37c2bAbe188231694ac98906FA1F0354DF": "630092409510400221973"
            },
            "rewardSupplyApy": {
                "0x370390b024146e53dd1490928d4a3a9a837d7727": "0",
                "0x79E40d67DA6eAE5eB4A93Fc6a56A7961625E15F3": "0",
                "0xe73A9e37c2bAbe188231694ac98906FA1F0354DF": "0"
            },
            "totalDistributed": {
                "0x370390b024146e53dd1490928d4a3a9a837d7727": "0",
                "0x79E40d67DA6eAE5eB4A93Fc6a56A7961625E15F3": "599685000000000000000000",
                "0xe73A9e37c2bAbe188231694ac98906FA1F0354DF": "120443000000000000000000"
            },
            "borrowApy": "0",
            "supplyApy": "0",
            "address": "0x66DF3ff1aBf2321B6Defc819076E1cEB15268756",
            "symbol": "qMUSX",
            "underlyingAddress": "0x4C93D8873eC2Be883F2751BE11A95f202c9cd4F8",
            "underlying_symbol": "USX"
        }
    
    ],
    "mintMaining": [...],
    "totalDaily": {
        "0x370390b024146e53dd1490928d4a3a9a837d7727": "1080000000000000000000000",
        "0x79E40d67DA6eAE5eB4A93Fc6a56A7961625E15F3": "108000000000000000000000",
        "0xe73A9e37c2bAbe188231694ac98906FA1F0354DF": "194400000000000000000000"
    },
    "totalDistributed": {
        "0x370390b024146e53dd1490928d4a3a9a837d7727": "1120650000000000000000000",
        "0x79E40d67DA6eAE5eB4A93Fc6a56A7961625E15F3": "599685000000000000000000",
        "0xe73A9e37c2bAbe188231694ac98906FA1F0354DF": "1083987000000000000000000"
    }
    "rewardTokenDecimals": {
        "0x370390b024146e53dd1490928d4a3a9a837d7727": "18",
        "0x79E40d67DA6eAE5eB4A93Fc6a56A7961625E15F3": "18",
        "0xe73A9e37c2bAbe188231694ac98906FA1F0354DF": "18"
    },
    "rewardTokenSymbol": {
        "0x370390b024146e53dd1490928d4a3a9a837d7727": "LQE",
        "0x79E40d67DA6eAE5eB4A93Fc6a56A7961625E15F3": "DF",
        "0xe73A9e37c2bAbe188231694ac98906FA1F0354DF": "FIS"
    }
}
  • response:

https://app.liqee.io/pos/liquidation?network={NETWORK}

response:
[
    {
        "euqity": "0",
        "shortfall": "22348302210860838392330",
        "supplyValue": "31845730987839905623604",
        "collateralValue": "26274906095184406946706",
        "borrowedValue": "43368227087008363949695",
        "sumCollateral": "21019924876147525557365",
        "sumBorrowed": "43368227087008363949695",
        "collateralRatio": "484684901551910001",
        "userAddress": "0xA13f7166caDd3BD2704e3146E97dA2CcBe426b82"
    }
]
  • assets

https://app.liqee.io/pos/assets?network={NETWORK}

response:
{
    "0x2f956b2f801c6dad74E87E7f45c94f6283BF0f45": {
        "borrowIndex": "1000000000000000000",
        "decimals": "18",
        "supplyCapacity": "5000000000000000000000",
        "cash": "0",
        "symbol": "iMxETH",
        "controller": "0x8B53Ab2c0Df3230EA327017C91Eb909f815Ad113",
        "accrualBlockNumber": "12517414",
        "redeemPaused": "false",
        "reserveRatio": "0",
        "underlying_symbol": "xETH",
        "address": "0x028DB7A9d133301bD49f27b5E41F83F56aB0FaA6",
        "borrowCapacity": "0",
        "borrowFactor": "1000000000000000000",
        "price": "2694952770870000000000",
        "totalBorrows": "50000000000000000000",
        "distribution": "{\"asset\":\"0x028DB7A9d133301bD49f27b5E41F83F56aB0FaA6\",\"supplyDistributed\":\"0\",\"borrowDistributed\":\"0\",\"borrowSpeed\":\"0\",\"supplySpeed\":\"0\",\"distributionBlock\":\"0\"}",
        "flashloanFeeRatio": "800000000000000",
        "name": "dForce ETH",
        "totalSupply": "0",
        "underlying": "0x8d2Cb35893C01fa8B564c84Bd540c5109d9D278e",
        "totalReserves": "0",
        "isiToken": "false",
        "underlying_name": "dForce ETH",
        "protocolFeeRatio": "250000000000000000",
        "collateralFactor": "700000000000000000",
        "borrowRatePerBlock": "0",
        "mintPaused": "false",
        "borrowPaused": "false",
        "priceStatus": "true",
        "supplyRatePerBlock": "0",
        "interestRateModel": "0x786846D89736A5729e6A223F124bbB2377a8D337"
    }
}
  • user

https://app.liqee.io/pos/users?address={ADDRESS}&network=NETWORK

response:
[
    {
        "0x390bf37355e9dF6Ea2e16eEd5686886Da6F47669": {
            "balanceOf": "0",
            "exchangeRate": "1000000018035878611",
            "earned": "0",
            "principal": "0",
            "interestIndex": "0",
            "accrued": "0",
            "asCollateral": false
        }
    }
]
  • interest history

TYPE = [borrow, supply]
https://app.liqee.io/pos/chart?network={NETWORK}&asset={ADDRESS}&type={TYPE}

response:
[
    {
		"apy": "0",
		"timeStamp": "1622911808"
	}
]
  • liquidation history

https://app.liqee.io/pos/liquidationHastory?network={NETWORK}

response:
[
    {
		"0xe9a7faf07a85e9278a0da077aa8c71605896fc3846892a6b4a130cd2c432308f": {
			"transactionHash": "0xe9a7faf07a85e9278a0da077aa8c71605896fc3846892a6b4a130cd2c432308f",
			"logIndex": 259,
			"liquidator": "0x6e1C24586d0DFEB608E0442a8A1Ce772afEC03a6",
			"borrower": "0x1266F32eBb3725D6C9aC4240b18f8dCaDba58FFE",
			"repayAmount": "13550806285",
			"iTokenCollateral": "0x5812fCF91adc502a765E5707eBB3F36a07f63c02",
			"seizeTokens": "27132419",
			"timeStamp": "1622893933",
			"iTokenRepay": "0x2f956b2f801c6dad74E87E7f45c94f6283BF0f45"
		}
	},
]
  • all topics

https://app.liqee.io/pos/topics?network={NETWORK}

response:
{
	"topics": {
		"BorrowPaused": "0xa501bd5ac3de9924ce0c13576750267130fd835780f1ec6e1ae9fb13ee746503",
	},
	"allParameter": {
		"BorrowPaused": [
			"iToken",
			"paused"
		],
	},
	"allInput": {
		BorrowPaused": [
			{
				"indexed": false,
				"internalType": "address",
				"name": "iToken",
				"type": "address"
			},
		]
	}
}
  • distribution

https://app.liqee.io/liqee/userReward?network={NETWORK}&user={address}

response:
{
    "0x370390b024146e53dd1490928d4a3a9a837d7727": 39.44667011038953,
    "0x4A9A2b2b04549C3927dd2c9668A5eF3fCA473623": 7.889633109987864
}

Product Design

pool settings

  • ETH/ATOM/FIL can not be as collateral
  • rETH/rATOM/rFIL can not be borrowed
  • mint USX/EUX
  • consider rETH/ETH lp token as collateral

lending mining for different rewards asset

  • create different RewardDistributor for different asset distribution
  • everytime, start a new distribution, deploy a new contract and replace the old one, that means every RewardDistributor starting as beginning.
  • after claiming peroid, old one deprecated.
  • Note: after replace rewardDistribution contract, the old one must not allow to claim anymore.
  • use RewardCashier contract to manage all RewardDistributors of lending pool

liquidity mining for two rewards asset

  • deposit lp to dForce liquidity mining pool
  • transmit lp to third-party liquidity mining pool
  • claim two rewards in the same tx
  • unified solution refer to dodo mining contract

web issues

  • standalone portal in menu ? say PoS pool.
  • staking yield instead of depositing yield (staking asset is not allowed to borrow)
  • deposit as collateral for PoS asset, normal deposit for underlying asset