Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions auto-qa/tests/flm-config.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ADDRESS_RE = /^0x[a-fA-F0-9]{40}$/;
const optionalAddress = (value) => value === '' || ADDRESS_RE.test(value);
const bySlug = Object.fromEntries(flmConfig.map((config) => [config.slug, config]));

test('FLM config pins Kleros and Gnosis organization routes', () => {
test('liquidity manager config pins Kleros and Gnosis organization routes', () => {
assert.deepEqual(Object.keys(bySlug).sort(), ['gnosis', 'kleros']);

assert.equal(bySlug.kleros.path, '/flm/kleros');
Expand All @@ -24,7 +24,7 @@ test('FLM config pins Kleros and Gnosis organization routes', () => {
assert.equal(bySlug.gnosis.companyId, 9);
});

test('FLM proposal metadata keeps the current official markets discoverable', () => {
test('liquidity manager proposal metadata keeps the current official markets discoverable', () => {
assert.equal(bySlug.kleros.activeProposal.label, 'KIP-90');
assert.equal(bySlug.kleros.activeProposal.marketAddress, '0x84412Fe9D088C1D8Dd676a7be9a3d5d0291Ab1Cf');
assert.equal(
Expand All @@ -42,7 +42,7 @@ test('FLM proposal metadata keeps the current official markets discoverable', ()
assert.equal(bySlug.gnosis.activeProposal.marketUrl, '/markets/0xeCe80208CB8376Be311cE0f5Ea4eF73850a0dcF0');
});

test('FLM token and contract fields use valid address shapes', () => {
test('liquidity manager token and contract fields use valid address shapes', () => {
for (const config of flmConfig) {
assert.equal(config.chainId, 100);
assert.match(config.token.address, ADDRESS_RE);
Expand All @@ -53,7 +53,7 @@ test('FLM token and contract fields use valid address shapes', () => {
}
});

test('FLM helpers pin Swapr adapter calldata and manager overloads', async () => {
test('liquidity manager helpers pin Swapr adapter calldata and manager overloads', async () => {
const utilsSource = await readFile(resolve(root, 'src/utils/flm.js'), 'utf8');
const pageSource = await readFile(resolve(root, 'src/pages/flm/[org].jsx'), 'utf8');

Expand All @@ -69,7 +69,7 @@ test('FLM helpers pin Swapr adapter calldata and manager overloads', async () =>
assert.match(pageSource, /encodeDualExitParams\(yesExitData, noExitData\)/);
});

test('companies table links configured organizations to their FLM page', async () => {
test('companies table links configured organizations to their liquidity page', async () => {
const hookSource = await readFile(resolve(root, 'src/hooks/useAggregatorCompanies.js'), 'utf8');
const rowSource = await readFile(resolve(root, 'src/components/futarchyFi/companyList/table/OrgRow.jsx'), 'utf8');

Expand Down
8 changes: 4 additions & 4 deletions auto-qa/tests/market-creation-workflow.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const {

const NOW = 1_782_777_600;

test('Kleros defaults use KIP, PNK, sDAI, and FLM liquidity', () => {
test('Kleros defaults use KIP, PNK, sDAI, and liquidity manager liquidity', () => {
const defaults = createMarketWizardDefaults({ organizationId: 'kleros', nowSeconds: NOW });

assert.equal(defaults.organizationName, 'Kleros DAO');
Expand Down Expand Up @@ -81,7 +81,7 @@ test('metadata draft includes registry fields needed by market pages and proposa
);
});

test('permissionless stack plan includes org listing, owner proposals, and default FLM', () => {
test('permissionless stack plan includes org listing, owner proposals, and default liquidity manager', () => {
const plan = buildPermissionlessStackPlan();
const stageIds = plan.stages.map((stage) => stage.id);

Expand All @@ -94,7 +94,7 @@ test('permissionless stack plan includes org listing, owner proposals, and defau
assert.equal(plan.values.chainId, 10200);
});

test('permissionless contract actions create FLM before default organization wiring', () => {
test('permissionless contract actions create liquidity manager before default organization wiring', () => {
const plan = buildPermissionlessStackPlan();
const actions = plan.contractActions;
const actionIds = actions.map((action) => action.id);
Expand All @@ -110,7 +110,7 @@ test('permissionless contract actions create FLM before default organization wir
assert.ok(actionIds.indexOf('create-default-flm-bundle') < actionIds.indexOf('create-and-list-organization'));
});

test('one-step market contract actions order market, FLM, official proposal, liquidity, and Snapshot', () => {
test('one-step market contract actions order market, liquidity manager, official proposal, liquidity, and Snapshot', () => {
const plan = buildOneStepMarketPlan({ organizationId: 'kleros', nowSeconds: NOW });
const actions = plan.contractActions;
const actionIds = actions.map((action) => action.id);
Expand Down
6 changes: 3 additions & 3 deletions src/components/futarchyFi/companyList/table/OrgRow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ChainBadge from '../components/ChainBadge';

/**
* Single row in the Organizations table
* Displays: Logo | Name + Active Badge | Active | Proposals | Chain
* Displays: Logo | Name + Active Badge | Active | Proposals | Chain | Liquidity
*/
const OrgRow = ({
companyID,
Expand Down Expand Up @@ -76,15 +76,15 @@ const OrgRow = ({
<ChainBadge chainId={chainId} size="sm" />
</td>

{/* FLM */}
{/* Liquidity */}
<td className="py-4 px-4">
{flmPath ? (
<Link
href={flmPath}
onClick={(event) => event.stopPropagation()}
className="inline-flex h-9 items-center gap-1 rounded-lg border border-futarchyGray5 bg-white px-3 text-sm font-semibold text-futarchyGray12 hover:bg-futarchyGray3"
>
<span>FLM</span>
<span>Liquidity</span>
<ArrowTopRightOnSquareIcon className="h-4 w-4" />
</Link>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const OrganizationsTable = ({
Chain
</th>
<th className="py-3 px-4 text-xs font-medium text-futarchyGray11 dark:text-futarchyGray112 uppercase tracking-wider">
FLM
Liquidity
</th>
</tr>
</thead>
Expand Down
10 changes: 7 additions & 3 deletions src/components/futarchyFi/createMarket/CreateMarketFlow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ function formatDate(timestamp) {
return new Date(Number(timestamp) * 1000).toISOString().replace('T', ' ').slice(0, 16) + ' UTC';
}

function formatLiquidityMode(mode) {
return mode === 'flm' ? 'Liquidity manager' : String(mode || '').toUpperCase();
}

function StageList({ stages }) {
return (
<ol className="divide-y divide-futarchyGray5 dark:divide-futarchyGray7">
Expand Down Expand Up @@ -120,7 +124,7 @@ export default function CreateMarketFlow() {
<h1 className="text-2xl font-semibold text-futarchyGray12 dark:text-white">Create Market</h1>
<p className="mt-2 max-w-3xl text-sm text-futarchyGray11 dark:text-futarchyGray11">
A single operational flow for organization setup, proposal metadata, market creation,
FLM liquidity, Snapshot linking, candle readiness, arbitrage setup, and publishing.
liquidity manager setup, Snapshot linking, candle readiness, arbitrage setup, and publishing.
</p>
</div>
<Link
Expand All @@ -136,7 +140,7 @@ export default function CreateMarketFlow() {
<h2 className="text-lg font-semibold text-futarchyGray12 dark:text-white">Permissionless Chiado Stack</h2>
<p className="mt-1 text-sm text-futarchyGray11">
This is the target testnet lifecycle: any wallet creates an organization, it is listed
automatically, and the organization receives a default FLM for proposal liquidity.
automatically, and the organization receives a default liquidity manager for proposal liquidity.
</p>
</div>
<StageList stages={permissionlessPlan.stages} />
Expand Down Expand Up @@ -248,7 +252,7 @@ export default function CreateMarketFlow() {
<div className="mt-2 grid gap-2 text-xs text-futarchyGray10 md:grid-cols-3">
<span>Org: {marketPlan.values.organizationName}</span>
<span>Close: {formatDate(marketPlan.values.closeTimestamp)}</span>
<span>Liquidity: {marketPlan.values.initialLiquidityMode.toUpperCase()}</span>
<span>Liquidity: {formatLiquidityMode(marketPlan.values.initialLiquidityMode)}</span>
</div>
</div>
<StageList stages={marketPlan.stages} />
Expand Down
38 changes: 19 additions & 19 deletions src/features/marketCreation/marketCreationWorkflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ export const MARKET_CREATION_STAGES = [
},
{
id: 'liquidity',
title: 'Liquidity and FLM',
summary: 'Create or reuse the organization FLM, add initial liquidity, and set the official proposal.',
requiredEvidence: ['flmAddress', 'liquidityTxHash', 'officialProposalSet'],
title: 'Liquidity Manager',
summary: 'Create or reuse the organization liquidity manager, add initial liquidity, and set the official proposal.',
requiredEvidence: ['liquidityManagerAddress', 'liquidityTxHash', 'officialProposalSet'],
},
{
id: 'snapshot',
Expand All @@ -114,8 +114,8 @@ export const MARKET_CREATION_STAGES = [
{
id: 'publish',
title: 'Publish',
summary: 'Expose the market and FLM links on the company page after all checks pass.',
requiredEvidence: ['companyPageLink', 'marketUrl', 'flmUrl'],
summary: 'Expose the market and liquidity manager links on the company page after all checks pass.',
requiredEvidence: ['companyPageLink', 'marketUrl', 'liquidityManagerUrl'],
dependsOn: ['snapshot', 'indexing'],
},
];
Expand All @@ -124,18 +124,18 @@ export const PERMISSIONLESS_STACK_STAGES = [
{
id: 'deploy-stack',
title: 'Deploy permissionless stack',
summary: 'Deploy metadata implementations, public aggregator, market factory, Snapshot linker, indexer hooks, and FLM factory on Chiado.',
summary: 'Deploy metadata implementations, public aggregator, market factory, Snapshot linker, indexer hooks, and liquidity manager factory on Chiado.',
},
{
id: 'default-flm',
title: 'Create default FLM bundle',
summary: 'Create the proposal source, pool adapters, and default FLM bundle that will be attached to the organization.',
title: 'Create default liquidity manager',
summary: 'Create the proposal source, pool adapters, and default liquidity manager that will be attached to the organization.',
dependsOn: ['deploy-stack'],
},
{
id: 'create-organization',
title: 'Create organization',
summary: 'Any wallet can create organization metadata with default FLM wiring; the creator becomes organization owner.',
summary: 'Any wallet can create organization metadata with default liquidity manager wiring; the creator becomes organization owner.',
dependsOn: ['default-flm'],
},
{
Expand All @@ -147,7 +147,7 @@ export const PERMISSIONLESS_STACK_STAGES = [
{
id: 'owner-proposal',
title: 'Owner creates proposal',
summary: 'The organization owner can create proposals and point the FLM at the official proposal.',
summary: 'The organization owner can create proposals and point the liquidity manager at the official proposal.',
dependsOn: ['list-organization'],
},
];
Expand Down Expand Up @@ -190,7 +190,7 @@ export const PERMISSIONLESS_STACK_CONTRACT_ACTIONS = [
source: 'futarchy-liquidity-manager/src/factories/FutarchyLiquidityManagerFactory.sol',
contract: 'FutarchyLiquidityManagerFactory',
method: 'createLiquidityManager',
summary: 'Deploy proposal source, spot adapter, conditional adapter, and default organization FLM.',
summary: 'Deploy proposal source, spot adapter, conditional adapter, and default organization liquidity manager.',
produces: ['proposalSource', 'spotAdapter', 'conditionalAdapter', 'manager'],
inputs: ['CreateParams.owner', 'CreateParams.proposalManager', 'CreateParams.companyToken', 'CreateParams.officialProposer'],
dependsOn: ['deploy-permissionless-registry'],
Expand All @@ -202,7 +202,7 @@ export const PERMISSIONLESS_STACK_CONTRACT_ACTIONS = [
source: 'futarchy/src/registry/FutarchyAggregatorsMetadata.sol',
contract: 'FutarchyAggregatorsMetadata',
method: 'createAndAddOrganizationMetadataWithDefaultLiquidityManager',
summary: 'Create organization metadata, attach the FLM/proposal source, and add it to the aggregator in one call.',
summary: 'Create organization metadata, attach the liquidity manager/proposal source, and add it to the aggregator in one call.',
produces: ['organizationMetadata'],
inputs: ['companyName', 'description', 'metadata', 'metadataURI', 'manager', 'proposalSource', 'liquidityManagerMetadataURI'],
dependsOn: ['create-default-flm-bundle'],
Expand Down Expand Up @@ -237,7 +237,7 @@ export const PERMISSIONLESS_STACK_CONTRACT_ACTIONS = [
source: 'futarchy-liquidity-manager/src/sources/FutarchyOfficialProposalSource.sol',
contract: 'FutarchyOfficialProposalSource',
method: 'setOfficialProposal',
summary: 'Point the default FLM proposal source at the active proposal once the proposal address is known.',
summary: 'Point the default liquidity manager proposal source at the active proposal once the proposal address is known.',
produces: ['officialProposal'],
inputs: ['proposalId', 'proposalAddress', 'creator'],
dependsOn: ['owner-create-proposal-metadata', 'create-default-flm-bundle'],
Expand Down Expand Up @@ -286,7 +286,7 @@ export const ONE_STEP_MARKET_CONTRACT_ACTIONS = [
source: 'futarchy-liquidity-manager/src/factories/FutarchyLiquidityManagerFactory.sol',
contract: 'FutarchyLiquidityManagerFactory',
method: 'createLiquidityManager',
summary: 'Create or reuse the organization FLM bundle for this token pair.',
summary: 'Create or reuse the organization liquidity manager bundle for this token pair.',
produces: ['proposalSource', 'spotAdapter', 'conditionalAdapter', 'manager'],
inputs: ['CreateParams.organization', 'CreateParams.owner', 'CreateParams.companyToken', 'CreateParams.officialProposer'],
dependsOn: ['create-futarchy-proposal'],
Expand All @@ -298,7 +298,7 @@ export const ONE_STEP_MARKET_CONTRACT_ACTIONS = [
source: 'futarchy/src/registry/FutarchyOrganizationMetadata.sol',
contract: 'FutarchyOrganizationMetadata',
method: 'setDefaultLiquidityManager',
summary: 'Store the FLM and proposal source as the organization default used by market pages.',
summary: 'Store the liquidity manager and proposal source as the organization default used by market pages.',
produces: ['defaultLiquidityManager'],
inputs: ['manager', 'proposalSource', 'liquidityManagerMetadataURI'],
dependsOn: ['create-flm-bundle'],
Expand All @@ -310,7 +310,7 @@ export const ONE_STEP_MARKET_CONTRACT_ACTIONS = [
source: 'futarchy-liquidity-manager/src/sources/FutarchyOfficialProposalSource.sol',
contract: 'FutarchyOfficialProposalSource',
method: 'setOfficialProposal',
summary: 'Point the FLM proposal source at the newly created proposal before public Snapshot routing.',
summary: 'Point the liquidity manager proposal source at the newly created proposal before public Snapshot routing.',
produces: ['officialProposal'],
inputs: ['proposalId', 'proposalAddress', 'creator'],
dependsOn: ['create-futarchy-proposal', 'create-flm-bundle'],
Expand All @@ -322,8 +322,8 @@ export const ONE_STEP_MARKET_CONTRACT_ACTIONS = [
source: 'futarchy-liquidity-manager/src/core/FutarchyLiquidityManager.sol',
contract: 'FutarchyLiquidityManager',
method: 'initializeFromBootstrap',
summary: 'Seed spot liquidity through the FLM before Snapshot sends users to the market.',
produces: ['flmAddress', 'liquidityTxHash'],
summary: 'Seed spot liquidity through the liquidity manager before Snapshot sends users to the market.',
produces: ['liquidityManagerAddress', 'liquidityTxHash'],
inputs: ['companyAmount', 'spotAddData'],
dependsOn: ['store-default-flm', 'set-official-proposal'],
},
Expand Down Expand Up @@ -369,7 +369,7 @@ export const ONE_STEP_MARKET_CONTRACT_ACTIONS = [
contract: 'CompanyMarketRegistry',
method: 'publish',
summary: 'Expose the market on the company page once Snapshot, candles, metadata, and liquidity are ready.',
produces: ['companyPageLink', 'marketUrl', 'flmUrl'],
produces: ['companyPageLink', 'marketUrl', 'liquidityManagerUrl'],
dependsOn: ['link-snapshot-proposal', 'verify-registry-and-candles', 'configure-arbitrage'],
},
];
Expand Down
Loading
Loading