acalanetwork / acala Goto Github PK
View Code? Open in Web Editor NEWAcala - cross-chain DeFi hub and stablecoin based on Substrate for Polkadot and Kusama.
Home Page: https://acala.network
License: GNU General Public License v3.0
Acala - cross-chain DeFi hub and stablecoin based on Substrate for Polkadot and Kusama.
Home Page: https://acala.network
License: GNU General Public License v3.0
FreeTransferCount
free transfer time for each accountLastFreeTransfers
for reaped accountLastFreeTransfers
, remove all the expired entries (value < now - FreeTransferPeriod
), return true and append now
to the list if entries count less than FreeTransferCount
otherwise return falseChargeTransactionPayment
in pallet-transaction-payment
moduletry_free_transfer
and skip the withdraw fee part if the call is currencies.transfer and user still have free transferpallet-contracts
CheckBlockGasLimit
for how to check call typetransaction_payment::ChargeTransactionPayment::from(tip)::compute_fee
to reduce copy & pasteUpdate runtime to use the new ChargeTransactionPayment
instead of the one in transaction payment module
We will still need additional requirements for an account to be able to make free transfer. This is still TBD.
paritytech/substrate#4820 is a major breaking change that is going to break all SDK, frontend and bots.
Upgrade procedure:
Preparation:
Update code:
Deploy:
We cannot mint ACA directly other than the case of debit auction.
So we need an ACA Treasury holding all the not yet released tokens, and rewards should be transferred from treasury.
Details TBD. Needs to match white paper.
Acala/modules/honzon/src/lib.rs
Line 73 in 79b93e9
unit of debit
should be AmountOf<T>
instead of DebitAmount
. User is passing how much aUSD to mint/burn not how much debit unit to mint/burn.
Setup build pipeline to build and publish docker images to DockerHub
Example: https://github.com/ETeissonniere/substrate-docker-builders
Version: 0.2.3-488aeec-x86_64-macos
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /Users/xiliangchen/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.43/src/backtrace/libunwind.rs:86
backtrace::backtrace::trace_unsynchronized
at /Users/xiliangchen/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.43/src/backtrace/mod.rs:66
1: backtrace::backtrace::trace
at /Users/xiliangchen/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.43/src/backtrace/mod.rs:53
2: backtrace::capture::Backtrace::create
at /Users/xiliangchen/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.43/src/capture.rs:164
3: backtrace::capture::Backtrace::new
at /Users/xiliangchen/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.43/src/capture.rs:128
4: sp_panic_handler::panic_hook
at /Users/xiliangchen/.cargo/git/checkouts/substrate-7e08433d4c370a21/f3742e7/primitives/panic-handler/src/lib.rs:148
5: sp_panic_handler::set::{{closure}}
at /Users/xiliangchen/.cargo/git/checkouts/substrate-7e08433d4c370a21/f3742e7/primitives/panic-handler/src/lib.rs:58
6: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
7: std::panicking::continue_panic_fmt
8: std::panicking::try::do_call
9: std::panicking::begin_panic
10: std::panicking::begin_panic
11: core::option::Option<T>::expect
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libcore/option.rs:345
12: sc_service::config::Configuration<G,E>::expect_database
at /Users/xiliangchen/.cargo/git/checkouts/substrate-7e08433d4c370a21/f3742e7/client/service/src/config.rs:255
13: sc_cli::params::PurgeChainCmd::run
at /Users/xiliangchen/.cargo/git/checkouts/substrate-7e08433d4c370a21/f3742e7/client/cli/src/params.rs:1128
14: sc_cli::params::Subcommand::run
at /Users/xiliangchen/.cargo/git/checkouts/substrate-7e08433d4c370a21/f3742e7/client/cli/src/params.rs:911
15: sc_cli::run_subcommand
at /Users/xiliangchen/.cargo/git/checkouts/substrate-7e08433d4c370a21/f3742e7/client/cli/src/lib.rs:263
16: acala::command::run
at src/command.rs:14
17: acala::main
at src/main.rs:22
18: std::rt::lang_start::{{closure}}
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
19: std::panicking::try::do_call
20: panic_unwind::dwarf::eh::read_encoded_pointer
21: std::panicking::update_count_then_panic
22: std::rt::lang_start
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14/src/libstd/rt.rs:61
23: acala::main
Thread 'main' panicked at 'database must be specified', src/libcore/option.rs:1185
Must be relates to paritytech/substrate#4849
module-airdrop
module-primitives
This is used to record airdropped token in Mandala testnet.
The values from this module will be used to generate genesis of Karura / Acala Mainnet.
Basic integration test setup
Acala/modules/vaults/src/lib.rs
Lines 18 to 39 in 2b8edf5
vaults的trait的中有两个handler都有各自的CurrencyId,vaults在调用DebitCurrency的函数时,要做两个CurrencyId的类型转化,避免传参类型错误 。vaults实现中是新增了一个CurrencyId 关联类型 , trait bond 中加上了 Into From 方便操作。
cdp_engine 要继承 vaults,auction_manager,三个模块里定义CurrencyIdOf 的来源handler都不一样
Acala/modules/auction_manager/src/lib.rs
Lines 24 to 30 in 2b8edf5
Acala/modules/cdp_engine/src/lib.rs
Lines 19 to 28 in 53f3a4f
如果按照vaults的实现来做,那也是挺麻烦的。 可以在通用trait MultiCurrency 的 CurrencyId 的trait bonds 中,加上From 吗, 同一个参数在不同handler之间传递时都先转成u8, 再into():
或者有什么更好的办法?
Add and configure following modules:
Add pallet-staking
and pallet-treasury
module and connects them.
Make burn rate for treasury zero.
Depends on open-web3-stack/open-runtime-module-library#62
Main use case is for ACA DEX that we need to ensure the ACA is vested & not staked before making the trade.
sentry_1 | ====================
sentry_1 |
sentry_1 | Version: 0.3.1-83c13dc-x86_64-linux-gnu
sentry_1 |
sentry_1 | 0: sp_panic_handler::set::{{closure}}
sentry_1 | 1: std::panicking::rust_panic_with_hook
sentry_1 | at src/libstd/panicking.rs:475
sentry_1 | 2: std::panicking::begin_panic
sentry_1 | 3: frame_executive::Executive<System,Block,Context,UnsignedValidator,AllModules>::execute_block
sentry_1 | 4: <acala_runtime::Runtime as sp_api::runtime_decl_for_Core::Core<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic<<pallet_indices::Module<acala_runtime::Runtime> as sp_runtime::traits::StaticLookup>::Source,acala_runtime::Call,sp_runtime::MultiSignature,(frame_system::CheckVersion<acala_runtime::Runtime>, frame_system::CheckGenesis<acala_runtime::Runtime>, frame_system::CheckEra<acala_runtime::Runtime>, frame_system::CheckNonce<acala_runtime::Runtime>, frame_system::CheckWeight<acala_runtime::Runtime>, orml_oracle::CheckOperator<acala_runtime::Runtime>, module_accounts::ChargeTransactionPayment<acala_runtime::Runtime>)>>>>::execute_block
sentry_1 | 5: sp_api::runtime_decl_for_Core::execute_block_native_call_generator::{{closure}}
sentry_1 | 6: std::panicking::try::do_call
sentry_1 | 7: __rust_maybe_catch_panic
sentry_1 | at src/libpanic_unwind/lib.rs:78
sentry_1 | 8: std::thread::local::LocalKey<T>::with
sentry_1 | 9: std::thread::local::LocalKey<T>::with
sentry_1 | 10: sp_state_machine::StateMachine<B,H,N,Exec>::execute_aux
sentry_1 | 11: sp_state_machine::StateMachine<B,H,N,Exec>::execute_using_consensus_failure_handler
sentry_1 | 12: <sc_client::call_executor::LocalCallExecutor<B,E> as sc_client_api::call_executor::CallExecutor<Block>>::contextual_call
sentry_1 | 13: <sc_client::client::Client<B,E,Block,RA> as sp_api::CallApiAt<Block>>::call_api_at
sentry_1 | 14: sp_api::runtime_decl_for_Core::execute_block_call_api_at
sentry_1 | 15: sp_api::Core::execute_block
sentry_1 | 16: <&sc_client::client::Client<B,E,Block,RA> as sp_consensus::block_import::BlockImport<Block>>::import_block
sentry_1 | 17: <sc_finality_grandpa::import::GrandpaBlockImport<BE,Block,Client,SC> as sp_consensus::block_import::BlockImport<Block>>::import_block
sentry_1 | 18: <sc_consensus_babe::BabeBlockImport<Block,Client,Inner> as sp_consensus::block_import::BlockImport<Block>>::import_block
sentry_1 | 19: sp_consensus::import_queue::import_single_block
sentry_1 | 20: <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
sentry_1 | 21: futures_util::future::future::chain::Chain<Fut1,Fut2,Data>::poll
sentry_1 | 22: <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
sentry_1 | 23: futures_executor::thread_pool::PoolState::work
sentry_1 | 24: std::sys_common::backtrace::__rust_begin_short_backtrace
sentry_1 | 25: std::panicking::try::do_call
sentry_1 | 26: __rust_maybe_catch_panic
sentry_1 | at src/libpanic_unwind/lib.rs:78
sentry_1 | 27: core::ops::function::FnOnce::call_once{{vtable.shim}}
sentry_1 | 28: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
sentry_1 | at rustc/f3e1a954d2ead4e2fc197c7da7d71e6c61bad196/src/liballoc/boxed.rs:1022
sentry_1 | 29: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
sentry_1 | at rustc/f3e1a954d2ead4e2fc197c7da7d71e6c61bad196/src/liballoc/boxed.rs:1022
sentry_1 | std::sys_common::thread::start_thread
sentry_1 | at src/libstd/sys_common/thread.rs:13
sentry_1 | std::sys::unix::thread::Thread::new::thread_start
sentry_1 | at src/libstd/sys/unix/thread.rs:80
sentry_1 | 30: start_thread
sentry_1 | 31: clone
sentry_1 |
sentry_1 |
sentry_1 | Thread 'import-queue-worker-0' panicked at 'Transaction has a bad signature', /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/29cee59/frame/executive/src/lib.rs:272
sentry_1 |
sentry_1 | This is a bug. Please report it at:
sentry_1 |
sentry_1 | https://github.com/AcalaNetwork/Acala/issues
sentry_1 |
sentry_1 | 2020-03-01 09:49:49.712 import-queue-worker-0 WARN sc_client::client Block prepare storage changes error:
sentry_1 | Execution(RuntimePanicked("Transaction has a bad signature"))
I believe this is the reason of stopped finality
初版,没有新功能,就是AuctionManager的重构
下个版本应该会添加两个配置 MAX_DEBIT
MAX_SURPLUS
,当负债 / 盈余太多的时候,铸造ACA并拍卖取得aUSD抵债 / 拍卖aUSD购买ACA并销毁,具体细节还需要考虑
Change existing ACA
to MAC
, and add ACA
and KAR
ACA
and KAR
will be used to record airdropped tokens in the followup candy events
Review the code and do following changes:
x.unwrap_or(0.into)
x.unwrap_or_default()
let x = TryInto::<u128>::try_into(x).unwrap_or(Bounded::max_value());
let x: u128 = x.unique_saturated_into();
x.checked_mul(&y).unwrap_or(Bounded::max_value())
x. saturating_mul(y)
checked_div
/ checked_add
/ checked_sub
/ checked_mul_int
Relates: #41
Have a problem in acala testnet now that chain stoped to finalize block, The node log is:
2020-02-28 10:34:56 Handler initialization process is too long with PeerId("QmSveKjM2cY2VNoZ6Lq7w71XmDzPSUFpZsoXrgtP3myn49")
2020-02-28 10:34:59 Idle (12 peers), best: #21962 (0xeec4…cf2c), finalized #15553 (0x8275…58ff), ⬇ 4.4kiB/s ⬆ 5.6kiB/s
====================
Version: 0.3.0-f887701-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:475
2: std::panicking::begin_panic
3: frame_executive::Executive<System,Block,Context,UnsignedValidator,AllModules>::execute_block
4: <acala_runtime::Runtime as sp_api::runtime_decl_for_Core::Core<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic<<pallet_indices::Module<acala_runtime::Runtime> as sp_runtime::traits::StaticLookup>::Source,acala_runtime::Call,sp_runtime::MultiSignature,(frame_system::CheckVersion<acala_runtime::Runtime>, frame_system::CheckGenesis<acala_runtime::Runtime>, frame_system::CheckEra<acala_runtime::Runtime>, frame_system::CheckNonce<acala_runtime::Runtime>, frame_system::CheckWeight<acala_runtime::Runtime>, orml_oracle::CheckOperator<acala_runtime::Runtime>, module_accounts::ChargeTransactionPayment<acala_runtime::Runtime>, module_cdp_engine::AutomaticLiquidationValidation<acala_runtime::Runtime>)>>>>::execute_block
5: sp_api::runtime_decl_for_Core::execute_block_native_call_generator::{{closure}}
6: std::panicking::try::do_call
7: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:78
8: std::thread::local::LocalKey<T>::with
9: std::thread::local::LocalKey<T>::with
10: sp_state_machine::StateMachine<B,H,N,Exec>::execute_aux
11: sp_state_machine::StateMachine<B,H,N,Exec>::execute_using_consensus_failure_handler
12: <sc_client::call_executor::LocalCallExecutor<B,E> as sc_client_api::call_executor::CallExecutor<Block>>::contextual_call
13: <sc_client::client::Client<B,E,Block,RA> as sp_api::CallApiAt<Block>>::call_api_at
14: sp_api::Core::execute_block
15: <&sc_client::client::Client<B,E,Block,RA> as sp_consensus::block_import::BlockImport<Block>>::import_block
16: <sc_finality_grandpa::import::GrandpaBlockImport<B,E,Block,RA,SC> as sp_consensus::block_import::BlockImport<Block>>::import_block
17: <sc_consensus_babe::BabeBlockImport<Block,Client,Inner> as sp_consensus::block_import::BlockImport<Block>>::import_block
18: sp_consensus::import_queue::import_single_block
19: <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
20: futures_util::future::future::chain::Chain<Fut1,Fut2,Data>::poll
21: <futures_util::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
22: futures_executor::thread_pool::PoolState::work
23: std::sys_common::backtrace::__rust_begin_short_backtrace
24: std::panicking::try::do_call
25: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:78
26: core::ops::function::FnOnce::call_once{{vtable.shim}}
27: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
28: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
std::sys_common::thread::start_thread
at src/libstd/sys_common/thread.rs:13
std::sys::unix::thread::Thread::new::thread_start
at src/libstd/sys/unix/thread.rs:80
29: start_thread
30: __clone
Thread 'import-queue-worker-0' panicked at 'Transaction has a bad signature', /root/.cargo/git/checkouts/substrate-7e08433d4c370a21/41bb219/frame/executive/src/lib.rs:272
This is a bug. Please report it at:
https://github.com/AcalaNetwork/Acala/issues
2020-02-28 10:34:59 Block prepare storage changes error:
Execution(RuntimePanicked("Transaction has a bad signature"))
2020-02-28 10:35:04 Idle (12 peers), best: #21962 (0xeec4…cf2c), finalized #15553 (0x8275…58ff), ⬇ 4.9kiB/s ⬆ 4.9kiB/s
2020-02-28 10:35:08 offchain worker start at block: 21962 execute automatic liquidation for collateral: CurrencyId::DOT
We think this problem may be caused by an unsigned transaction submitted by offchain worker.
As we have not yet designed a reward mechanism of running offchain worker, there's no Authority,and no signature verification by Authority for unsigned tx :
Acala/modules/cdp_engine/src/lib.rs
Lines 355 to 360 in d6212fe
And the validation for submitted tx we use SingedExtension
instead of deprecated unsigned::ValidateUnsigned
:
Acala/modules/cdp_engine/src/lib.rs
Lines 733 to 770 in d6212fe
There's no InvalidTransaction::BadProof
will be throughed by above code.
Is the lack of sign verification by Authority or the incorrect validation for unsigned tx cause this problem? or something else
fn liquidation_ratio(currency: CurrencyId) -> Ratio
fn set_collateral_auction_maximum_size
set_debit_and_surplus_handle_params
Use DEX as one of the price source during median price calculation
I did some tests, I dont know why the SignedExtension
doesn't work to validate unsigned tx,
In fact, the offchain worker successfully submit the unsigned tx, no errors are thrown during the submission process. But tx pool report errors:
WARN txpool (offchain call) Error submitting a transaction to the pool: Pool(UnknownTransaction(UnknownTransaction::NoUnsignedValidator))
Then I switch deprecated ValidateUnsigned
just like im-online module in polkadot, It works.
There is no example that use SignedExtension
to validate unsigned tx submitted by offchain worker in srml at the moment , I will switch to ValidateUnsigned
first.
Depends on #60
Update all the CDP related modules to add type UpdateOrigin: EnsureOrigin
and update all the set_xxx
method to use this to enforce origin:
T:: UpdateOrigin::try_origin(origin).map(|_| ()).or_else(ensure_root)?;
And in runtime set UpdateOrigin
to FinancialCouncil with EnsureProportionAtLeast 1/2
Details still need to be decided.
If the auction amount is lower than X and slippage is lower than a Y%, use DEX to make the trade directly instead of auctioning.
Acala/modules/auction_manager/src/lib.rs
Line 161 in 67434ad
Acala/modules/auction_manager/src/lib.rs
Line 167 in 67434ad
Acala/modules/auction_manager/src/lib.rs
Line 178 in 67434ad
The return values cannot be ignored because they may fail (shouldn't fail for deposit
, but will fail on withdraw
on malicious transaction).
Also better to use transfer
over withdraw
/ deposit
to avoid modify token total issuance.
The money should be transfer into / from the module's account, something like
Should have tests to ensure making bids without enough money won't be accepted.
cdp_treasury need the exact value when swap token to dex module
FreeTransferDeposit
amount, max expire date, all reasonsAlso
Acala/modules/accounts/src/lib.rs
Lines 134 to 138 in c3bf35f
is same as <Module<T>>::try_free_transfer(who)
Hold funds for IPO and allow IPO participants to submit their proof of participation to claim their ACA.
Proof verification needs to wait for child storage proof generation.
Details TBD.
The calculation related to exchange in dex is complicated, impl rpc api for dex module so that front-end developers don't need to know the specific calculation rules
Because the div will discard the remainder, the result of the dex::get_supply_amount
is not correct. use the incorrect result as supply amount to exchange with dex, the actual maxmum avalible target amount are most likely less than the specified target amount, lead to trading failed.
For each div in the calculation process, if there is a remainder, the quotient needs to be increased by 1 to ensure that the final result is sufficient for trading.
Type
Trait
Storage
Constant
Call
Module
This is required to ensure a newly launched network is in a working state from block one.
Like those, and maybe few more
Acala/modules/cdp_treasury/src/lib.rs
Lines 34 to 38 in 0887167
run these operations by offchain worker when emergency shutdown occurs:
这里只考虑关停流程,如何启动关停流程属于治理设计的一部分,另行考虑
当某单个资产因为某些风险太高,可以启动关停单一资产流程
流程:
因为某种恶性原因,比如严重资金安全漏洞,恶意治理提案被通过等,可以启用全局关停流程避免情况恶化
流程:
Running the docker container for validators, I had the following panic in my logs:
====================
Version: 0.2.8-36e791e-x86_64-linux-gnu
0: sp_panic_handler::set::{{closure}}
1: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:475
2: rust_begin_unwind
at src/libstd/panicking.rs:375
3: core::panicking::panic_fmt
at src/libcore/panicking.rs:84
4: core::option::expect_failed
at src/libcore/option.rs:1188
5: core::option::Option<T>::expect
at rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libcore/option.rs:348
std::time::Instant::duration_since
at src/libstd/time.rs:261
<std::time::Instant as core::ops::arith::Sub>::sub
at src/libstd/time.rs:388
6: <sc_network::protocol::legacy_proto::behaviour::LegacyProto<TSubstream> as libp2p_swarm::behaviour::NetworkBehaviour>::poll
7: <sc_network::protocol::Protocol<B,S,H> as libp2p_swarm::behaviour::NetworkBehaviour>::poll
8: <sc_network::behaviour::Behaviour<B,S,H> as libp2p_swarm::behaviour::NetworkBehaviour>::poll
9: libp2p_swarm::ExpandedSwarm<TTransport,TBehaviour,TInEvent,TOutEvent,THandler,THandlerErr,TConnInfo>::poll_next_event
10: futures_util::future::future::FutureExt::poll_unpin
11: <sc_network::service::NetworkWorker<B,S,H> as core::future::future::Future>::poll
12: futures_util::future::future::FutureExt::poll_unpin
13: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
14: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
15: tokio::task::core::Core<T>::poll
16: std::panicking::try::do_call
17: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:78
18: tokio::task::harness::Harness<T,S>::poll
19: tokio::runtime::thread_pool::worker::GenerationGuard::run_task
20: tokio::runtime::thread_pool::worker::GenerationGuard::run
21: std::thread::local::LocalKey<T>::with
22: tokio::runtime::thread_pool::worker::Worker::run
23: tokio::task::core::Core<T>::poll
24: std::panicking::try::do_call
25: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:78
26: tokio::task::harness::Harness<T,S>::poll
27: tokio::runtime::blocking::pool::Inner::run
28: tokio::runtime::context::enter
29: std::sys_common::backtrace::__rust_begin_short_backtrace
30: std::panicking::try::do_call
31: __rust_maybe_catch_panic
at src/libpanic_unwind/lib.rs:78
32: core::ops::function::FnOnce::call_once{{vtable.shim}}
33: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
at rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
34: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
at rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
std::sys_common::thread::start_thread
at src/libstd/sys_common/thread.rs:13
std::sys::unix::thread::Thread::new::thread_start
at src/libstd/sys/unix/thread.rs:80
35: start_thread
36: clone
Thread 'main-tokio-' panicked at 'supplied instant is later than self', src/libcore/option.rs:1188
参考uniswap的交易模式, 以aUSD为base token进行资产的去中心化交易
实现 DexManager 以供拍卖模块调用
Add pallet-recovery to runtime
债务分为三种:
其中全局债务和系统债务都由 CDP Treasury 来管理,用户债务由 Vaults 管理
全局债务金额应等于:所有CDP债务金额 + 系统债务 - 系统盈余
回购ACA流程:
增发ACA流程:
FreeTransferCount: 3
FreeTransferPerioid: 24 hours
FreeTransferDeposit: 1 DOLLAR
Make sure replace ChargeTransactionPayment as well
每个模块都分为这些部分:
max(target, last_bid) * MinimumIncrementSize
Examples in paritytech/substrate#4895
Depends #121
Depends on #58
Mostly about decl_error
refactor paritytech/substrate#4449
Depends on open-web3-stack/open-runtime-module-library#65
Should wait for #46 to avoid conflicts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.