Score-based loans
collateral-vault can size a loan against a credit score from a pluggable source,
not only against collateral:
- Pluggable source: any contract exposing
credit_score(borrower) -> Option<CreditScore { score, updated_at }>. Ankara shipsmanual-credit-scorer(a trusted Manager posts scores, likemanual-oracledoes for prices). You can swap in a scoring partner’s contract, a cooperative’s membership record, or an adapter overattestation-registryCREDITclaims. The vault never assumes a scoring model. - Tiers (
set_score_config, Manager): strictly ascendingmin_score, each with an unsecuredcredit_limit, a flatfee_bpscharged on repayment, and amax_term_secs. Scores older thanmax_score_ageare rejected. - Collateral is optional: pass none for a fully unsecured loan, or add some to raise the limit.
- Due date instead of price liquidation: a scored loan must be repaid (principal
plus fee) within its term. After that, anyone can
mark_defaulted: pledged collateral goes to the Manager and adefaultedevent is emitted for score sources to pick up. Scored loans are never price-liquidated. - The ordinary
open_loan/liquidatepath is unchanged.
Group savings & lending: savings-circle
One deployment serves any number of circles in any SEP-41 token. There’s no admin. The
organizer fixes each circle’s rules when creating it, and the circle starts
automatically once it’s full (or when the organizer calls start_circle with at least
2 members).
Rotating
Each round, every membercontributes the fixed amount, and the pot goes to one
member, in join order. disburse (callable by anyone) pays out once everyone has
contributed, or after the round’s deadline with whatever was collected. Missed
contributions are recorded on the member, so the group can see them.
Pooled
- Members
contributeonce per period forroundsperiods. - Any member can
borrowup toborrow_multiple_bpsof their own savings (20_000= 2× savings), so the group backs part of the loan. Theyrepayprincipal plus a flatloan_fee_bps, and the fee goes into the pool. - After the last period, each member
withdraws their share of the pool, pro-rata to savings, so fees are shared. A member still owing when the pool closes forfeits their savings to the pool: the defaulter absorbs losses first, and only the remainder is shared across the group.