-
Notifications
You must be signed in to change notification settings - Fork 67
Simple dex #612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Simple dex #612
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
c7c0e96
implementation sur course
fbielejec 71d9c48
swaps done
fbielejec 9f71ad0
add new role
fbielejec 79b9e0a
added events
fbielejec 974f056
wut
fbielejec ed2ad45
edited events
fbielejec 56a4b04
set AC
fbielejec 4476eaa
give why
fbielejec b12d883
docstring
fbielejec 23f0cf3
modified docstring
fbielejec 2012cfe
cleanup
fbielejec 3be6987
Update contracts/simple_dex/lib.rs
fbielejec 99952a4
simplified artihmetic
fbielejec e4d8211
moved roles to own mod
fbielejec 1e31342
wZERO
fbielejec 67cb4c8
dumbed down LP
fbielejec ff4e744
slippage check
fbielejec c2a36fc
check pool composition
fbielejec 71523bf
explicitely check swap fee value that is set
fbielejec be7a316
change parameter name to avoid confusion, use integer operations
fbielejec b70278c
not payabale
fbielejec 2c4213c
refactor
fbielejec d3fef1c
ok semver
fbielejec 7210d54
refactor role check
fbielejec e767379
remove duplicated check
fbielejec ab507bf
Update contracts/wrapped_azero/lib.rs
fbielejec bed038f
remove unused dep
fbielejec bb854e9
Merge branch 'benjamin' into simple-dex
fbielejec 00224a5
Update contracts/simple_dex/lib.rs
fbielejec 40a42de
Update contracts/simple_dex/lib.rs
fbielejec 65be1ac
added swap pairs
fbielejec 9a67828
edited docstring
fbielejec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
modified docstring
- Loading branch information
commit 23f0cf347086a4776aedea9d7ec6d4dc989f93f3
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -119,7 +119,6 @@ mod simple_dex { | |
| /// tracks pool shares per account | ||
| pub liquidity: Mapping<AccountId, u128>, | ||
| pub swap_fee: u128, | ||
|
||
| /// access control contract | ||
| pub access_control: AccountId, | ||
| pub ubik: AccountId, | ||
| pub cyberiad: AccountId, | ||
|
|
@@ -296,7 +295,7 @@ mod simple_dex { | |
| /// LP: single-asset native deposit | ||
| /// | ||
| /// Can be called only by an account carrying a LiquidityProvider role for this contract. | ||
| /// This account gets a number of (virtual) pools shares which can than be redeemed for the | ||
| /// This account gets a number of (virtual) pools shares which can than be redeemed back for the native asset using the withdrawal transaction | ||
| #[ink(message, payable)] | ||
| pub fn native_deposit(&mut self) -> Result<(), DexError> { | ||
| // calculates number of pool shares corresponding to a token deposit amount and current balance in the pool (assuming all other stay constant) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.