A simple implementation of tokenized debt, with simple-interest. A token owner can collateralize a non-fungible token for a loan, and pay it back with interest. Creditors can seize the collateral upon loan default.
Note:
- This is a WiP. Be warned.
- Major refactoring needed: looking for Substrate specific pointers & Rust syntax pointers
Debt
: handles creation of loan requests, paybacks, seizing of collateral.ERC721
: adapted from this sample to also be able to collateralize and uncollateralize tokens for areason
.
cargo test -p node-template-runtime -- --nocapture
./build.sh
cargo build --release
./target/release/collateral --dev
https://substrate-ui.parity.io/ Local Node (127.0.0.1:9944)