Skip to content

robertleifke/root-finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Root Finder

A simple implementation of a root finding algorithm Numo using the Newton-Raphson method. This was done to test out the Solstat library. Since Numo implements a time-dependent, non-linear trading function that must equal 0. We can quickly solve for liquidity L, the denominator that normalizes the reserves to ensure F(L) = 0.

A more through explanation of how Newton's method works can be found in my tweet.

Build

$ forge build

Test

$ forge test

Format

$ forge fmt

Gas Snapshots

$ forge snapshot

Anvil

$ anvil

Deploy

$ forge script script/deployRootFinder.s.sol:DeployRootFinder --rpc-url <YOUR_RPC_URL> --broadcast --private-key $PRIVATE_KEY

Cast

$ cast <subcommand>

About

Root finding algorithm for arbitraging Numo

Resources

Stars

Watchers

Forks

Packages

No packages published