Skip to content

Commit

Permalink
wip on 2 flap
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidmeister committed Sep 9, 2024
1 parent 2fead89 commit c6bbdf3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/volatile/double-flappy-token.rain
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ duration: sub(now() last-time),
epochs: div(duration time-per-epoch);

#amount-for-epoch
epoch:,
_: linear-growth(0 amount-per-epoch epoch);
epoch io:,
base-amount: linear-growth(0 amount-per-epoch epoch),
_: if(call<'amount-is-output>() base-amount mul(base-amount inv(io)));

#io-for-epoch
epoch:,
Expand All @@ -166,8 +167,9 @@ _: add(baseline above-baseline);
#calculate-io
using-words-from raindex-subparser
epoch:call<'get-epoch>(),
max-output: call<'amount-for-epoch>(epoch),
io: call<'io-for-epoch>(epoch),
max-output: call<'amount-for-epoch>(epoch io),
_: io,
:call<'set-last-trade>(io);

#handle-io
Expand Down

0 comments on commit c6bbdf3

Please sign in to comment.