I hereby claim:
- I am danlessa on github.
- I am danlessa (https://keybase.io/danlessa) on keybase.
- I have a public key ASDeqKRSXRYCY79cmTtz829Ms0wZ6BbnZS8YRkcY2A2h1Ao
To claim this, I am signing this object:
| # 1) Types | |
| # Neuron Governance Types | |
| Weight = callable[[VotingPower], VotingPower] | |
| OracleFunction = callable[[UserUUID, ProjectUUID], VotingPower] | |
| VoteNeuron = tuple[OracleFunction, Weight] | |
| Aggregator = callable[[list[VotingPower]], Voting Power] | |
| UserAction = tuple[str, object] | |
| UserActions = dict[UserUUID, UserAction] |
| OracleFunction = callable[[UserUUID, ProjectUUID, VotingPower], VotingPower] | |
| WeightingFunction = callable[[VotingPower], VotingPower] | |
| Neuron = tuple[OracleFunction, WeightingFunction] | |
| LayerAggregator = callable[[list[VotingPower]], VotingPower] | |
| NeuronLayer = tuple[dict[str, Neuron], LayerAggregator] | |
| # Attribute Voting Power to a (user, project) tuple | |
| def user_project_vote_power(uid: UserUUID, | |
| pid: ProjectUUID, | |
| neuron_layers: list[NeuronLayer], |
| def query_user_quorum(user_id: UserUUID, | |
| max_quorum_size: int=5) -> list[UserUUID]: | |
| """ | |
| Retrieves the Actual Quorum for a given delegating user. | |
| Returns `None` if the User is not delegating. | |
| """ | |
| (action, payload) = USER_ACTIONS[user_id] | |
| actual_quorum = None | |
| if action == Action.Delegate: |
| did:3:kjzl6cwe1jw147ja5vzh9n36sxucppsuab0llr6fpip1dtj21cpywdmxoyqz2nj |
| # Based on https://hackmd.io/@markusbkoch/SyfNfQURw | |
| from math import sqrt | |
| def swap(y_1, Y_1, Y_2, sigma): | |
| y_2 = Y_2 * y_1 * (1 - sigma) | |
| y_2 /= Y_1 + 2 * y_1 * (1 - sigma) | |
| return y_2 | |
| def arbitrage(x_1, P_x, P_z, rho_1, sigma_x, sigma_z, c, K_x, K_z, g_x, g_z): |
| from math import sqrt | |
| def swap(x_1, P, K, sigma): | |
| X_1 = sqrt(P * K) | |
| X_2 = sqrt(K / P) | |
| y = X_2 * x_1 * (1 - sigma) | |
| y /= X_1 + 2 * x_1 * (1 - sigma) | |
| return y | |
| # Parameters for AMM 1 |
I hereby claim:
To claim this, I am signing this object:
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
| # |