Coder Social home page Coder Social logo

comdex-official / comdex Goto Github PK

View Code? Open in Web Editor NEW
77.0 7.0 62.0 54.73 MB

Comdex: A DeFi infrastructure layer for the Cosmos ecosystem

Home Page: https://comdex.one/

License: Other

Makefile 0.17% Go 98.89% Shell 0.11% Python 0.80% Dockerfile 0.04%
cosmos-sdk blockchain cryptocurrency synthetics golang borrowing lending commodo composite cmst

comdex's Issues

Locker testing

Locker deposit testing
Locker rewards accumulation testing
Locker Mapping Lookup table data testing
Withdrawing rewards from the locker
Matching numbers
Reviewing changes in collector values as a reward is distributed. (change will occur per block)
Match all the numbers (when testing locker n collector data, dont create new vaults after checking , else numbers will not match , do the lcoker testing after creating 2-3 vaults to get idea of the numbers )

Duplicate Asset name allowed

Duplicate asset name shouldnt be allowed
function : assetKeeper.AddAssetRecords(*ctx, tc.msg)
data :
{"Add Asset cmdx ucmdx",
assetTypes.Asset{Name: "CMDX",
Denom: "ucmdx",
Decimals: 1000000,
IsOnChain: true},
false,
},
{"Add Asset: Duplicate Asset Name 2 cmdx uosmo",
assetTypes.Asset{Name: "CMDX",
Denom: "uosmo",
Decimals: 1000000,
IsOnChain: true},
true,
},

Asset doesn't exist but app gets added still

error : Asset ID 4 doesnt exist but able to add it in mint genesis token
function :
assetKeeper.AddAppRecords(*ctx, tc.msg)

data :

{
"Add App commodo commodo",
assetTypes.AppData{
Name: "sake",
ShortName: "sake",
MinGovDeposit: sdk.NewIntFromUint64(10000000),
GovTimeInSeconds: 900,
GenesisToken: []assetTypes.MintGenesisToken{
{
4,
&genesisSupply,
true,
userAddress1,
},
},
},
3,
false,
},

Able to create extended pair vault with duplicate pair ID

function :
WasmAddExtendedPairsVaultRecords

data :

{"Add Extended Pair Vault : cmdx cmst",

		bindings.MsgAddExtendedPairsVault{
			AppID:               1,
			PairID:              1,
			StabilityFee:        sdk.MustNewDecFromStr("0.01"),
			ClosingFee:          sdk.MustNewDecFromStr("0"),
			LiquidationPenalty:  sdk.MustNewDecFromStr("0.12"),
			DrawDownFee:         sdk.MustNewDecFromStr("0.01"),
			IsVaultActive:       true,
			DebtCeiling:         1000000000000,
			DebtFloor:           1000000,
			IsStableMintVault:   false,
			MinCr:               sdk.MustNewDecFromStr("1.5"),
			PairName:            "CMDX-A",
			AssetOutOraclePrice: true,
			AssetOutPrice:       1000000,
			MinUsdValueLeft:     1000000,
		},
		"ucmdx",
		"ucmst",
		false,
		1,
	},
	{"Add  Extended Pair Vault : Duplicate PairID cmdx cmst",

		bindings.MsgAddExtendedPairsVault{
			AppID:               1,
			PairID:              1,
			StabilityFee:        sdk.MustNewDecFromStr("0.01"),
			ClosingFee:          sdk.MustNewDecFromStr("0"),
			LiquidationPenalty:  sdk.MustNewDecFromStr("0.12"),
			DrawDownFee:         sdk.MustNewDecFromStr("0.01"),
			IsVaultActive:       true,
			DebtCeiling:         1000000000000,
			DebtFloor:           1000000,
			IsStableMintVault:   false,
			MinCr:               sdk.MustNewDecFromStr("1.5"),
			PairName:            "CMDX-A",
			AssetOutOraclePrice: true,
			AssetOutPrice:       1000000,
			MinUsdValueLeft:     1000000,
		},

Asset query and KV store updation testing

Test it and post a list of all tx and query commands with their description. separately
Also, list all the gov commands of the module here. If they exist in the base proposal.

same asset can be added as genesis token in multiple apps

function : assetKeeper.AddAppRecords(*ctx, tc.msg)
error : same asset shouldnt be added as genesis token in multiple apps
data :

assetTypes.AppData{
Name: "cswap",
ShortName: "cswap",
MinGovDeposit: sdk.NewIntFromUint64(10000000),
GovTimeInSeconds: 900,
GenesisToken: []assetTypes.MintGenesisToken{
{
3,
&genesisSupply,
true,
userAddress1,
},
{
2,
&genesisSupply,
true,
userAddress1,
},
},
},

assetTypes.AppData{
Name: "commodo",
ShortName: "commodo",
MinGovDeposit: sdk.NewIntFromUint64(10000000),
GovTimeInSeconds: 900,
GenesisToken: []assetTypes.MintGenesisToken{
{
3,
&genesisSupply,
true,
userAddress1,
},
},
},

Add Slack app in repo

Hello.

We would like to get notifications of upcoming releases.

It would be a massive help if we could do it through Github's Slack integration.

Could you kindly install it?

Thank you

Creating Vault from CLI & validating data from front end

  1. Use the same user seeds to log in to the front end.
  2. Verify if it goes to the edit page in the front end or not
  3. Verify the total collateral locked in the dashboard
  4. Verify the ExtendedPairVault data in Vault Mapping
  5. Verify the collector, collections
  6. Verify the interest function (do the manual calculation as well to check)
  7. Check all related queries data
  8. Check all numbers of user balance n match it with existing vault data (numbers should add up)
  9. Check stability and draw down fees deductions

2 governance tokens for single app

function : assetKeeper.AddAppRecords(*ctx, tc.msg)
data :
assetTypes.AppData{
Name: "cswap",
ShortName: "cswap",
MinGovDeposit: sdk.NewIntFromUint64(10000000),
GovTimeInSeconds: 900,
GenesisToken: []assetTypes.MintGenesisToken{
{
3,
&genesisSupply,
true,
userAddress1,
},
{
2,
&genesisSupply,
true,
userAddress1,
},
},
},

Duplicate app name allowed

function : assetKeeper.AddAppRecords(*ctx, tc.msg)

data :
{
"Add App cswap cswap",
assetTypes.AppData{
Name: "cswap",
ShortName: "cswap",
MinGovDeposit: sdk.NewIntFromUint64(10000000),
GovTimeInSeconds: 900,
GenesisToken: []assetTypes.MintGenesisToken{
{
3,
&genesisSupply,
true,
userAddress1,
},
{
2,
&genesisSupply,
true,
userAddress1,
},
},
},
1,
false,
},
{
"Add Duplicate App name cswap werd",
assetTypes.AppData{
Name: "cswap",
ShortName: "werd",
MinGovDeposit: sdk.NewIntFromUint64(10000000),
GovTimeInSeconds: 900,
GenesisToken: []assetTypes.MintGenesisToken{
{
3,
&genesisSupply,
true,
userAddress1,
},
},
},
2,
true,
},

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.