mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
change weights (#169)
* change weights * new defaults * your liquidity fix Co-authored-by: Matthias Kretschmann <m@kretschmann.io>
This commit is contained in:
parent
551f4ab7ee
commit
290e43199c
@ -73,7 +73,7 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
|
||||
const totalLiquidityInOcean = price?.ocean + price?.datatoken * price?.value
|
||||
|
||||
useEffect(() => {
|
||||
if (!ocean || !accountId || !price || !price.value) return
|
||||
if (!ocean || !accountId || !price) return
|
||||
|
||||
async function init() {
|
||||
try {
|
||||
|
@ -42,6 +42,8 @@ export default function Dynamic({
|
||||
|
||||
// Calculate firstPrice whenever user values change
|
||||
useEffect(() => {
|
||||
if (`${oceanAmount}` === '') return
|
||||
|
||||
const tokenAmountOut = 1
|
||||
const weightRatio = new Decimal(weightOnDataToken).div(
|
||||
new Decimal(weightOnOcean)
|
||||
|
@ -22,9 +22,9 @@ export const validationSchema = Yup.object().shape<PriceOptionsMarket>({
|
||||
export const initialValues: PriceOptionsMarket = {
|
||||
price: 1,
|
||||
type: 'dynamic',
|
||||
dtAmount: 9,
|
||||
oceanAmount: 1,
|
||||
weightOnOcean: '1', // 10% on OCEAN
|
||||
weightOnDataToken: '9', // 90% on datatoken
|
||||
dtAmount: 10,
|
||||
oceanAmount: 10,
|
||||
weightOnOcean: '5', // 50% on OCEAN
|
||||
weightOnDataToken: '5', // 50% on datatoken
|
||||
swapFee: 0.1 // in %
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user