Skip to content

Substrate runtime implementation: collaterize non-fungible assets for cash

License

Notifications You must be signed in to change notification settings

nczhu/collateral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Collateral

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

Modules:

  • 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 a reason.

Run Tests

cargo test -p node-template-runtime -- --nocapture

Run

./build.sh
cargo build --release
./target/release/collateral --dev

UI

https://substrate-ui.parity.io/ Local Node (127.0.0.1:9944)

About

Substrate runtime implementation: collaterize non-fungible assets for cash

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published