Weekly update on development process (Oct 2, 2023)

Fairpool
2 min readOct 2, 2023

Fairpool is a DEX for personal tokens. Create your own token & receive royalties from trading volume. Increase volume by offering dividends / selling content for your token. Subscribe to our Telegram / Twitter to get notified about updates.

Weekly progress

  • ⚒ Worked on the code actions (faster way to write code).
  • ⚒ Worked on our decision-making system.

“Move definition” code action

This week, we were working on the “Move definition” code action for Lean language. It turned out to be a surprisingly non-trivial task. This is because a definition may depend on other definitions, and these dependencies are resolved through a system of namespaces, which is itself non-trivial.

In general, we’ve settled on the following approach:

  • Parse the source & target files.
  • Parse the dependents of the source file, filter those files that actually use the definition being moved.
  • Update the dependents:
  • > Add the import command for the target file
  • Change the name of the definition in the list of `source :: dependents`.
  • > Drop the beginning of the name according to the list of open namespaces.

The last step requires us to update all expressions where this name appears. This is a non-trivial task, since we must operate on syntax nodes, but we’re only left with expressions after the elaboration.

We see the following potential solutions:

  • Find the Syntax.ident nodes, update only them.
  • Update the resulting Expr’s, delaborate them down to Syntax, replace the old ranges with new Syntax.

We’ll try the first approach, and fall back to the second one if it doesn’t work.

Next week’s focus

  1. ⚒ Develop our decision-making system.

About Fairpool

Fairpool is a DEX for personal tokens. Create your own token & receive royalties from trading volume. Increase volume by offering dividends / selling content for your token. If you want to get notified about updates to our products, please follow our Telegram & Twitter.

Any questions? Reach out to us:

Website: fairpool.io

Telegram: @FairpoolDEX

Twitter: @FairpoolDEX

Anchor Podcasts: @FairpoolDEX

Medium: fairpool-dex.medium.com

$FAIR token: Uniswap

--

--

Fairpool

Fairpool is a DEX for personal tokens. Create your token & receive royalties from trading volume. Increase volume by offering dividends / selling content.