Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

WIP: Bonding Curve Contract #216

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
795eb57
add Burn and Update_metadata entrypoints to fa2_multi_nft_asset, Buil…
michaeljklein Dec 12, 2022
a06a8e6
add converter from constant/polynomial to piecewise, fix haskell bind…
michaeljklein Dec 14, 2022
db8282e
cleanup, use token_metadata map in bonding curve, send seller address…
michaeljklein Jan 4, 2023
d9717c6
update bonding curve readme including specification for burn entrypoi…
michaeljklein Jan 5, 2023
2e16430
make WRONG_TEZ_PRICE error verbose, log buySellTest storage and contr…
michaeljklein Jan 7, 2023
2448174
add new version of bonding curve with lambda instead of piecewise pol…
michaeljklein Jan 13, 2023
531066a
add nat_pow in ligo, add debug interface to test nat_pow, add binding…
michaeljklein Jan 18, 2023
a5d8c92
cleanup, fix nat_pow docstring, remove debug example formula contract…
michaeljklein Jan 18, 2023
9bcd5cc
WIP migrating haskell tests from piecewise to lambda contract, added …
michaeljklein Jan 19, 2023
fb50279
WIP: modify basis_points fee to be subtracted from sell price instead…
michaeljklein Jan 25, 2023
364cf70
add default entrypoint and make it add any received tez to the unclai…
michaeljklein Jan 26, 2023
a42ecb6
fixed lambda/piecwise difference in failing test, migrated the rest o…
michaeljklein Jan 27, 2023
278d81b
remove burn entrypoint symbol check from fa2_multi_nft_asset, update …
michaeljklein Feb 8, 2023
12edd1d
update bonding curve buy_offchain entrypoint to skip admin check (i.e…
michaeljklein Feb 10, 2023
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
546 changes: 546 additions & 0 deletions packages/minter-contracts/bin/bonding_curve.tz

Large diffs are not rendered by default.

653 changes: 653 additions & 0 deletions packages/minter-contracts/bin/bonding_curve_debug.tz

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ PUSH (lambda (pair nat nat) nat) { UNPAIR ; DUP ; DUG 2 ; PAIR ; PUSH nat 1 ; DIG 2 ; PAIR ; PAIR ; LEFT nat ; LOOP_LEFT { UNPAIR ; UNPAIR ; DIG 2 ; UNPAIR ; PUSH nat 0 ; DUP 3 ; COMPARE ; EQ ; IF { DROP 3 ; RIGHT (pair (pair nat nat) (pair nat nat)) } { PUSH nat 0 ; PUSH nat 1 ; DUP 4 ; AND ; COMPARE ; EQ ; IF { DIG 3 } { DUP ; DIG 4 ; MUL } ; SWAP ; DUP ; MUL ; PUSH nat 1 ; DIG 3 ; LSR ; SWAP ; PAIR ; SWAP ; DIG 2 ; PAIR ; PAIR ; LEFT nat } } } ; PAIR ; { UNPAIR ; SWAP ; PUSH mutez 1 ; PUSH nat 30000 ; DUP 3 ; COMPARE ; LT ; IF { DIG 2 ; DROP ; PUSH nat 3000 ; DIG 2 ; EDIV ; IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; CAR } { SWAP ; DUP ; DUG 2 ; PUSH nat 1000 ; PAIR ; DUP 4 ; SWAP ; EXEC ; DIG 2 ; PUSH nat 1001 ; PAIR ; DIG 3 ; SWAP ; EXEC ; EDIV ; IF_NONE { PUSH string "DIV by 0" ; FAILWITH } {} ; CAR ; PUSH nat 10 ; MUL } ; MUL } }
Loading