Setoff

Try to break it.

Every attempt below runs against the live Setoff contract on Arc mainnet as a read-only call. Nothing is signed and nothing is spent. The contract answers with the exact reason it refuses, decoded from its own revert data. They use real records on the contract: debt 0001, already paid; debt 0009, endorsed and unpaid; and cycle 0001, settled, with debt 0003, which it netted.

0 of 17 run0 off their rule

Setoff can't

  • Move money without the payer's own signature and payment.
  • Price a debt at a rate older than 25 hours, or at an invalid one.
  • Let anyone but the debtor endorse or pay a debt.
  • Take a debt back once the debtor has endorsed it.
  • Pay out more than it was paid, or push money to anyone.
  • Settle part of a cycle. Every net debtor funds, or every deposit comes back.
  • Change its own rules. There is no owner and no admin key.

The fixing

Pay at a rate 26 hours old

The debtor pays the endorsed debt, but the rate feed hasn't updated for 26 hours.

Rule: the contract must refuse this

Simulated: Block time moved 26 h forward; no new feed round

Not run

Price with a negative rate

Ask the contract to convert EUR 1.00 at a rate of −0.00000005.

Rule: the contract must refuse this

Not run

Paying

Pay the honest amount

The debtor pays the endorsed debt exactly what the fixing says it costs.

Rule: the contract must accept this

Not run

Underpay by one unit

The debtor sends the amount due minus 10⁻¹⁸ USDC.

Rule: the contract must refuse this

Not run

Pay someone else's debt

A stranger tries to settle the endorsed debt on the debtor's behalf.

Rule: the contract must refuse this

Simulated: The stranger holds 100 USDC

Not run

Pay a debt twice

The debtor of a debt that's already paid sends 1 USDC to pay it again.

Rule: the contract must refuse this

Simulated: The debtor holds 100 USDC, so the node can't refuse it before the contract does

Not run

Authority

Endorse a debt you don't owe

A stranger tries to endorse a debt on the debtor's behalf.

Rule: the contract must refuse this

Not run

Cancel an endorsed debt

The creditor tries to withdraw a debt after the debtor has signed for it.

Rule: the contract must refuse this

Not run

Withdraw money you're not owed

A stranger calls withdraw on the contract.

Rule: the contract must refuse this

Not run

Recording

Bill yourself

Record a debt where the creditor and the debtor are the same address.

Rule: the contract must refuse this

Not run

Bill in a currency without a feed

Record a debt in GBP, which has no Chainlink feed on this contract.

Rule: the contract must refuse this

Not run

Record an honest debt

A stranger bills the debtor EUR 1.00. It would become a proposal and nothing more.

Rule: the contract must accept this

Not run

The cycle

Settle a cycle twice

Anyone calls settle on a cycle that has already settled, to credit its creditors again.

Rule: the contract must refuse this

Not run

Void a cycle after it settled

Anyone tries to void a settled cycle, to claw its deposits back.

Rule: the contract must refuse this

Not run

Fund a cycle after it closed

Someone sends 1 USDC into a cycle that has already settled.

Rule: the contract must refuse this

Simulated: The sender holds 100 USDC

Not run

Pay a netted debt again, directly

The debtor of a debt the cycle already netted tries to pay it on its own.

Rule: the contract must refuse this

Simulated: The debtor holds 100 USDC

Not run

Open a cycle with no time to fund

Open a cycle whose funding deadline is five minutes after its cutoff: too short for anyone to fund.

Rule: the contract must refuse this

Not run