ethereal-dex-tri -> lib.rs -> AUXILIARY adds #1
Open
alanci17 wants to merge 6 commits intoEtherealDAO:masterfrom
Open
ethereal-dex-tri -> lib.rs -> AUXILIARY adds #1alanci17 wants to merge 6 commits intoEtherealDAO:masterfrom
alanci17 wants to merge 6 commits intoEtherealDAO:masterfrom
Conversation
left undone REAL/EUXLP check in 'spot_price' fn
left undone REAL/EUXLP check in 'spot_price' fn
added fee on 'sim swap' method modified operator on 'in_given_price' method
1.0_Whitelisted tlp, exrd, xrd, eusd, real, euxlp at instantiation
(kinda raw tbf, it is what it is)
1.1_Modified 'deposit' method to avoid missing funds due to
potential Vaults overwriting
2.0_Added from treasury to aa treasury methods:
't_to_aat_some' to trans some or trans all,
't_to_aat_all' to trans all,
both restricted to alpha
zygomeb
reviewed
Oct 7, 2023
contracts/ethereal-delta/src/lib.rs
Outdated
| } | ||
|
|
||
| pub fn deposit(&mut self, input: Bucket) { | ||
| pub fn deposit(&mut self, input: Bucket) -> Option<Bucket> { |
Member
There was a problem hiding this comment.
changing this would break Alpha's assumptions lol
in general try not to change the behavior/signatures without verifying how the entire system depends on them
i.e. this function is meant to never fail and make a new resource vault if it doesn't exist
zygomeb
reviewed
Oct 7, 2023
|
|
||
| // todo move from treasury to aa treasury | ||
| // from treasury to aa treasury, take some or take all | ||
| pub fn t_to_aat_some(&mut self, a_real: Option<Decimal>, a_euxlp: Option<Decimal>) { |
Member
There was a problem hiding this comment.
Yes this is a nice addition thanks for filling it out
Author
|
So, maybe i'm wrong :), being technically a globalized component, a random
user/attacker could call the method and stake whatever asset he wants
within KeyValueStore?
…On Sat, 7 Oct 2023, 21:52 zygomeb, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In contracts/ethereal-delta/src/lib.rs
<#1 (comment)>
:
> @@ -83,12 +93,13 @@ mod delta {
self.power_delta.take_all()
}
- pub fn deposit(&mut self, input: Bucket) {
+ pub fn deposit(&mut self, input: Bucket) -> Option<Bucket> {
changing this would break Alpha's assumptions lol
in general try not to change the behavior/signatures without verifying how
the entire system depends on them
i.e. this function is meant to never fail and make a new resource vault if
it doesn't exist
—
Reply to this email directly, view it on GitHub
<#1 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBFRQRB3N2FBZM2UIZO72LX6GXGFAVCNFSM6AAAAAA5N23NPKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTMNRTGEYDGNBRGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Member
|
@alanci17 the deposit method is, well, a way to deposit into the treasury which itself is glad to take donations from just about anyone of any resource lol |
Author
|
Got it :). So, if i may ask, why the need to whitelist those specific
assets?
…On Sat, 7 Oct 2023, 22:10 zygomeb, ***@***.***> wrote:
@alanci17 <https://github.com/alanci17> the deposit method is, well, a
way to deposit into the treasury which itself is glad to take donations
from just about anyone of any resource lol
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXBFRQRYZBIYMUX3OT6LRU3X6GZNHAVCNFSM6AAAAAA5N23NPKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJRHAYDQMJYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Member
|
@alanci17 there's not really a whitelist (there used to be one in prior versions). the only reason why there's a mapping via KVS is for it to scale infinitely |
1_erased assets whitelisting process within instantiation function 2_restored original 'deposit' method (added semicolon on closure)
…der revisited
1_AUXILIARY (for interop)
1.0_Completed 'in_given_out' method, formula derived from
'internal_swap' method, possible negative/NaNs outcomes?
1.1_Completed 'sim_swap' method, replicated formula from
'internal_swap' method
2_Math operators execution order revisited (phantom overflow
paranoia)
2.0_On 'add_liquidity' method added a var ("let pool_ratio =
pool1 / pool2") and some parentheses to
rearrange math operators execution order
2.1_On 'internal_swap' methods added some parentheses to
rearrange math operators execution order
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.